cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1298
Views
5
Helpful
8
Replies

Unity express script

j.huizinga
Level 6
Level 6

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         

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

8 Replies 8

paolo bevilacqua
Hall of Fame
Hall of Fame

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.

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
Level 1
Level 1

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.

Hello Nikhil,

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

Would be very happy if this is working,

Thanks,

Jan

Hello Nikhil,

Could you tell me how to do this:

calling_number.charAt(0)

Is this possible in Unity express?

thanks,

Jan

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.

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

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 ?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: