Jump to content

IVR Node FROM Call based routing


Recommended Posts


I'm testing the IVR with FROM based call routing but the documentation is relatively sparse on how to actually perform this task.


Reading https://doc.vodia.com/docs/ivrnodes gave some ideas on how to perform this, but to get the ball rolling I've had to piece together the pattern from very old information and posts.


For example i was able to create a pretty basic pattern match:


!^([(205|251)]{3}[0-9]*)!100!f! !^([(480|520|602)]{3}[0-9]*)!101!f! !^([(239|305|321)]{3}[0-9]*)!800!f! !^(907[0-9]*)!102!f! !^([(319|515|563|641)]{3}[0-9]*)!103!f! !^([(270|364)]{3}[0-9]*)!104!f! !^([(339|351|413)]{3}[0-9]*)!105!f!106!


Basically what i'm trying to achieve is that when the first 3 digits match an area code, it should be routed to a specific extension/destination.  This seems to work in most cases but i've had random issues where some area codes that match would go to a different destination completely. The logs only indicate that a pattern was matched.


Would you be able to provide a sample pattern?

Link to comment
Share on other sites

I tried it with your pattern without the square brackets but the test call just ended up staying on the IVR node.


Would you happen to have a reference of the full expressions allowed in the matching? It would help to have something up to date to reference.

This is the basic list i have so far:


Syntax     Function
!     Delimiter (separates each part)
[ ]     Lists the digits that are accepted
{ }     Defines the number of digits
( )     Stores the numbers that match
\2     Indicates which expression to call
*     Wild card (any length and character)
$     Tells the system to read from end of string

Link to comment
Share on other sites

2 hours ago, Vernon said:

Would you happen to have a reference of the full expressions allowed in the matching? It would help to have something up to date to reference.

Extended regular expressions are used in many places, e.g. see https://en.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions for general information. Character classes are sot supported. 

Link to comment
Share on other sites

Thank you for the link to the website, i was using something extremely similar. I was hoping to also find out all the other expression mentioned in the wiki such as !T! or !E!

This was the format i used, might be a bit ugly but it worked on testing.

!(+1205|+1251|1205|1201|205|201)!100!f! !(+1480|+1420|1480|1420|480|420)!101!f! ....etc

As long as the string is properly put into the FROM based routing match list, it should flow into the assigned destinations (e.g 100,101...etc)

Based on the documentation the expressions are read left to right so i'm assuming the FROM is also read that way so shouldn't run into a situation where if these digits exist in the middle of a number (239-205-1234).

It would be awesome if there was a built in expression checker, something similar to what used to exist in the dial plan, but those are the old Snom days.


Thank you again for the suggestions and i hope this post can help shed some light for future searchers.

Link to comment
Share on other sites

If you can, include the ^ in the pattern, otherwise you'll get random matches for example when the number 2121205123 would match 1205.

The other question is what pattern is send into the pattern matcher. E.g. does the provider send it in the +-format? It would be great, because then you don't have to worry about the beginning of the number.

ERE are powerful, but for humans hard to understand at times. You could play with the ChatGPT to come up with patterns...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...