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

IPCX 4.0 - distinguish incoming calls by calling numbers

Hi colleagues,

I need to distinguish incoming calls by calling numbers in IVR script. Mobiles from the rest of calls for example by specifying cell operator prefixes. As I see the only way to do that is to define my own java class.

Do anybody know examples of how to do that? Or I have already complicated matters and more simple way exists?

Thanks in advance.

Yuri.

15 REPLIES
Silver

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

You could use the string methods in the expression editor:

e.g.

Set bPrefixPresent = strWord.startsWith( strPrefix1 ) || strWord.startsWith( strPrefix2)

bPrefixPresent is a boolean variable, and strPrefix1 and strPrefix2 are the number prefixes to check for. strWord is the original calling number string.

Please rate helpful posts!

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Sorry for long silence.

It works!

Thank you.

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Hi guys,

Sorry to crash the thread. I'm trying to do the exact same thing but I'm new to scripting and can't quite figure this out.

Do I add a Set step and select the bPrefixPresent variable in the drop down? If so, how do I format the expression. I've tried every combination I can think of and it always returns parse error.

Also, is there a reference guide for which string methods or other methods are available for use with expression editor?

Thanks for your help!

Vance

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Hi.

Place your e-mail here, I'll send you an example.

As for methods you can use all the standard java methods so you can find reference guides on sun.com. URL's for particular method explanations you can find in the volume 3 of CRS Scripting and Development Series guide.

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Cool, thank you very much.

vgk@adnetman.com

Silver

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Here's a script segment which checks whether a string (calling number) begins with a certain prefix. The script itself is not much use on its own, but it demonstrates the principles.

Hope this helps. Please rate helpful posts!

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Thank you. What version was the script built for? I'm currently running version 3.5(3) and the script won't open in the editor. It fails with:

"Failed to load script file; java.lang.ClassNotFoundException: com.cisco.expression.TextExpression"

I'll be upgraded to 4.0 shortly, just not running it at the moment.

Thanks!

Vance

Silver

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

This is a version 4.0 script. With 3.5(3) you can use the Execute Java Method step to achieve a similar outcome. Select a string variable, and then highlight the Explore Class Information tab and select "public boolean startsWith(string)", and specify the 'string' value in the argument and then select a boolean variable in the "Assign To Variable" drop-down list.

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

This is great but evertime i apply the script to the system the app sub system goes to partial serrvice. Any ideas?

Silver

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Are you running IPCCX Premium? Is there anything helpful in the log files, as to why the Application sub-system goes into partial service?

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

hi

It is a standard system do you need premium? as for the logs this is a whole new issue. i get a java error connection refused when trying to look at the engine logs. I should also tell you the Callmanager is 5 and the ipcc is 4.5.Mark

Silver

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

I suspect you may need Premium to use those Java expressions in the Expression Editor.

Hope this helps.

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Just FYI, I was able to do it 4.0 Enhanced, not sure about Standard.

Vance

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Hi Guys

I am going to try it on a Premium system to day to see if this cures it. Just my luck. oh well customer will have to buy an upgrade :)

Thanks fro the help

Mark

Community Member

Re: IPCX 4.0 - distinguish incoming calls by calling numbers

Bingo does not work on a standard license.

CHeers

313
Views
10
Helpful
15
Replies
CreatePlease to create content