Showing results for 
Search instead for 
Did you mean: 

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.



You could use the string methods in the expression editor:


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!

Sorry for long silence.

It works!

Thank you.

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!



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 URL's for particular method explanations you can find in the volume 3 of CRS Scripting and Development Series guide.

Cool, thank you very much.

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!

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:"

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



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.

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

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


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

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

Hope this helps.

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


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


Recognize Your Peers
Content for Community-Ad