Press 1 to be routed to agent voicemail

Answered Question
Mar 11th, 2010
User Badges:

I'm having a heck of a time editing a script to make it so when a caller puts in the agents extension and the agent is busy it will say "press 1 to be routed to the agent's voicemail".  This is what I currently have thus far, it fails at the redirect call.


Select Resource (--Triggering Contact--, user_ResourceId)

     Connected

          End

     Failed

          Menu (--Triggering Contact--, p_AbrMenu)

               1 - Voicemail

                    Dequeue (--Triggering Contact--from--All CSQs--)

                    Set Contact Info (--Triggering Contact--handled)

                    Set ext_toCall = var_AgentPrimaryExt

                    Goto REDIRECT_CALL


REDIRECT_CALL label   

Call Redirect (--Triggering Contact--to ext_toCall)

          Successful

               End

          Busy

          Invalid

          Unsuccessful


It is never successful and it keeps retrying 3 times and then eventually says that there are system problems and to try back later.  So why is it failing at the redirect call?  Please be as descriptive as possible, or better yet if you could upload an example.  Any help would be appreciated, thanks.

Correct Answer by Anthony Holloway about 7 years 4 months ago

Maybe I made too much of an assumption.


Here's a simple flow:


// Get input from caller

CED = Get Digit String (p[enter_extension])


// Save the input as the extension

Extension = CED


// Retrieve the Agent who has this extension

Agent = Get User (Extension)


// Try to route to the Agent

Select Resource (Resource = Agent)

     Connected

          End


// Send direct to Agent's VM

Call Redirect (Unity, Called Address = Extension)

     Success

          End

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Aaron Harrison Thu, 03/11/2010 - 07:30
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Hi

Where are you retrieving the agent extension from? Have you verified it's correct during the debug?


Aaron

sturcott9891 Thu, 03/11/2010 - 07:42
User Badges:

I'm assuming that's correct because if I put in the agent's extension it goes to the agent just fine, and if they're busy you get prompted with the "press

1 to be routed to the agent's voicemail" it's at that point when it fails.  I've done the reactive script and it fails during the call redirect section.

Aaron Harrison Thu, 03/11/2010 - 07:55
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

OK - you have a Connect step, I guess referencing an agent - is this a 'user' type variable, or some other expression?


The Redirect step will want a diallable number in the form of a string, not a user reference or otherwise...


Aaron

Anthony Holloway Thu, 03/11/2010 - 08:07
User Badges:
  • Purple, 4500 points or more

Note that he's using var_AgentPrimaryExt as the extension to redirect to.  This is not the same as the variable he's using to Select Resource with.


We can assume he left out the steps above where he gets the Agent details and breaks up the extension from the user, etc.

sturcott9891 Thu, 03/11/2010 - 08:16
User Badges:

To give you a little bit more history, the company that we had setup our phone system created the script.  Every user had two phone lines, one UCCX line on their phone, and one private line.  I want to get away from the two lines on the phone because it creates a mess with reporting and various other things.  Well because of the two lines on the phone and because the UCCX line uses the personal line voicemail they included the below section in the script.  So I know the problem is with the Set ext_toCall = var_AgentPrimaryExt because once I removed the below script var_AgentPrimaryExt becomes nothing, but I don't know how to fix it.


If (var_MenuOptionChosen.startswith("3")) Then

     True

       Set var_AgentPrimaryExt = "5" + var_MenuOptionChosen.substring(1,4)

     False

          Goto UNSUCC_GET_USER


Our UCCX lines all start with 5XXX and the personal lines all start with 3XXX, that is why the above script was in there.  But I want to get rid of all the 5XXX lines and make all the users have one line on their phone.  But anyway I don't want to confuse you too much with our completely ridiculous setup so to make it simple what would the script look like if I wanted the caller to press 1 to go to the agent's voicemail?  I can't find any examples on the internet but I've got to believe it's pretty standard.

Correct Answer
Anthony Holloway Thu, 03/11/2010 - 08:23
User Badges:
  • Purple, 4500 points or more

Maybe I made too much of an assumption.


Here's a simple flow:


// Get input from caller

CED = Get Digit String (p[enter_extension])


// Save the input as the extension

Extension = CED


// Retrieve the Agent who has this extension

Agent = Get User (Extension)


// Try to route to the Agent

Select Resource (Resource = Agent)

     Connected

          End


// Send direct to Agent's VM

Call Redirect (Unity, Called Address = Extension)

     Success

          End

Anthony Holloway Thu, 03/11/2010 - 08:05
User Badges:
  • Purple, 4500 points or more

So you are redirecting to the Agent Extension?  This would assume they have a forward busy setting to go to voicemail.  Or that the gateway CSS can reach the agent partition.  Have you checked these things?  Have you also tried redirecting to Unity pilot point, and changing the Called Address to the Agent extension?  This would also assume that the Agent extension is the primary or alternate extension on the Unity vm box.

sturcott9891 Thu, 03/11/2010 - 08:43
User Badges:

YOU ARE THE MAN.  I apprecaite your help, both of you.  It seems to be working, but now I'm really confused

as to why they put in the "If" statement at all because it works much better and cleaner without it.

Actions

This Discussion