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

Main Menu

Complex outbound call account routing GV Obi202

Started by PDX_Mark, October 21, 2020, 02:14:03 AM

Previous topic - Next topic


I have an Obi202

It has 3 Google Voice accounts configured and one trunk to my asterisk.

SP1 is GV1 my primary GV line (area code 503 Oregon)
I make calls from asterisk and use SP1 on Obi 202 as a Go - between GV/asterisk. Port 1 works as a back up for inbound/outbound calls if asterisk should fail or I need to make major changes. SP4 is the connection to asterisk

SP2 is GV2 My Dedicated GV Fax line
Fax Machine is connected to Port 2 and is a dedicated fax line using Obi202 port 2

SP3 is GV3 My second  GV Voice Line (area Code 360 Washington)
I have Port1 configured to automatically use this account when dialing into Area Code 360, while all other calls made on port 1 use SP1. I would like this to be available to asterisk when dialing 360 area code numbers.

SP4 dedicated 2 way trunk to asterisk (IP Auth)

What I have tried:

I have tried adding the following to dial plan on SP1 and SP4 which works for calls made from Phone Port1 , but not calls that come in to SP4 account from asterisk.

I have also tried sending the dial string from asterisk **31360xxxxxxx (this should dial **3  to select port 3  then the number 1 360 xxx xxxx on the selected port.

I can do this from a phone on port 1 but not from asterisk

I would imagine that there is something I am missing.

I can see that asterisk properly sends the call.

Any ideas?



There is a processing difference between calls made from the Phone Port and Asterisk.

Calls from a phone port are automatically validated by the Phone Digitmap then routed by the Phone OutboundCallRoute. "**3" is added during validation then routed to SP3. See "**3" code in the OutboundCallRoute.

Calls from Asterisk are only processed by the SP4 X_InboundCallRoute. Remove your code then add following  to the inbound route:


No that does not work. Call is not completed. Any other ideas?

Got SIP response 486 "Busy Here" back from

It seems however that is where I need to add it...
If I put sp1 in there calls route to GV1 account on SP1.
If I put sp3 in there , calls route to GV3 on SP3.

Documentation I find about call routing via  X_InboundCallRoute refers to routing via Caller ID, not destination.

I think probably though it is a matter of getting the syntax right.


My mistake. Try this:


That does work at first but seems to be quite unreliable


O had some reliability issues with the method posted here. Sometimes calls just do not connect.

On the alternative aybe it would be better and I could manage it from asterisk by using a prefix

say default 1NXXNXXXXXX always uses the default account SP1/GV1

calls prefixed with 0001 (sent as 00011NXXNXXXXXX) sebt to obi where 0001 is chopped off and call is sent to SP3/GV3

So this is a prefix string replacement or replace with nothing.


What happens when the call fails? Does the call ring or just fail? Does this happen to a specific number or all numbers? Check the OBi202 call history to see if the call is routed correctly.

I doubt adding a prefix will make a difference. The following will route "0001" prefix to SP3, all other numbers routed to SP1.