News:

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

Main Menu

A question about the usage of '!' in DigitMaps

Started by restamp, April 11, 2017, 12:17:55 PM

Previous topic - Next topic

restamp

This morning I was making some changes to the DigitMaps on my OBi, only to discover that one of the changes didn't work.  This lead me to conclude that perhaps I don't understand some finer points about how DigitMaps work, so I thought I'd raise the issue here for clarification:

One of the changes was intended to disallow international calling on some Service Providers.  To do this I added the string "!011S0" to the DigitMap associated with the ITSP Profile of the Phone's Primary Line.  My reasoning was that the Phone's DigitMap already included the rule "(Mpli)" so I figured it would be expanded and in the process pull in and act on the "!011S0".  But after doing this I could still dial an 011-something without the OBi Digitmapping code objecting.  When I explicitly coded an "!011S0" directly in the Phone's DigitMap, it worked as expected.

So, what am I missing here?

drgeoff

#1
Is there another rule in your ITSP digit map which would allow international dialling? The default map includes xx. which does.

My understanding is that the barring only applies in the rule containing the ! ,  not to the entire digit map.

restamp

Yes, but by appending the "S0" onto the end of the rule, it takes effect immediately upon reception of  the third digit in the (leading) sequence "011".  It will immediately revert to a busy signal at this point and refuse to accept any more digits, so this solves a myriad of "other rule" problems, not to mention lessening the annoyance factor of allowing someone to TT in a long international sequence only to find it was going to be rejected from the start.

In any event, this was just an example designed to illustrate my real question, which is why is barring apparently only recognized if the barring rules are in the main DigitMap and not recognized if they are in an included map?


azrobert

It worked for me, but I have a different bug. My test wasn't exactly like yours.  I had previously removed the reference to Mpli from the phone digit map. I added "011S0" to the SP2 digit map and added a reference to Msp2 into the phone digit map.

When I dialed 011 it was rejected, but it didn't honor the "S0" when I have another rule that will match 011 with additional digits. When I dial 0115555 it is not rejected and matches my 7 digit rule. When I remove the 7 digit rule, 011 is immediately rejected. I tested on an OBi110/2886.

You can accomplish what you want with a different method. This will only work if you don't start any number with zero. Remove or modify any rule that will match a number beginning with a zero. For example change the 7 digit rule to "[2-9}xxxxxx". Now  when you dial a zero it will be immediately rejected before you can dial another number.

restamp

Yes, after further testing (OBi202/5463EX) I agree with you, azrobert: It's not the barring that doesn't work, but the S0.  If you wait the 10 seconds for the long timer to expire, the OBi will finally deliver a busy tone.

As an additional test, I made Mpli exactly "(!123S0)".  (A visual inspection of the ph1 digitmap showed no variable length rules that might possibly match there.)  I then tried dialing "123" and "123456".  In each case, I would have expected the OBi to squawk busy after the first three digits had been entered, but it only did so after 10 seconds had elapsed.

I see no logical reason why the S0 designation should be ignored above, so I am considering it a bug.  Does everyone concur?

ianobi

I agree that there is a bug, but it's not maybe quite as described by this post so far.

QuoteAs an additional test, I made Mpli exactly "(!123S0)".  (A visual inspection of the ph1 digitmap showed no variable length rules that might possibly match there.)  I then tried dialing "123" and "123456".  In each case, I would have expected the OBi to squawk busy after the first three digits had been entered, but it only did so after 10 seconds had elapsed.

I repeated this test using an OBi110. The call failed, but only because the barring failed to work and the call was routed out to the Primary Line where the Service Provider rejected it. Check your Call History to see if the call was routed to your Primary Line.

In your first post you stated:
QuoteWhen I explicitly coded an "!011S0" directly in the Phone's DigitMap, it worked as expected.
Yes, I agree this method always works.

I believe this has something to do with how the "!" is parsed when the OBi is unpacking nested digit maps and yes I agree it's a bug!

More than four years ago I looked into a similar problem here:
http://www.obitalk.com/forum/index.php?topic=4799.msg31198#msg31198