UCCX Scripting:Not able to tranfer calls to Operator.

Answered Question
May 9th, 2010

HI Experts.

I am trying to make a script like

thank you for calling XYZ Company if you know the extension please dial it now or press 0 for assitance.

I have created a script in Cisco Unfied CCX 7.1  Editor and i am able to send the calls to Users Ext's but i am not able to transfer the calls to operator when i pressed 0.

I have attached the script where i am able to transfer the calls to Users ext successfully but i also want to transfer calls to operator when any body from outside press 0.

Please review my attached script and let me know how i can do it to complete the rest.I have attached My script and also the snapshot.

Waiting for reply

thanks and best regards

I have this problem too.
0 votes
Correct Answer by Bill Brown about 6 years 7 months ago

Listen, the whole script you need is below.  Set retries to 1 in the get digit string under the input tab.  It is simple but will do what you need.

Start

Delay 2 sec

Accept (--Triggering Contact--)

startscript

PhoneNumber = get digit string (--Triggering Contact--)

     Successful

          Call Redirect (--Trigger Contact-- to PhoneNumber)

               Successful

                    goto wrapup

               Busy

                    goto retry

               Invalid

                    goto retry

               Unsuccessful

                    goto retry

     Timeout

     Unsuccessful

If (PhoneNumber == "0") Then

     True

          Set PhoneNumber = "7263"

          Call Redirect (--Trigger Contact-- to PhoneNumber)

               Sucessful

                    goto wrapup

               Busy

                    goto retry

               Invalid

                    goto retry

               Unsuccessful

                    goto retry

     False

Goto startscript

wrapup

end

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Anthony Holloway Sun, 05/09/2010 - 20:13

0 will not fall to the successful branch, it will fall to the timeout branch.

successful = maximum digits entered OR termination key entered

timeout = no digits entered OR at least one, but less than maximum and no termination key

try out the reactive debug feature, it would have shown you that your script logic was not handling 0 correctly.

Jamil Hussain Thu, 05/13/2010 - 04:35

Hi.

I had made all the things which u told me but still I am not able to transfer my call to operator

What is the problem which I am facing any idea

I had attached the snapshot of the change which I made.

Please advise me something to sort out this problem

Best regards,

 

Jamil Hussain

Attachment: 
Anthony Holloway Thu, 05/13/2010 - 07:48

You problem is that you are storing the digits from the caller in the variable PhoneNumber, but testing for "0" in the variable userInputVariable.  That doesn't make any sense.

You should change your if statement to:

if (PhoneNumber.equals("0"))

And your set statement to

Set PhoneNumber = "7263"
Bill Brown Thu, 05/13/2010 - 13:52

I put an entire script above that will do what he wants.  Perhaps we should suggest the sample scripts that came with his contact center express.  I'm sure one of them was this very thing.  The substring(0,1) does the same thing as startswith, plus he could further screen if he wanted to.  For example, say all his numbers start with 72.  He could do a phonenumber.substring(0,2) == "72".  Just looking on the bright side of my Java ignorance.

Anthony Holloway Thu, 05/13/2010 - 15:35

((PhoneNumber.startsWith("72")) && (PhoneNumber.length() == 4))

=)

But you're right, it's equivalent.  Just one is easier to read is all.  Purely preference.

Jamil Hussain Mon, 05/17/2010 - 13:05

Hi bill

Could you please help me to set the Max played prompt for two times and then it disconnects the call.

My script is working fine but my recorded prompt is contnuosly repeating how I can stop my script or limit it to 2 times.

Best regards,

 

Jamil Hussain

Bill Brown Tue, 05/18/2010 - 04:52

Add an integer varible named intCount and set it to 0.  I've added some lines and bolded them for you.  The first time the script asks for a number, intCount will be 0, the second time it will be 1, so the test will be false the second time and terminate the call.  I don't know what type of buisness you are in, but you may want to record a message telling them they are being disconnected and place it right before the terminate statement.

Start

Delay 2 sec

Accept (--Triggering Contact--)

startscript

PhoneNumber = get digit string (--Triggering Contact--)

     Successful

          Call Redirect (--Trigger Contact-- to PhoneNumber)

               Successful

                    goto wrapup

               Busy

                    goto startscript

               Invalid

                    goto startscript

               Unsuccessful

                    goto startscript

     Timeout

     Unsuccessful

If (PhoneNumber == "0") Then

     True

          Set PhoneNumber = "7263"

          Call Redirect (--Trigger Contact-- to PhoneNumber)

               Sucessful

                    goto wrapup

               Busy

                    goto startscript

               Invalid

                    goto startscript

               Unsuccessful

                    goto startscript

     False

Set intCount = intCount + 1

if (intCount > 1) Then

     True

          goto prewrapup

     False

goto startscript

prewrapup

Terminate (--Triggering Contact--)

wrapup

end

Bill Brown Thu, 05/13/2010 - 06:27

Set a counter varible to 0

Place a label

Ask for the extension wtih a get digits command, but set retries to 0, and max digits to extension length

Below the command, not as a leg of the command, check to see if you get digits varible equals 0, if so do a redirect

Increment your counter varible by 1

Test to varible to see if it larger than the number of times you want to prompt them for an extension

If max has not been reached then go back to the label that you placed.

Edit:

     I did not notice the attachement, but Anthony is correct you are not comparing the same varible that you are capturing your input and you are not making one equal the other before the compare.

Some other thoughts:

Put at least a 2 second delay before the Accept statement.

Input will not be an integer, so you need to put qoutes around the 7397 extension.  UserInputVarible will need to be a string and made equal to PhoneNumber.

In your call direct, you have nothing to handle a busy, invalid, or unsucessfully, you may want to at least put a goto startscript in those.

If your extensions have a pattern, like all 7k, you may want to limit what you redirect. Example below.

     If ((PhoneNumber > "6999") & (PhoneNumber < "8000")) Then

     True

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

               Successful

               Busy

                    goto startscript

               Invalid

                    goto startscript

               Unsuccessful

                    goto startscript

     False

          goto startscript

Jamil Hussain Thu, 05/13/2010 - 10:14

Hi again

I don't think it will work because when I am chaning the value in the filter tab and put input length for 4 digits to 4 and its working fine but for 0 its not working and when I changed the same value to input length 1 its working for operator not for 4 digits and termination digit none

This is what happening with me.

Best regards,

 

Jamil Hussain

Correct Answer
Bill Brown Thu, 05/13/2010 - 13:15

Listen, the whole script you need is below.  Set retries to 1 in the get digit string under the input tab.  It is simple but will do what you need.

Start

Delay 2 sec

Accept (--Triggering Contact--)

startscript

PhoneNumber = get digit string (--Triggering Contact--)

     Successful

          Call Redirect (--Trigger Contact-- to PhoneNumber)

               Successful

                    goto wrapup

               Busy

                    goto retry

               Invalid

                    goto retry

               Unsuccessful

                    goto retry

     Timeout

     Unsuccessful

If (PhoneNumber == "0") Then

     True

          Set PhoneNumber = "7263"

          Call Redirect (--Trigger Contact-- to PhoneNumber)

               Sucessful

                    goto wrapup

               Busy

                    goto retry

               Invalid

                    goto retry

               Unsuccessful

                    goto retry

     False

Goto startscript

wrapup

end

Jamil Hussain Thu, 05/13/2010 - 13:55

Dear Bill

Thanks A lot

I really appreciate your effort I was struggling to make a script for Auto Attendant from last couple of days but with no success and you helped me in very critical situation.

I am really very thankful to you.

I tried the same configuration and its working fine with me now : ))))

Once Again thanks a lot.

God Bless You.

Best regards,

 

Jamil Hussain

Bill Brown Thu, 05/13/2010 - 12:31

I did not say it was flawless, but if all your route points and triggers are all 4 digits it will work fine.

Technically you could say >"7" and <"8" and this would still be good logic.

7X

7XX

and 7XX would be tried, but fail since the route points are 4 digits long.

Here is probably a more Cisco acceptable test.

If ((PhoneNumber.substring(0,1) == "7") & (PhoneNumber.length == 4)) Then

That would make sure the number starts with a 7 and that it was 4 digits long.

Of course you are correct, you should not use string formats of numbers as a comparison.  I was just being lazy.

Anthony Holloway Thu, 05/13/2010 - 13:37
((PhoneNumber.startsWith("7")) && (PhoneNumber.length() == 4))

=)

Some people will try and type exactly what you submit.

saifuddin.miyaji Sun, 09/15/2013 - 02:24

Bravo Bill,

Although I cannot understand the logic behid this script but it really works.

Thanks

Saif

Actions

This Discussion