Routing Question

Started by azrobert, February 06, 2011, 07:25:37 AM

Previous topic - Next topic


I want to dial numbers like "0*8005551212", "9*15" and "5*"  and route them to SP2.
I already modified the DigitMap for SP2 and I can dial the numbers if I prefix them with "**2"
I would like to modify the phone port OutboundCallRoute to eliminate the prefix. SP1 is my primary route.
I tried the following:  "{((<**2:>|x*)(Msp2)):sp2}", but it did not work.
Is the above invalid, do I have to modify the DigitMap for the phone port or do something else?
Could someone help?



Maybe use the standard DigitMap and just make the X_InboundCallRoute route on the Phone port "SP2"


Not sure what you changed in SP2 DigitMap (which is under the ITSP Profile that SP2 uses);
anyway that only affects the value of (Msp2).

Your inboundCallRoute for SP2 looks valid to me.
However, you should have a similar change in PHONE Digit Map, which actually controls
what numbers you can dial from the PHONE Port. Try adding a similar rule to the PHONE Port Digitmap
also (i.e., something like this  .... (**2|x*)(Msp2)|....    ).

Note that you are not stripping the leading x* in your inbound call route like with
the **2 prefix. I hope this is what you intended. In other words, if you dial
**212345, then 12345 is called on SP2. If you dial 5*12345, then 5*12345 is called on SP2.
I don't have an obi with me at the moment, so I can't try this myself right now.

Let us know if it works, or which numbers that you dial are not working as expected.



Try this: I think this is what you mean . (dot) is the wild card not *
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.


To clarify things, I want to dial a number and a star followed either no digits, 2 digits or 10 digits. I want this number passed to SP2 unchanged. I have SP2 registered to SipSorcery and I do additional processing of the number in SipSorcery's dialplan.

I added "x*|x*xx|x*xxxxxxxxxx" to SP2's DigitMap and everything works if I prefix the number with "**2".

Thank you Obiliving for your suggestion.  Before making your mod I was getting "invalid number".  Now I'm getting "no call route available..." for the 2 or 10 digits, but still getting "invalid number" when just dialing "1*". Strange it doesn't like the "1*".  I'm one step closer.
You said "your InboundCallRoute looks valid".  Did you mean OutBoundCallRoute?   


Since SP2 is not your primaryline, you could also change the outboundcallroute if you don't want to prepend the **2.

As for the digitmap... you could also try to compress it  :


According to the docs, it looks like that should work.


Thanks biomesh, your DigitMap suggestion is cleaner than what I was using.

I am trying to modify the OutboundCallRoute. See my first post. 

It looks like my OutboundCallRoute mod is wrong.



Yes, I meant OutboundCallRoute.

I got it now. I understood your problem. Actually the solution could be quite simple.
First of all, you can have more than one rule {...} in OutboundCallRoute that routes to
the same trunk (sp2 in your case). You want to dial some normal numbers with **2 prefix and have OBi strip them, and some other numbers like 8*something, 5*something without needing the **2 since it
would be clear by context these only go out on SP2, correct?

Here is just my suggestion,
1. KEEP the original **2 rule in OutboundCallRoute, and keep the original SP2 DigitMap
2. Instead add x*|x*xx|x*xxxxxxxxxxx| to the PHONE Port digit map directly
3. Add this rule {(x*|x*xx|x*xxxxxxxxxxx):sp2} to your outboundCallRoute
In other words, just add the new pattern to your PHONE Port digitmap so you can dial them;
and then add a routing rule so OBi knows where to route those numbers to.
Note that routing rules are evaluated from left to right and the first matching one will be used (from admin guide).

Additional trick.....
To save you some typing, and let's say you don't use TrunkGroup4 in the OBi at all.
You can use the TrunkGroup4 DigitMap as a place holder for the new pattern (x*|x*xx|x*xxxxxxxxxxx)
and then just refer to (Mtg4) in the PHONE Port DigitMap and OutboundCallRoute without repeating the pattern. (This might seem like a hack...  But I was told by OBIHAI support that there will be a more general support for user defined digit map variables in the near future so the hack proposed here is just a temporary solution).


Following your first suggestion I got it working with 1 glitch.  It worked with 2 and 10 digit numbers, but didn't like "1*".  I get a message "No Service Available".  I got around it by changing it to "x**" and modified my SipSorcery dialplan to treat it the same as "x*".  It appears it requires a least 3 characters.  Would be interesting to figure out why.

On your second suggestion I found TrunkGroup4, but what is the syntax of the refer back?
Is it just (Mtg4) for the DigitMap and {Mtg4:sp2} for the route?



Got your 2nd suggestion to work the same as your 1st.  Much cleaner.

Thanks again. 


Glad that you got this going.

I can reproduce the x* numbers not working as expected. That looks like a bug;
I have alerted OBIHAI Support about this. Hopefully there will be a fix soon.

I suspect it may be related to how the device is handling short phone numbers (1 or 2 digits) which are also interpreted as speed dials, esp. if the number starts with 1-9.