Quote from: justin on February 24, 2011, 04:38:41 PMWhat I need to have working is:
Incoming POTS calls from line port to Asterisk
On your OBi110, check your settings under Physical Interface, Line Port. For the InboundCallRoute put SP2 and then in parenthesis the 10 digit number of your PSTN line. And make sure the RingDelay value is set it to 3500 (you may be able to cut that back to 3000 or even a bit less after you get it working, depending on how long it actually takes to reliably receive Caller ID). Then, make sure you have an inbound route for the same 10 digit number, and also that in extensions_custom.conf, in the [custom-from-obi] context, you add a line at the top for the PSTN line - where in the article it shows you to do this:
[custom-from-obi]
exten =>
9-DIGIT-OBiTALK-NUMBER,1,Goto(from-trunk,${EXTEN},1)
exten =>
10-DIGIT-GV-NUMBER,1,Goto(from-trunk,${EXTEN},1)
Right under that, add a line like this:
exten =>
10-DIGIT-PSTN-NUMBER,1,Goto(from-trunk,${EXTEN},1)
You need the exact same ten digit number in all three places (InboundCallRoute on the OBi110, the DID field of your Inbound Route in FreePBX, and the above context line) for it to work.
Quote from: justin on February 24, 2011, 04:38:41 PMOutgoing Calls from asterisk to GV. with 911 going to POTS.
This is where it gets a bit more complicated, because there are several things that all need to be right for it to work. You need a proper Outbound Route, that selects the OBi110 SIP trunk you should have created. If you have those two things, and your SP2 X_InboundCallRoute is as you show, then calls should go out the Google Voice trunk. If you want to divert 911 calls to the LINE port, then you should be able to change your SP2 X_InboundCallRoute to this:
{>(911):li}, {>(202):ph}, {>(1xxx xxx xxxx):sp1}, {>( xxx xxx xxx):pp}
HOWEVER you will also have to make sure that you have an Outbound Route in FreePBX that actually sends your 911 calls to the OBi110 trunk. From what you've shown me so far and what you've said works, I tend to think your trunk is okay and your OBi configuration may be okay, but you don't have your Outbound Route(s) set up correctly. That's why it can be very helpful to watch the Asterisk CLI while actually trying to place a call - you can see the path the call is taking and you can see if it's ever reaching the trunk. And remember, once Asterisk has seen a pattern match in any outbound route, it will never look any further, so you have to be careful how you have your Outbound Routes prioritized and that you don't have a pattern that
could match the number called in a higher Outbound Route - if you do, the call will use that route and never get to the one you want it to use (even if the call ultimately fails on that route).
Hope that helps!