06-25-2012 03:00 AM - edited 03-19-2019 05:09 AM
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
Solved! Go to Solution.
07-15-2012 10:10 PM
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.
06-25-2012 06:44 AM
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.
06-25-2012 08:14 AM
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
06-26-2012 03:48 AM
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.
06-26-2012 03:51 AM
Hello Nikhil,
Tomorrow or the day after I shall try that in my lab.
Would be very happy if this is working,
Thanks,
Jan
07-13-2012 03:29 AM
Hello Nikhil,
Could you tell me how to do this:
calling_number.charAt(0)
Is this possible in Unity express?
thanks,
Jan
07-15-2012 10:10 PM
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.
07-15-2012 11:47 PM
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
07-16-2012 05:24 AM
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 ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide