Using an OBi ATA as an FXO port or Google Voice trunk for Asterisk or your IP Phone

July 22, 2012
If you need an FXO card for your IP PBX, expect to pay hundreds of dollars for a good one. But what if your PBX doesn't have expansion slots, or is in a different location from your POTS line, or your project is for home/small office use and you require a device that works just as well for a fraction of the price? You're sure to be delighted with an OBi110. If you wish to add Google Voice to your call routing, any OBi ATA will be more than up to the challenge. Setting up your OBi110 as a SIP trunk is easy, and when we're done, the device will still function as an ATA. The following example is based on routing Google Voice calls to and from an IP phone, however the technique is the same for any scenario described above. Let's assume SP1 is configured for SIP using ITSP Profile A, and SP2 is configured for Google Voice. First let's set up a DigitMap that we'll name Trusted. In it, you should include the usernames of all peers that are permitted to make calls in this way, enclosed in single quotes. User Settings >> User Defined Digit Maps:
Label: Trusted DigitMap: ('MangosSPA921')
Next, let's configure SP1 to route calls from trusted peers via Google Voice. The CallRoute below says "if we receive any calls from a peer that is in the Trusted DigitMap, and the peer is attempting to call a number specified in the SP2 DigitMap, route the call via SP2. Otherwise, route the call to the phone port." Voice Services >> SP1 Service:
SP1 Service >> X_InboundCallRoute: {(MTrusted)>(Msp2):sp2},{ph}
Note: If you're using this technique to route calls to a SIP provider, you may need to use this alternate technique: Voice Services >> SP1 Service:
SP1 Service >> X_InboundCallRoute: {(MTrusted)>(Mtg1):tg1(Your_AuthUserName_here>$2)},{ph}
Finally, we may set SP2 up to route incoming calls to MangosSPA921. In this example, MangosSPA921@192.168.0.9:20921 is a valid SIP URI for Mango's IP phone. The CallRoute below says "when an inbound call arrives, fork it to both the phone port, and also Mango's IP phone via SP1." Voice Services >> SP2 Service:
SP2 Service >> X_InboundCallRoute: {ph,SP1(MangosSPA921@192.168.0.9:20921)}
If you have problems with calls dropping, set the following: ITSP Profile A >> RTP
KeepAliveInterval: 30
Note that since there is no authentication employed here beyond the username, you should use other techniques for security. For example, configure your firewall so that only machines with trusted IP addresses may access your OBi ATA. Or, keep all your devices on a LAN behind a restricted cone NAT router. Now, Mango's IP phone will be able to make and receive calls via Google Voice.