News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Question on Digimaps

Started by hodag, March 12, 2015, 07:32:31 AM

Previous topic - Next topic

hodag

I have had a recent issue with SIP scanners and my provider suggest two work-around in the X_InboundCallRoute field:

{(?|x|xx|xxx|xxxx|xxxxx|xxxxxx|un@@.|anon@@.):}, ph

which rejects short number sequences, anonymous and called unknown strings or, alternatively

{>('100000'):ph}

which rejects any call not intended for my user account number of 100000.

If I want to combine these strings how do I do it?  My gut says insert a vertical bar and keep going starting with the ">", but I am not clear on how parentheses and curly brackets work in complex strings.

azrobert

#1
The code between curly brackets is a rule.
Each rule is processed separately moving left to right until the call is processed.
After the call is processed the rules to the right are ignored.
If you only have one rule the curly brackets are not required.
There is a syntax error in your 1st example.
It should be:
{(?|x|xx|xxx|xxxx|xxxxx|xxxxxx|un@@.|anon@@.):},{ph}

Anything between the brackets is a DigitMap.
If the DigitMap matches the CallerID the call is routed to the resource after the colon.
The 1st rule doesn't have a resource after the colon, so the call is routed nowhere and the call will be rejected.
If the call is not rejected, then the call will be unconditionally routed to the Phone Port.

To answer your question:
{(?|x|xx|xxx|xxxx|xxxxx|xxxxxx|un@@.|anon@@.):},{>('100000'):ph}

The 2nd suggestion is good enough.
{>('100000'):ph}

If the call doesn't match your provider's userid it will be rejected.
This will reject scanner calls since they will not contain the userid, so you don't have to compare for the different callerid patterns.

You could code it like this:
{>100000:ph}

A DigitMap will process reserved characters.
So an "x" will compare for a digit.
Since 100000 has no reserved characters, you can remove the brackets and 100000 becomes a literal.
The quotes make 100000 a literal within a DigitMap, so it's redundant.

hodag

Thanks, that was helpful.  I guess that is why Master Yoda says that I am not a Jedi yet.