Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Silver

Unity express script

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         

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
New Member

Unity express script

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.

8 REPLIES
Hall of Fame Super Gold

Unity express script

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.

Silver

Unity express script

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

New Member

Unity express script

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.

Silver

Unity express script

Hello Nikhil,

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

Would be very happy if this is working,

Thanks,

Jan

Silver

Unity express script

Hello Nikhil,

Could you tell me how to do this:

calling_number.charAt(0)

Is this possible in Unity express?

thanks,

Jan

New Member

Unity express script

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.

Silver

Unity express script

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

Hall of Fame Super Gold

Unity express script

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 ?

548
Views
5
Helpful
8
Replies
CreatePlease login to create content