Unity express script

Answered Question
Jun 25th, 2012
User Badges:
  • Silver, 250 points or more

Hi,


Is it possible in Unity express to check the first digit from the calling party number?

I mean if someone calls from 3xxxxx or 6xxxxx ?

I don't care about the complete number just the first digit.


Thanks,


Jan         

Correct Answer by nikhijos about 4 years 10 months ago

Hi Jan,


Yes, it is possible in Unity Express,


You can add calling_number.charAt(0) to the variable first_digit for which you can use set.


Please find attached screenshot for the same.

Open the expression editor for set operation with first_digit and write calling_number.charAt(0), click apply and OK.


Thanks,

Nikhil Joshi.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
paolo bevilacqua Mon, 06/25/2012 - 06:44
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    Founding Member

I don't think it's possible because the 'language' unfortunatly lacks any kind of string operator, as well many other things.


However you can do some number manipulation and routing at the dial-peer level in the router.

j.huizinga Mon, 06/25/2012 - 08:14
User Badges:
  • Silver, 250 points or more

Hello Paolo,


Was already afraid for that, in UCCX you have these string operators, and I have done this before.

Have to check the number manipulation in IOS.


Thanks,


Jan

nikhijos Tue, 06/26/2012 - 03:48
User Badges:

Hi Jan,


In the script you can use Get Call Contact Info, which gives the calling number.


The Calling number comes as a string, you can store it into a String variable say calling_number,


Then you can store the calling_number.charAt(0) in another char variable say first_digit,


In an if condition you can check for the value of first_digit, which actually is the value of the first digit that you want.


You can follow the following URL for more information on scripts

http://www.cisco.com/en/US/docs/voice_ip_comm/unity_exp/rel7_0/administrator/script/edover.htmlhttp://www.cisco.com/en/US/docs/voice_ip_comm/unity_exp/rel7_0/administrator/script/edover.html#wp1076594


Thanks,

Nikhil Joshi.

j.huizinga Tue, 06/26/2012 - 03:51
User Badges:
  • Silver, 250 points or more

Hello Nikhil,


Tomorrow or the day after I shall try that in my lab.

Would be very happy if this is working,


Thanks,


Jan

j.huizinga Fri, 07/13/2012 - 03:29
User Badges:
  • Silver, 250 points or more

Hello Nikhil,


Could you tell me how to do this:

calling_number.charAt(0)


Is this possible in Unity express?


thanks,


Jan

Correct Answer
nikhijos Sun, 07/15/2012 - 22:10
User Badges:

Hi Jan,


Yes, it is possible in Unity Express,


You can add calling_number.charAt(0) to the variable first_digit for which you can use set.


Please find attached screenshot for the same.

Open the expression editor for set operation with first_digit and write calling_number.charAt(0), click apply and OK.


Thanks,

Nikhil Joshi.



j.huizinga Sun, 07/15/2012 - 23:47
User Badges:
  • Silver, 250 points or more

Hi Nikhil,


I did exactly the same already, but I get a "Parse Error"

I can see that you are using version 8.6., and in my lab I have an old AIM module with 7.0.6

It seems that in this version I can not do this.


My customer is going to buy a 29xx with an ISM module, so I shall have the latest version and it should work.


Thank you very much for your help,


Bye,


Jan

paolo bevilacqua Mon, 07/16/2012 - 05:24
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    Founding Member

To follow on this interesting topic, Cisco should document all the Java variable 'dot operators' that are currently  undocumented, and from which version do these works ?

Actions

This Discussion

Related Content