News:

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

Main Menu

Learning about ..... dial plans!

Started by Colic, April 16, 2013, 05:55:02 AM

Previous topic - Next topic

Colic

Im brand new to the Obi. I have set up some basic dial plans in a Billion router a while ago.

Im happy to take a lesson on using Google, or searching these forums (for I have failed to find what I need on both counts!). But because Im not quite sure where or in what place I will find it, Google is not my friend!

Surely there is something out there that fully explains the dial plan syntax used by OBI?

The best ive found to date is http://www.obitalk.com/forum/index.php?topic=34.0 which is a start. But lets say I wanted to understand this:

(<**8>[2-9]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>xxxxxxx|011xx.|(Mipd)|[^*]@@.'@'@@.)

where Im not clear on the <**8> or the @'s
or this:

([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

what is the # doing, and the **2, for example, without the angle brackets this time?

or what does <1aaa> mean?

And so on ..... Im sure someone could explain the individual questions above (which would be welcome btw!), but my point is I must be able to learn all this without bothering folk (ie reading a manual!!). Is there such a beast, or at least one place where I can glean 90% of what I need to know?

[^c[C]]o{l-l]i[C][..]

ianobi

First thing to read for the details is:

http://www.obihai.com/docs/OBiDeviceAdminGuide.pdf

Around page 180 is a heading "Digit Map Configuration". This gives the basic rules. I doubt that it will answer all of your questions, so please feel free to come back here and ask more.

Even when you know the rules, how it all fits together is a big subject!

I'll have a go at detail in my next post.

ianobi

Quote(<**8>[2-9]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>xxxxxxx|011xx.|(Mipd)|[^*]@@.'@'@@.)

This is a DigitMap. <**8> means prepend **8 to any number that matches the following rule. @ means any alphanumeric character. '@' means @ as in mynetwork@someplace.com. Putting single inverted commas around a character makes it a "literal". It is itself, not representing something else. so @@.'@'@@. can be used for sending sip uri calls to something@somewhere.com.


QuotePhysical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

This says what is allowed to be dialled from the phone port. It allows you to dial #, which gives direct access to the PSTN Line Port on an OBi110. It allows you to dial numbers beginning with **2 to give you access to services on sp2.


QuotePhysical Interfaces > PHONE Port > OutboundCallRoute:
{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}

After the number you have dialled has been processed through the Phone Port DigitMap, then the Phone Port OutboundCallRoute decides how that number will be routed.


That's enought to think about for now. Come back with detailed questions anytime. There's lots of helpful people here   :)   By the way we are just OBi users, we don't work for Obihai.

Colic

hey thanks for the replies - you seem to be a helpful bunch (yes Im concluding that on  sample base of one!). One forum I joined recently introduced me with an autotype link to a google search!!

I will study the info and try some new configs, safe in the knowledge I can come back here if puzzled!


Colic

#4
OK, let me see how well I did my initial homework! It may not be quite correct as I am unable to dial 775 (PennyTel test/information) - or **2775 - being told both times the call was rejected by the service provider with error 400 and 404. If anyone can see an issue in these dial plans that might cause this Id be grateful (or suggest where else I might look) :

Here's what my homework produced :-)

SP1
( <:02>[2-9]xxxxxxx | 0[2-9]xxxxxxxx | 0011xx. | xxx | 18x. | 13x. )

Takes all Australian and international numbers (that I care about). xxx is to cater for SP specific numbers and a backup for 000 (ie 911).

SP2
( <:02>[2-9]xxxxxxx | 0[2-9]xxxxxxxx | 0011xx. | xxx | 18x. | 13x. )

Same.

Phone port digitmap :

( (Msp1) | (Msp2) | [1-9]x?*(Mpli)|[1-9]S9 | [1-9][0-9]S9 | **0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli) )

Allows SP1 SP2 calls (Im not concerned about Obitalk just yet, but leave it in anyway), or calls directed using a ** command.

Outbound call route:

{([1-9]x?*(Mpli)):pp},{(<#:>|000):li},{1[258]1:sp1},{775:sp2},{x.8888888:sp2},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Msp1):sp1},{(Msp2):sp2},{(Mpli):pli}

Should put emergency calls to POTS, but if thats down it would use Msp1 (as it accepts xxx) or if down Msp2. Is this right, obviously Im not in a hurry to test it! (Fyi 000 is the Australian 911). It also directs 8888888 to SP2 as that is the DID for SP1, from which Im usually calling (its the primary line).

So 121, 151 and 181 are Sp1 specific numbers. They work.
775 is an Sp2 specific number, but gives me error "rejected by Sp error 400", Or 404 if I use **2775 which I would expect to also work.

I know that 775 works because I can call it on Android Sip phone software connected to the same SP (Pennytel), which is connected to the same physical network (in fact the same hardware) as the Obi.

So I cant see my mistake that causes 775 to fail ? I was hoping syslog would give me some routing messages, but alas I discovered not!

Interestingly ***1 give me "there is no service available to complete your call", but Im thinking this is because I havent touched Obitalk yet.....

Any help/advice/improvements welcomed.

thanks


ianobi

#5
I won't try to address all of your issues in this post as some more facts are needed.

Crucial to to how OBi digit maps work, is knowing the following setting:
Physical Interfaces -> PHONE Port -> PrimaryLine
Default for an OBi110 is "PSTN Line". Primary Line is the service you can use without any ** codes. You may well have changed it when you set up your service providers, which is fine, but we need to know.

I would set your Phone Port DigitMap to this:

Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|000|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

"000" is needed here to make it a special case. When you dial "000" it will go out to PSTN via the Phone Port OutboundCallRoute with no need to reference any other digit maps.

Msp1 and Msp2 are referenced within the Phone Port DigitMap, so probably do not need to be added. If you made your Primary Line "SP1 Service", then (Mpli) is automatically replaced by (Msp1).

If you can find your local OBi web page, then look at Status > Call History. This will show what you dialled and where the call was routed for each call. The web page is normally found by dialling ***1, but not in this case! The ip address can be found in "System Status" if you go in via the OBi Dashboard, follow prompts to Expert Configuration.

I cannot see why 775 does not work, but maybe Call History will shed some light on that.

Here's some more homework   :)

http://www.obitalk.com/forum/index.php?topic=513.msg3001#msg3001

Only read the first post in that thread!

Edit: I just noticed that you say that sp1 is the Primary Line. I must read more carefully!!

ianobi

OK, so I had some time between watching the cricket (IPL). Pom here, I know an Aussie will understand   :D  So here's my attempt at a dial plan for you:

Physical Interfaces > PHONE Port > PrimaryLine: SP1 Service
Voice Service > Auto Attendant > PrimaryLine: SP1 Service

Service Providers > ITSP Profile A > General > DigitMap:
(<**2>775S4|<**2>x.8888888|<02>[2-9]xxxxxxx|0[2-9]xxxxxxxx|0011xx.|1[258]1|000|18xxx.|13xxx.)

Service Providers > ITSP Profile B > General > DigitMap:
(<02>[2-9]xxxxxxx|0[2-9]xxxxxxxx|0011xx.|775S4|000|18xxx.|13xxx.)

Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|000|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

Physical Interfaces > PHONE Port > OutboundCallRoute:
{([1-9]x?*(Mpli)):pp},{(<#:>|000):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}


Notes:
18xxx. & 13xxx. lengthened to prevent clashes with three-digit numbers.
<**2>775S4 This uses your Primary Line to redirect 775 to sp2 by prepending **2 to 775. The S4 adds a four second delay to prevent clashing with someone dialling a longer number that starts 775. If no other numbers start 775, then the S4 is not needed.
<**2>x.8888888 To be honest, I did not really understand what this is for, but it redirects to sp2 the same way as 775.
000 goes directly to PSTN.

Using the Primary Line to do the redirecting means that the Phone Port DigitMap and OutboundCallRoutes can be left at default, except for the 911 to 000 change in your case. If you wish to dial 000 via sp1 or sp2 you will need to dial **1000 or **2000. OBi devices to not provide "fail over". If the PSTN line fails, then dialling 000 will result in "no service available" message. Automatic failover can be achieved in some circumstances using trunk groups, but that's way too complex for this post!

In your posts the digit maps etc had a lot of spaces in them. They are best avoided as they can cause problems.

Let me know how it goes. Feel free to question or complain if my dial plan does not work  :)


Colic

Thanks for the reply - let me comment with my thoughts so they can be corrected and I can learn more!

Quote from: ianobi on April 17, 2013, 08:04:21 AM
I would set your Phone Port DigitMap to this:

Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|000|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

I had ultimately intended SP1 to take most calls, but SP2 (lower quality but cheaper) to take special numbers (1300 etc). So Im thinking if I only reference Mpli (ie Sp1) and Msp1 doesnt contain those numbers, then this digimap will fail to recognise them. Or should I make both Msp1 and 2 the same and reply on the outbound call routing to do that for me? 

Quote"000" is needed here to make it a special case. When you dial "000" it will go out to PSTN via the Phone Port OutboundCallRoute with no need to reference any other digit maps.

But Assuming the outbound call route directs it to PSTN, right?

Quote
I cannot see why 775 does not work, but maybe Call History will shed some light on that.

Yes Im in to call history (not via ***1 yet!) but it tells me little more except the call number was 775, it was routed to sp2 but gave an error    "End Call (400 Bad Request(Bad Content-Length (larger than datagram)))." The same digit sequence to the same SP on my Android connects every time.. Hmmm.

Quote
Here's some more homework   :)

http://www.obitalk.com/forum/index.php?topic=513.msg3001#msg3001

Only read the first post in that thread!

I was a bad boy and started reading the rest, then thought better of it! I should probably stay clear of this until I get the basics, but if I get that inital post right, you are saying that if my phone port digitmap were to only say {nn.} and my phone outbound call route only said {1234:sp1} , and the sp1 digitmap only said {5678} then when I dial 1234 the call would be connected?

How do I reach that bizarre conclusion - well from myh interpretation of your comment

QuoteIn reality, the ITSPA, ITSPB, LINE, and OBiTALK DigitMaps only come into play because they're actually part of the PHONE Port DigitMap through indirect references: (Msp1), (Msp2), (Mli), (Mpp), and (Mpli).

and since in my example I havent referenced any of the sp1 (or other come to that) digitmaps, then the Phone port digitmaps do not come into play. If I have understood you correctly.

Colic

#8
Quote
OK, so I had some time between watching the cricket (IPL). Pom here, I know an Aussie will understand  
[\quote]

Funnily enough, I originated from the Mother Country 20 or so yeas ago, so I find it convenient to take whichever side fits the moment!! But I digress .....


Quote
18xxx. & 13xxx. lengthened to prevent clashes with three-digit numbers.

Lesson #1 learned  :)

Quote
<**2>775S4 This uses your Primary Line to redirect 775 to sp2 by prepending **2 to 775.


Ah right, yes that makes sense thanks.

Quote
<**2>x.8888888 To be honest, I did not really understand what this is for, but it redirects to sp2 the same way as 775.

Yes, well it was supposed to be for testing with two SPs, but now I understand more it isnt needed, and didnt make much sense (it did at the time!), so youre right to be confused.

Re spaces, I made the mistake of reading the manual (It may contain extra white spaces for readability), but you cant beat practical experience! Thanks.

Onwards I go - I need to sort this 775 next, then I might be back!!

=============================

.. I am back! Im almost having fun now, failure of 775 (as above) was resolved by turning off ALG SIP in my router, after which the Obi correctly took its router reserved IP address which it refused to do before.

Anyway, having made great progress, Im now trying to get an incoming call to the AA to translate the number and then use auto call back as follows:

{(<**1>(0418666623)):aa($1)},{(<**1>(0294727444:0418666623)):aa},{ph} 

0418666623 works, AA calls back as expected.
0294727444 does not, and goes straight to ph.

What is wrong with the above substitution? (yes the number comes in as 0294727444 but its really from 0418666623 but via a SIP who overstamps 0294727444 onto the CLID).


ianobi

I won't go back over all the issues in the past couple of posts as I think you have moved on. The important thing to remember with outgoing calls is that it is a two-stage process. Consider if you dial 775 from the Phone Port: In stage one the Phone Port DigitMap using this rule from (Mpli) <**2>775  prepends **2 to make the number **2775. Now in stage two **2775 is processed throught the Phone Port OutboundCallRoute and this rule {(<**2:>(Msp2)):sp2}  removes the **2, matches 775 in (Msp2) and routes the call to sp2.

The Phone Port DigitMap and Phone Port OutboundCallRoute will do most of the work for you if you get the Service Providers > ITSP Profile A/B > General > DigitMap and Line Port DigitMaps right.

If you wanted to use sp2 for 13 and 18 numbers then you could change your (Mpli) by changing (Msp1) Like so:

Service Providers > ITSP Profile A > General > DigitMap:
(<**2>775S4|<02>[2-9]xxxxxxx|0[2-9]xxxxxxxx|0011xx.|1[258]1|000|<**2>18xxx.|<**2>13xxx.)



Onwards to the InboundCallRoutes:

If the incoming CallerID is 0294727444 and you want the call back to go to 0418666623 using sp1, then the correct syntax is:

{(0294727444):aa(**10418666623)},{ph}

As you want both CallerIDs to call back to number 0418666623 you could combine to this:

{(0418666623|0294727444):aa(**10418666623)},{ph}

If SP1 Service is set for the auto attendant primary line (see previous post), then you could drop the **1 as the auto attendant will use its primary line by default unless you tell it differently.

Glad to see you got the 775 problem sorted.


Colic

Yes you are right, I have moved on thanks to your (and the others) help! After that basic guidance I look back over the manuals and other posts and it all mostly makes sense now! So thanks for that.

Quote
{(0418666623|0294727444):aa(**10418666623)},{ph}

So that's how it's done! I made the amendments and you will not be surprised to know it works (as does the rest of the digitmaps you suggested, but rest assured I made sure I understood them fully beforehand, and even added the odd tweak for stuff I hadnt mentioned for simplicity)!

So what was wrong with mine, obviously it isnt right because it doesnt work. But I thought it would substitute the number first and then use that if callback was needed?

And for my last puzzle, that again I seem to be incapable of solving with an hour of googling and some manual reading - I have two SPs and one PSTN, but one phone (well 4, but all cordless connected to the one base station). If I call in via one SP and so occupy my one phone, then call in on another SP that call rings for the caller but obviously cant ring the phone as its in use. I was expecting the caller to get the engaged signal? I assume the same is true if I call in via PSTN. What am I missing here?

Thanks again for all the help, it truly does seem straightforward now but it truly didnt first off.



ianobi

#11
Quote{(<**1>(0294727444:0418666623)):aa}

There's a few things to say about this rule. The correct syntax would be:
{(<**1>(<0294727444:0418666623>)):aa}
However, I don't think that it will work because you are trying to transform CallerIDs rather than dialled or received digits. If you can make it work, then let me know - it would be really useful! Also, There is no auto call-back number after aa. It needs to be $1 or an actual number.


QuoteAnd for my last puzzle, that again I seem to be incapable of solving with an hour of googling and some manual reading - I have two SPs and one PSTN, but one phone (well 4, but all cordless connected to the one base station). If I call in via one SP and so occupy my one phone, then call in on another SP that call rings for the caller but obviously cant ring the phone as its in use. I was expecting the caller to get the engaged signal? I assume the same is true if I call in via PSTN. What am I missing here?

This is all to do with "sessions". If your PSTN line is in use and someone calls it, then they will get a busy signal. Your PSTN line can only deal with one session (call) at a time. Most voip providers allow at least two sessions on each "line". If someone calls in on sp1 you can put them on hold and make a call out on sp1, then maybe set up a three-way conversation using your phone and the two sessions from the voip provider. So one call on sp1 does not even make busy the "line" on sp1. The OBI can allow several calls to be going on at the same time. You only have one phone, but the aa can also be making calls and incoming calls may be routed by single stage dialling out on other trunks. It just keeps on getting more complicated   :)

If you are making an outgoing call on sp1, then an incoming call can come in on sp1, sp2 or PSTN line and the caller will get ringing tone. However, you should get a "call waiting" tone from the OBi to tell you there is another call coming in so you can decide what to do with it.


I'm glad that you feel you are making progress. It is always useful for someone like me to have to think about how to set things up from scratch. We have not yet talked about your incoming calls from OBiON/OBiAPP from mobile phones or softphones - that's another subject! Then there's voice gateways to think about. If you really want to dive in deep, then you could try to understand how trunk groups work  ;)

I see there's back to back ashes series later this year - thats very unusual   8)

Colic

OK, Ive made s few settings changes (call waiting is a * code from the handset, right?), but Ive run out of time to test but will do when I get chance.....

For the meantime duty calls, and people are puzzled how anyone can spend so much time thinking and talking about a "phone" !!!


ianobi

QuoteOK, Ive made s few settings changes (call waiting is a * code from the handset, right?), but Ive run out of time to test but will do when I get chance.....

You have made me have a think about this! The default postion is that Call Waiting is enabled. If you are on a call and another call comes in, then you should get Call Waiting tone and the caller will get ringing tone. If you disable call waiting, then you will get no notification and the second caller will get busy tone.

The Star Codes are:

*56 Enable Call Waiting
*57 Disable Call Waiting


Quotepeople are puzzled how anyone can spend so much time thinking and talking about a "phone" !!!

This is a common problem in OBiLAND! I have to take frequent holidays to the real world to restore my sanity   :D

Shale

Quote from: ianobi on April 24, 2013, 05:50:58 AM
The default postion is that Call Waiting is enabled. If you are on a call and another call comes in, then you should get Call Waiting tone and the caller will get ringing tone.

For "Call Waiting" Colic should locate the Flash button on the cordless phones. This button is equivalent to pushing down the cradle switch on a classic telephone for about 0.5 seconds. The admin manual says " When you are on the line with the first party, you will hear a tone signalling you there is a second call coming in.  To answer this call, press the "flash" button on your phone or depress and release the switch hook on the telephone.  The first party will be placed on hold and you will be connected to the second party until you press the "flash" button or depress and release the switch hook again."

If you press the flash button again, it may combine all three parties into the same call. I am not sure if that is what is going to happen. It may just return to the first call. Be careful what you say if you return to the first call however. The flash button is also used for three-way calling.

When setting up the OBi for somebody who is just confused about the beeps, disabling call waiting is probably a good idea.

In PSTN there is often a signal sent when a call is coming in during another call that the phone can get caller ID for the new call. I doubt that the OBi is can do this, or we would probably have seen some mention.

ianobi

Shale,

QuoteIn PSTN there is often a signal sent when a call is coming in during another call that the phone can get caller ID for the new call. I doubt that the OBi is can do this, or we would probably have seen some mention.


Not only for PSTN. Obi devices can accept this - it's a Phone Port setting:
CallWaitingCallerIDEnable

It is enabled by default, but you would need a phone capable of accepting it during another call in progress. I believe some disable it as the tones that are used to send the CallWaitingCallerID can be very annoying when you are already in a conversation.

Colic

Quote from: ianobi on April 24, 2013, 05:50:58 AM
QuoteIf you disable call waiting, then you will get no notification and the second caller will get busy tone.


This wasnt what I found - ie I had call waiting disabled but an incoming call did not get the engaged signal - it just rang even though there was of course no ring at the actual phone because it was in use. Neither was there a call waiting tone. Maybe this has something to do with the cordless phone and base station Im using.

Ill do some more experiments. Apparently I must install the new cooker first though.

ianobi

This is what the Admin Guide says about CallWaitingEnable:

QuoteEnable call waiting service. Call Waiting is the situation where a new incoming call is routed to the PHONE port when there is already another call connected. If this service is enabled, OBi plays call-waiting tone to alert the user, as well as generates CWCID signal if CWCID is enabled. The user may then swap between the two calls by hook flashing. If the service is disabled, OBi rejects the incoming call as busy.
Note: It is possible for the user to set this parameter from the phone using a Star Code

I tested it using incoming calls to my main provider, sipgate.co.uk. It seems to work as stated. Maybe some voip providers don't accept the busy signal sent back from the OBi. When you experiment using Star Codes, it might be worth checking the Phone Port setting for CallWaitingEnable. The box should be unchecked if you turn the function off.


QuoteApparently I must install the new cooker first though.

Food before phones - sounds reasonable!