Digitmap help
jbebel:
I have the following ITSP DigitMap for use with asterisk, formatted for easier reading:
Code:
(
4xx |
6[45]xx |
60x |
8[56]00 |
9{t=di2}(011x. |
(1[2-9]xx | )[2-9]xxxxxx |
9(11 | 33)
) |
9(11 | 33))
In words:
Internal numbers are of the format 4xx
Other networks are prefixed by 6. Mine is 64xx, another is 65xx.
I have a few tools at 60x, like echo tests
voicemail is 8500 and conference rooms are at 8600
To dial an outside line, start with 9
- International calls then start with 011
- Long-distance start with 1[2-9]xx
- local can just be 7 digit dialing.
- Emergency can be 911 or 933 to test
I also allow dialing 911/933 directly without dialing 9 first.
The problem I'm experiencing is when dialing long-distance numbers slowly. If I dial 9, I get the di2 tone, then if I dial 19, I get a busy signal like I've failed to match a digitmap. If I dial the same thing quickly, not waiting for the di2 tone, the dial works.
Thinking this had to do with allowing 9(11|33) direct dialing, which conflicts with the outside line di2 tone, I tried removing the entry for direct dialing 911. Now if I dial 9, wait 2-3 seconds, and then dial 1, I immediately get a busy signal.
This made me think there was a problem with the '(1[2-9]xx | )[2-9]xxxxxx' syntax for specifying optional 11-digit long-distance or 7-digit local dialing I tried making these options more explicit by splitting them into
two completely separate rules, and that seems to work.
My question is why does this syntax work when dialed quickly, but not dialed slowly? Is there a proper way to match the optional 1+area code and then a 7-digit number, or do they really have to be listed explicitly in the
digitmap?
Thanks
ianobi:
jbebel - welcome to the forum.
(1[2-9]xx | )[2-9]xxxxxx is not a recognised OBi syntax. You could devise a rule such as:
1?[2-9]xx. The number can start with 1 or not 1, followed by 2 to 9 followed by any number of digits. However, this would introduce delays as the OBi waits to see if you have finished dialling. Having an explicit rule for each case is the best option.
{t=di2} should only be in a digitmap, not in an InboundCallRoute. By putting it in say ITSP Profile A (which is normally Msp1), you are putting it into the Phone Port DigitMap and OutboundCallRoute. This may be confusing your OBi.
I would need the big picture to see exactly how to set up this config - which OBi do your have? Is it only used for linking to your asterisk? Which is Primary Line etc. I'm going to assume that you are using ITSP Profile A and that your Primary Line is SP1 Service. In which case:
ITSPA = Msp1 = Mpli
Service Providers > ITSP Profile A > General > DigitMap:
(4xx|6[45]xx|60x|8[56]00)
User Settings > User Defined Digit Maps > User Defined Digit Map3 >
Label: ext
DigitMap: (011x.|1[2-9]xxxxxxxxx|[2-9]xxxxxx|(11|33)|9(11|33))
Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli)|9{t=di2}(Mext))
Physical Interfaces > PHONE Port > OutboundCallRoute:
{([1-9]x?*(Mpli)):pp},{(<#:>):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli},},{(Mext):sp1}
The above example is based on an OBi110.
I'm assuming that you wish the prefix "9" to carry forward to your asterix for external calls. I have removed any explicit references to 911/933 from the Phone Port DigitMap and OutboundCallRoute. Mext should be able to deal with 9911/9933 and 911/933 and forward both formats to your asterix.
As always, I recommend thorough testing of 911/933 following these sort of changes.
I've made a lot of assumptions above - let me know if I'm going off in the wrong direction - it has been known to happen :)
jbebel:
Thanks for the help! Here's a little more detail to help with the assumptions.
I have an Obi110 with one analog phone connected. No POTS line connected. I only use it with asterisk. My Phone Primary Line is set to SP1 service. To simplify the setup, and remove features I didn't make use of, I simply set my Phone DigitMap to "((Msp1))" since anything acceptable by ITSP profile A should be accepted by the Phone line, and nothing else. And I set my Phone Outbound Call Route to "sp1" since I simply want anything dialed by the phone to be sent directly to sp1.
I've set my ITSP profile A digitmap to this:
( 4xx | 6[45]xx | 60x | 8[56]00 | 9{t=di2}(011x. | 1[2-9]xx[2-9]xxxxxx | [2-9]xxxxxx | 9(11|33)) | 9(11|33))
I explicitly listed the 11 digit 1[2-9]xx[2-9]xxxxxx case separately from the 7 digit [2-9]xxxxxx case, which is working for me. I had just hoped for a more concise syntax. Perhaps that's not possible.
Also, from what you're saying though, I shouldn't have {t=di2} in the ITSP digitmap, only in the Phone digitmap. It seems to be working, but perhaps I haven't found the failure case yet. Is the ITSP digitmap actually used by anything if I set the outbound call route to sp1 and explicitly define the phone digitmap? Should I just copy my current ITSP digitmap into the Phone digitmap?
ianobi:
Looks to me like you have a pretty good setup for your needs. Anything you put in ITSPA will be in Msp1, so it works ok for the Phone Port DigitMap. Normally, Msp1 also occurs in the Phone Port OutboundCallRoute, but this is not so in your case so {t=di2} causes no problem.
A rule such as 011x. can cause a delay. The OBi will wait ten seconds by default after you dial the final digit to see if you have finished dialling. 011x.S4 will cut the delay to four seconds.
One possible improvement might be to include *** in your Phone Port DigitMap and {***:aa2} in the Phone Port OutboundCallRoute. This would give you access to various info and programming options via the analogue phone. However, this may not be important to you.
I would remove all the spaces in the ITSPA DigitMap. Sometimes they cause problems.
jbebel:
Thanks. I removed the spaces and reduced the international timeout to 4s as you suggested. I'm curious to try the aa2 route as you suggested, but if I add that to the outbound call route, don't I then need something like {(Msp1):sp1} in the outbound call route as well, which brings in the {t=d2} which doesn't belong there? I guess I could just do {(x.):sp1}, or is there a better way to say send *** to aa2 and everything else to sp1?
Navigation
[0] Message Index
[#] Next page