IPCX 4.0 - distinguish incoming calls by calling numbers

Unanswered Question
Dec 15th, 2006
User Badges:

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
mmelbourne Sat, 12/16/2006 - 07:30
User Badges:
  • Silver, 250 points or more

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!

Vance Krier Sat, 12/30/2006 - 01:29
User Badges:

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

privateer Sat, 12/30/2006 - 02:41
User Badges:

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.

mmelbourne Sat, 12/30/2006 - 10:00
User Badges:
  • Silver, 250 points or more

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!




Vance Krier Sat, 12/30/2006 - 12:54
User Badges:

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

mmelbourne Sat, 12/30/2006 - 15:52
User Badges:
  • Silver, 250 points or more

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.

mmelbourne Wed, 06/13/2007 - 08:04
User Badges:
  • Silver, 250 points or more

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

mmelbourne Wed, 06/13/2007 - 08:34
User Badges:
  • Silver, 250 points or more

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


Hope this helps.

Vance Krier Wed, 06/13/2007 - 08:53
User Badges:

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


Vance

Actions

This Discussion