OBiTALK Community

General Support => Installation and Set-Up (Devices) => Topic started by: Sunfiregt on January 25, 2012, 12:06:21 PM

Title: PSTN and VOIP Account
Post by: Sunfiregt on January 25, 2012, 12:06:21 PM
Hi,

Can someone tell me how I would setup my OBI110 to allow all local / 911 / Toll free calls to route through PSTN and all long distance to route through the obi device automatically. I don't want to dial 9 or and special combination on my phone.. I want this to be seemless to the end user.

Thanks
Title: Re: PSTN and VOIP Account
Post by: RonR on January 25, 2012, 12:19:09 PM
911 calls are routed to the the LINE Port (PSTN line) by default.

Assuming you have Google Voice configured on SP1:


Service Providers -> ITSP Profile A -> General -> DigitMap:

(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx|
<**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)


Physical Interfaces -> PHONE Port -> PrimaryLine -> SP1 Service


Physical Interfaces -> LINE Port -> DigitMap : ([2-9]11|[2-9]xxxxxx|1xxxxxxxxxx)


           911  ->  LINE Port
      7 digits  ->  LINE Port
     Toll Free  ->  LINE Port
10/11 digits  ->  SP1 Service
         011+  ->  SP1 Service
Title: Re: PSTN and VOIP Account
Post by: Sunfiregt on January 25, 2012, 03:22:25 PM
sorry not Google voice but another sip provider ( voip.ms)

Also how are inbound calls handled on the pstn
Title: Re: PSTN and VOIP Account
Post by: RonR on January 25, 2012, 03:27:09 PM
Quote from: Sunfiregt on January 25, 2012, 03:22:25 PM
sorry not Google voice but another sip provider ( voip.ms)

I just checked the VoIP.ms dialing format and what I posted should work equally well for them.

Quote from: Sunfiregt on January 25, 2012, 03:22:25 PM
Also how are inbound calls handled on the pstn

By default, inbound calls from all trunks (SP1/SP2/OBiTALK/LINE) ring the PHONE Port.
Title: Re: PSTN and VOIP Account
Post by: Sunfiregt on January 25, 2012, 03:52:57 PM
awesome.. i guess my next thing to do is order one... This is great
Title: Re: PSTN and VOIP Account
Post by: jalapeno19104 on January 26, 2012, 08:33:19 PM
I think the correct digit map is the following, otherwise I could not get [2-9]11 to work via the LINE port:

(<**8>[2-9]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx| <**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)
Title: Re: PSTN and VOIP Account
Post by: RonR on January 26, 2012, 08:40:30 PM
If you want [2-9]11 redirected to the LINE Port, that's what you need.
Title: Re: PSTN and VOIP Account
Post by: Felix on January 26, 2012, 08:52:45 PM
Ron's DigitMap assumes that "local" == "7-digits". In more and more places this is not the case. In fact, in Los Angeles (at least in 310 and 818 area codes) for PSTN calls you *have* to dial 11 digits. And which one is free and which one is not you typically don't know until you get a bill...

So, you may as well have voip.ms on SP1, Google Voice on SP2, and Line for 911 calls. I realize, there are some caller ID considerations - neither solution is perfect!
Title: Re: PSTN and VOIP Account
Post by: TimDan on January 28, 2012, 10:22:35 AM
Quote from: Felix on January 26, 2012, 08:52:45 PM
... In fact, in Los Angeles (at least in 310 and 818 area codes) for PSTN calls you *have* to dial 11 digits.

To illucidate the fortunate rest of the country, area codes here in L.A. County
simply ran out of 7-digit telephone nos.  Area code 310 (Westside of L.A.) and
818 (San Fernando Valley) now have area codes 424 and 747 laid over them,
respectively, so that a single household can have 2 area codes, possibly having
the same last 7 digits.  And calling the other phone line in the same household,
even if they have the same area code, involves dialing 11 digits - as if it were
a long distance call.

TimDan
Title: Re: PSTN and VOIP Account
Post by: Sunfiregt on January 31, 2012, 04:32:05 PM
Can i use Google voice as well but dial a special number to use it?
Title: Re: PSTN and VOIP Account
Post by: Sunfiregt on January 31, 2012, 05:01:24 PM
Isn't this telling toll free numbers to go through your voip provider instead of line port?


Quote from: RonR on January 25, 2012, 12:19:09 PM
911 calls are routed to the the LINE Port (PSTN line) by default.

Assuming you have Google Voice configured on SP1:


Service Providers -> ITSP Profile A -> General -> DigitMap:

(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx|
<**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)


Physical Interfaces -> PHONE Port -> PrimaryLine -> SP1 Service


Physical Interfaces -> LINE Port -> DigitMap : ([2-9]11|[2-9]xxxxxx|1xxxxxxxxxx)


           911  ->  LINE Port
      7 digits  ->  LINE Port
     Toll Free  ->  LINE Port
10/11 digits  ->  SP1 Service
         011+  ->  SP1 Service

Title: Re: PSTN and VOIP Account
Post by: RonR on January 31, 2012, 05:03:58 PM
Quote from: Sunfiregt on January 31, 2012, 05:01:24 PM
Isn't this telling toll free numbers to go through your voip provider instead of line port?

The **8 that's added to the beginning of 7-digit and toll free numbers redirects them to the LINE Port.
Title: Re: PSTN and VOIP Account
Post by: Sunfiregt on January 31, 2012, 05:54:32 PM
When I type this :
Quote from: RonR on January 25, 2012, 12:19:09 PM

(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx|
<**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)


It defaults to this after reboot

(*75xx|*9x|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*]@@.)
Title: Re: PSTN and VOIP Account
Post by: RonR on January 31, 2012, 06:07:51 PM
If you're making changes to the OBi directly, you must also set:

System Management -> Auto Provisioning -> ITSP Provisioning -> Method : Disabled
System Management -> Auto Provisioning -> OBiTALK Provisioning -> Method : Disabled

or the OBiTALK Web Portal will overwrite your changes.
Title: Re: PSTN and VOIP Account
Post by: Sunfiregt on February 01, 2012, 11:44:16 AM
Which one am i supposed to use to get the 2-9(11) working on pstn line

This one:
(<**8>[2-9]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx| <**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)

Or this one:

(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx|
<**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)

Title: Re: PSTN and VOIP Account
Post by: RonR on February 01, 2012, 11:50:23 AM
The first one will divert [2-9]11 calls to the LINE Port.
Title: Re: PSTN and VOIP Account
Post by: JHamCell on February 06, 2012, 08:13:55 PM
Quote from: Sunfiregt on February 01, 2012, 11:44:16 AM

(<**8>[2-9]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<**8>[2-9]xxxxxx| <**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx)|011xx.|(Mipd)|[^*#]@@.'@'@@.)


I consider myself to be a smart & technical guy, but this stuff is blowing my mind!

Please help me interpret what I am seeing.
<nnn> is a prefix to be added if the pattern that follows matches.
<**8> is the prefix that somewhere later says, send this to PSTN.

If <**n> is not specified, I assume that means nothing explicitly specified so route the call to the "default" PrimaryLine.

<**8>[2-9]11   - Matches if [2-9]11 is dialed. Prefixes the number with **8 (to force PSTN).

The pipe "|" means "or" (like || in ksh or awk).

1xxxxxxxxxx   - Matches an 11 digit number starting with a  1. No ** prefix so off to PrimaryLine it goes.

<1>[2-9]xxxxxxxxx   - Matches 10 digit number starting with [2-9] (Area Code) and add the "long distance" 1.  No ** prefix so off to PrimaryLine it goes.

<**8>[2-9]xxxxxx   - Matches 7 digit "local" number, Prefixes the number with **8 (to force PSTN).

<**8>(18(00|88|77|66|55)xxxxxxx|<1>8(00|88|77|66|55)xxxxxxx) - Covers all the "free" phone numbers and prefixes the number with **8 (to force PSTN).

011xx.   - For International dialing, No prefix so off to PrimaryLine it goes.
I assume this would work to route international via SP1?:  <**1>011xx.

(Mipd)|[^*#]@@.'@'@@.)   - Is this condition for something more than just number pattern matching? 
No clue what the Mipd bit means.
Maybe wilcard@wildcard for some kind of IP telephony address?

Living in Metro Atlanta we have 10-digit dialing for 404, 770 & 678 area codes.  All other domestic LD area codes require a 1 prefix (inter & intra state).

When a pattern is matched, does it stop searching?
So if I insert the "<**8>(404|770|678)xxxxxxx" test before "<1>[2-9]xxxxxxxxx" will it route my 10 digit local numbers (404/770/678) to PSTN?

If so, I'm thinking my digit map would look something like this, note I am explicitly routing everything and not relying on the PrimaryLine to be set to anything in particular:

(<**8>[2-9]11|<**8>(404|770|678)xxxxxxx|<**1>1xxxxxxxxxx|<**11>[2-9]xxxxxxxxx|<**8>(18(00|88|77|66|55)xxxxxxx|<**81>8(00|88|77|66|55)xxxxxxx)|<**1>011xx.|(Mipd)|[^*#]@@.'@'@@.)

Am I close or am I as lost as I feel? (If I am close then writing it all down has clarified some of it in my mind).

I appreciate the time of ANYONE that wants to wade through this with me :)

Many Thanks In Advance.

JHam
Title: Re: PSTN and VOIP Account
Post by: RonR on February 06, 2012, 08:49:53 PM
You'll find an explanation of DigitMap syntax and a description of the Digit Map Processor in the OBi Device Administration Guide (http://www.obihai.com/docs/OBiDeviceAdminGuide.pdf).

Quote from: JHamCell on February 06, 2012, 08:13:55 PM
(Mipd)|[^*#]@@.'@'@@.)   - Is this condition for something more than just number pattern matching?  

ipd is a User Defined DigitMap for handling IP Dialing:

18005551212*76*10*223*207  ->  18005551212@sip.tollfreegateway.com

[^*#]@@.'@'@@. is a rule to allow SIP URI's in Speed Dials:

18005551212@sip.tollfreegateway.com

Quote from: JHamCell on February 06, 2012, 08:13:55 PM
When a pattern is matched, does it stop searching?

No.  When everything has been evaluated, the best match is chosen.

Quote from: JHamCell on February 06, 2012, 08:13:55 PM
So if I insert the "<**8>(404|770|678)xxxxxxx" test before "<1>[2-9]xxxxxxxxx" will it route my 10 digit local numbers (404/770/678) to PSTN?

Yes, because it's a better match, not because of its position.

Quote from: JHamCell on February 06, 2012, 08:13:55 PM
If so, I'm thinking my digit map would look something like this, note I am explicitly routing everything and not relying on the PrimaryLine to be set to anything in particular:

(<**8>[2-9]11|<**8>(404|770|678)xxxxxxx|<**1>1xxxxxxxxxx|<**11>[2-9]xxxxxxxxx|<**8>(18(00|88|77|66|55)xxxxxxx|<**81>8(00|88|77|66|55)xxxxxxx)|<**1>011xx.|(Mipd)|[^*#]@@.'@'@@.)

You're only making it unnecessarily complex as this set of rules would normally reside at the PrimaryLine's DigitMap.
Title: Re: PSTN and VOIP Account
Post by: infin8loop on February 06, 2012, 08:59:57 PM
Quote from: JHamCell on February 06, 2012, 08:13:55 PM
I consider myself to be a smart & technical guy, but this stuff is blowing my mind!

The OBi is like learning to ride a bike.

If the bike is designed like this...


Title: Re: PSTN and VOIP Account
Post by: Wilbour on March 30, 2012, 05:17:43 PM
Quote from: Sunfiregt on January 25, 2012, 12:06:21 PM
Hi,

Can someone tell me how I would setup my OBI110 to allow all local / 911 / Toll free calls to route through PSTN and all long distance to route through the obi device automatically. I don't want to dial 9 or and special combination on my phone.. I want this to be seemless to the end user.

Thanks

This is exactly what I wish to do exept all local calls require 10 digit dialing. In order to keep it as simple as possible I would not want to have OBI prefill my area code on local dialing since we are so accustom to using all 10 digits. Therefore I would require the following:

911 PSTN
10 DIGIT PSTN
800 # PSTN
11 DIGIT GOOGLE VOICE
Title: Re: PSTN and VOIP Account
Post by: RonR on March 30, 2012, 05:45:18 PM
Quote from: Wilbour on March 30, 2012, 05:17:43 PM
911 PSTN
10 DIGIT PSTN
800 # PSTN
11 DIGIT GOOGLE VOICE

Physical Interfaces -> PHONE Port -> PrimaryLine : PSTN Line

Physical Interfaces -> LINE Port -> DigitMap : ([2-9]11S0|[2-9]xxxxxxxxx|<**1>(1xxxxxxxxxx|011xx.))

Service Providers -> ITSP Profile A -> General -> DigitMap : (<1>[2-9]xxxxxxxxx|1xxxxxxxxxx|011xx.)

Internatinal calls (011+) will also be routed to SP1 (Google Voice).
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 07:35:15 AM
Quote from: RonR on March 30, 2012, 05:45:18 PM
Quote from: Wilbour on March 30, 2012, 05:17:43 PM
911 PSTN
10 DIGIT PSTN
800 # PSTN
11 DIGIT GOOGLE VOICE

Physical Interfaces -> PHONE Port -> PrimaryLine : PSTN Line

Physical Interfaces -> LINE Port -> DigitMap : ([2-9]11S0|[2-9]xxxxxxxxx|<**1>(1xxxxxxxxxx|011xx.))

Voice Services -> ITSP Profile A -> General -> DigitMap : (<1>[2-9]xxxxxxxxx|1xxxxxxxxxx|011xx.)

Internatinal calls (011+) will also be routed to SP1 (Google Voice).


So this is way harder than I thought it would be. I followed the instructions (except Voice Services - I had to use Service Providers since Voice Serices did not have ITSP Profile) but my phone attached to the OBI110 defaults to the SP1 unless I **8 first. My other phones in the house do not ring for incoming GV calls and they are never use SP1 for long-distance unless I **1 first. Am I missing something?
Title: Re: PSTN and VOIP Account
Post by: RonR on April 16, 2012, 07:53:07 AM
Quote from: Wilbour on April 16, 2012, 07:35:15 AM
I followed the instructions (except Voice Services - I had to use Service Providers since Voice Serices did not have ITSP Profile) but my phone attached to the OBI110 defaults to the SP1 unless I **8 first.

'Voice Services' should have been 'Service Providers' -- that was a typo.

3- and 10-digit numbers should go out the LINE Port.  Are you sure you set?:

Physical Interfaces -> PHONE Port -> PrimaryLine : PSTN Line

Only 11-digit and 011+ numbers should go out SP1.

None of this has any affect on incoming calls.  If the phone connected to the OBi rings and others don't, that's a wiring issue.  For the OBi to ring a phone, it must be connected to the OBi PHONE Port.  The OBi cannot ring a phone connected to the LINE Port.

Double-check your settings in the OBi itself by logging into the IP address returned by dialing ***1.
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 08:39:56 AM
This stuff can make you feel stupid! I have my ip address and of course it asks for username and password. Would that not be "Home" the display name and "admin" the default password?
Title: Re: PSTN and VOIP Account
Post by: RonR on April 16, 2012, 08:44:32 AM
The username and password are both admin by default.

If the OBiTALK Web Portal changed the OBi's password, it would be listed there.
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 08:47:32 AM
Thanks, I am in. I'll see what kind of changes were made. I followed the above recommendations but nothing works with regards to PSTN phones. They do not dial out using GV and the default number for my phone attached to the 110 is always GV.
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 08:55:15 AM
We are making progress! I was using the web interface from OBI but when I accessed the unit directly the default was SP1. Now the phone on the 110 is using my telco # first.

Will keep you posted as I keep testing
Title: Re: PSTN and VOIP Account
Post by: RonR on April 16, 2012, 08:57:25 AM
If you make any changes to the OBi directly, you also have to set:

System Management -> Auto Provisioning -> ITSP Provisioning -> Method : Disabled
System Management -> Auto Provisioning -> OBiTALK Provisioning -> Method : Disabled

or the OBiTALK Web Portal will overwrite the changes you make with its settings.
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 09:14:22 AM
I have followed your instructions and my phone connected to the 110 is working as intended.

10 digit dialing is telco
11 digit dialing is GV.

Am I wrong when I thought I could use other phones in the house connected to the telco line that they could access GV either automatically or by dialling **1? For the life of my I cannot use them to make outgoing calls with GV
Title: Re: PSTN and VOIP Account
Post by: RonR on April 16, 2012, 09:27:23 AM
Any telephone(s) that need to use the services of the OBi, either for placing outgoing calls through the OBi or receiving incoming calls from the OBi, must be connected to the OBi's PHONE Port.

Any telephone(s) connected to the LINE port along with the incoming PSTN Line can only place calls and receive calls through the PSTN Line.

Do NOT connect the incoming PSTN Line to the OBi's PHONE Port as this could potentially damage the OBi.
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 09:54:58 AM
Thanks Ron, I totally misunderstood what the 110 could do. I was under the impression that once the telco line was connected it would allow ALL the PSTN phones to act like the one connected to the PHONE jack of the 110. So if I want a phone to ring in another part of the house I should invest in a cordless system and plug that into the PHONE jack of the 110. Not sure why I thought it could do more. Guess I was not paying close attention.

Thanks for your advice!
Title: Re: PSTN and VOIP Account
Post by: RonR on April 16, 2012, 10:02:10 AM
The alternative is to isolate your incoming PSTN Line from your house phone wiring and connect it only to the OBi's LINE Port.  Then connect the OBi's PHONE Port to your house phone wiring.  All of your house phones will then be on the OBI's PHONE Port and can use all of the services of the OBi AND the PSTN Line.
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 16, 2012, 09:22:16 PM
My solution is to rewire the main phone on the first level to run off the obi. My power bar has a built-in splitter near the 110 so that gives me two phones, one on each level. Those are the phones we use mostly for making long distance calls anyway.
Title: Re: PSTN and VOIP Account
Post by: RonR on April 16, 2012, 09:25:56 PM
Just make sure your PSTN Line is NOT connected to anything that gets connected to the OBi PHONE Port.
Title: Re: PSTN and VOIP Account
Post by: Stewart on April 16, 2012, 09:59:04 PM
From a phone connected only to your PSTN line, you can make a GV call by dialing your GV number.  At the main menu, press 2 to make a call.  This is most useful if your PSTN service has unlimited local calling and your GV number is local to you. (Your PSTN number should be one of the forwarding numbers on the GV account, but you can of course set GV to not actually forward there.)
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 17, 2012, 01:00:05 PM
Quote from: RonR on April 16, 2012, 09:25:56 PM
Just make sure your PSTN Line is NOT connected to anything that gets connected to the OBi PHONE Port.


I isolated that one other phone and have it connected to the splitter which in turn is connected to the PHONE port on the OBi. All other phones are still connected to the PSTN as usual. I would have connected all phones to this port but noticed that when there is no power to the OBi, I don't get a dialtone. Everything is working as expected with a few oddities. I cannot dial "0" to reach the PSTN customer service on the additional OBi phone (rarely do this anyway) but I am sure I can modify my digi map for this. The OBi phone waits a full ring compared to standard phone before ringing when my home # is called (no need to worry, just interesting).
Title: Re: PSTN and VOIP Account
Post by: Wilbour on April 17, 2012, 01:05:21 PM
Quote from: Stewart on April 16, 2012, 09:59:04 PM
From a phone connected only to your PSTN line, you can make a GV call by dialing your GV number.  At the main menu, press 2 to make a call.  This is most useful if your PSTN service has unlimited local calling and your GV number is local to you. (Your PSTN number should be one of the forwarding numbers on the GV account, but you can of course set GV to not actually forward there.)

Great advise but I live in Canada and cannot yet have GV forward to my home number, or cell for that matter. My GV # is for the town where my family lives in the US. That way they never have to pay to call me since the number is local. That being said I do not call my GV # from my PSTN line since it is long distance to start.
Title: Re: PSTN and VOIP Account
Post by: RonR on April 17, 2012, 01:19:37 PM
Quote from: Wilbour on April 17, 2012, 01:00:05 PM
I would have connected all phones to this port but noticed that when there is no power to the OBi, I don't get a dialtone.

The current revision of OBi hardware is missing a relay that used to be present which connected the OBi PHONE Port to the OBi LINE Port in the event of a power failure.

Quote from: Wilbour on April 17, 2012, 01:00:05 PM
I cannot dial "0" to reach the PSTN customer service on the additional OBi phone (rarely do this anyway) but I am sure I can modify my digi map for this.

Physical Interfaces -> LINE Port -> DigitMap : (0|[2-9]11S0|[2-9]xxxxxxxxx|<**1>(1xxxxxxxxxx|011xx.))

Quote from: Wilbour on April 17, 2012, 01:00:05 PM
The OBi phone waits a full ring compared to standard phone before ringing when my home # is called (no need to worry, just interesting).

If your PSTN line doesn't have CallerID or you don't care about the OBi not receiving it, set:

Physical Interfaces -> LINE Port -> RingDelay : 0