Review of the Obihai OBi110 VoIP device, Part 4: How to use the OBi110 as an FXO port with Asterisk and FreePBX

This article has been moved. Please click here to read it.


  1. Bill said

    OK, here’s the million-dollar question for me. Can it act as a Google Voice VoIP gateway, without connecting it up to another ATA to do an analog bridge? In other words, it connects to GV, and it connects to Asterisk, so that I can remove the GV configuration from Asterisk and have the Obihai do all the talking to and from GV?

    I see a lot of Asterisk people going wild for this device but other than the GV connectivity I am not seeing the benefits over any other low-cost ATA. What am I missing?

    If it can do what I asked in the first paragraph, that’s gold. But I haven’t seen that described anywhere.

  2. (EDIT: The answer to Bill’s question is “yes”, and the instructions are in How to use the Obihai OBi100 or OBi110 VoIP device as a gateway between Asterisk/FreePBX and Google Voice and/or the OBiTALK network. But I hadn’t yet written that article when I wrote this reply and the next one.)

    Bill, if you’re going to run Asterisk anyway then I personally think you’re better off using Asterisk’s built-in Google Voice support, assuming you are running Asterisk 1.8.2 or later. If you are running an earlier version of Asterisk and don’t want to upgrade, then in that case an OBi110 might well give superior results.

    Now, your question is whether you can send a call to the OBi110 and route it to Google Voice rather than the Line port. I am 99.9% sure that you can (and if anyone could figure out how, I’m sure it would be you!). My first guess is that if you had Google Voice enabled as Service Provider 1, and you used the instructions in this article to use Service Provider 2 as a trunk to Asterisk, then you could simply replace the references to “LI” with “SP1″ (or just “SP”, since 1 is the default if you don’t specify), and of course you wouldn’t need to mess with the Line port settings. You might have to tweak a couple other configuration settings but after seeing some of the things you’ve done recently, I have no doubt whatsoever that you could make it work. In fact, you might even be able to do it with the OBi100 when it comes out, since you wouldn’t actually need the Line port.

    This unit has a LOT of flexibility in how you can route things – I don’t even pretend to understand it all. But let me quote a couple portions of an e-mail I received from Sherman Scholten at Obihai:

    … with the OBi110 (and OBi100), you can do an in-and-out call on the same SP (SP1, SP2). This is really nice for ‘hair pin” calls given we have the trusted PSTN numbers that can route directly to AA in the InboundCallRoute. This is not so useful with GV for two reasons. The first being they only support one call. The second being they can do this “in the cloud” already. However it is very useful for customers of ITSPs like Callcentric,, VoicePulse, etc.

    … [Using the OBiAPP] we can now do a single-stage call via an OBi device acting as a gateway. The ICR of the OBi (OBiTALK Voice Service) will have a rule that can route a call from a trusted OBiTALK endpoint directly to another service (SP1, SP2, Li1). The OBiAPP in the web site has this now, and we will release the iPhone and Android version soon (with announcement).

    {290654321>(xx.):sp2} is in the OBiTALK voice service InboundCallRoute

    So, if you use the new app release, you can dial the OBi110 (200123456) from this OBi soft client 290654321 and one stage dial a PSTN number to SP2 (GV).
    From the OBi soft phone you dial one of the two following ways.

    Or (if the gateway OBi110 has a speed dial of 8 ) 8141555551212

    Unfortunately I can’t use the OBiAPP because the current version is Windows only, and I don’t have an iPhone or Android phone so I won’t be able to run those versions either. I’ve been gently nudging them to at least make the current OBiAPP version compatible with WINE and/or Codeweavers Crossover so that we Mac/Linux users could run it (right now the installer throws up an error message under Crosssover). But I mention all that just to note that I don’t think I’ve really even scratched the surface of the hidden capabilities inside this unit. If someone really understood it (the way the designers undoubtedly do, but probably few others), I suspect you could do a lot of useful tricks with it. Once people smarter than I get their hands on these, I think you’re going to see a lot of useful applications.

    Remember that when Asterisk first came out, most people didn’t “get it” at first, and had a “so what’s it good for?” type reaction. I suspect there’s going to be a similar curve with this unit – once users start to build a knowledge base, people will have a much better understanding of what this unit is capable of.

  3. Bill, in giving it a bit more thought I realized it would be incredibly easy to do what you want.

    Assuming that you have set up a Google Voice account on Service Provider 1 as described in Part 1, and that you have set up an Asterisk trunk on Service Provider 2 as described in this article, you need only make TWO changes:

    Go to Voice Services, SP1 Service, and change the value of X_InboundCallRoute from ph to SP2
    Go to Voice Services, SP2 Service, and change the value of X_InboundCallRoute from LI to SP1

    That’s it! When you make an outbound call from Asterisk through your OBi110 (or probably the OBi100, when it comes out) trunk it will loop around and go out to your Google Voice account. Of course the Caller ID will be that of the Google Voice account.

    When a call comes in from Google Voice, it will loop around and go to your Asterisk trunk, and from there to wherever you send incoming calls in your Inbound route. I actually tested this setup briefly and it worked great!

    Note that either of these could operate independently of the other. And also note that X_InboundCallRoute can hold a lot more complex routing instructions than just a simple reroute. It would be entirely possible, for example, to have Asterisk send certain calls out with a prefix (such as **8) to say that those calls should be sent to the Line port (LI) rather than SP1, and then intercept the **8 code in X_InboundCallRoute and direct them to the Line port. Or you could even set it up on your Asterisk server so that if someone dials 00 plus and OBiTALK 9 digit number, your Outbound Route would send that to the OBi110 trunk, which would pass it through to the OBi110, and in the X_InboundCallRoute you could strip off the 00 and then send the call via the OBiTALK network.

    You’d want to spend some time in the “OBi Call Routing and Digit Map” section of the OBi Device Administration Guide to figure out how to do these kinds of tricks, but they are entirely possible.

  4. Bill said

    Thanks for the information. I’m tempted to get the 100 model when it appears, just to experiment with some of this off-box call routing.

  5. I’ll just point out one other thing: I’ve published a couple of additional articles, the titles of which should be self-explanatory:

    How to use the Obihai OBi100 or OBi110 VoIP device as a gateway between Asterisk/FreePBX and Google Voice and/or the OBiTALK network

    How to use the Obihai OBi100 or OBi110 VoIP device as a gateway between Asterisk/FreePBX and Google Voice and/or the OBiTALK network — Part 2: Using the Phone port as an Asterisk extension

    However, it occurs to me that there’s no technical reason you couldn’t do a full “trifecta” with the OBi110 — that is, use it as a gateway between Asterisk AND the OBiTalk Network, a Google Voice connection, AND a PSTN-type line — and still use the phone port as an extension off the Asterisk server. You’d have to reconcile the three articles and use parts of each (for example, from this article you’d use the Line port settings) and you’d have to figure out how to map your outgoing calls, depending on whether you wanted them to go to PSTN line or to the Google Voice connection (or to the OBiTALK network). There are a number of ways that the latter could be done, but it’s certainly possible once you understand how all this works.

  6. Ray S said

    I have the pure dsl product from Centurytel in Missouri (I can only dial 911, all incoming calls are free). i had planned on using the call back feature from Google Voice to make free calls, however, it is impossible to verify the number when GV calls to verify the number, their system will not accept the verification codes, I entered, (believe me I’ve tried many methods). I was able to get GV to forward calls to my almost naked incoming dsl line by spoofing that number to set up a temporary forwarding number (but no call backs from GV to temp numbers).
    How do these restraints mesh with the obi100 or obi110 devices?
    I use a Skypeout number on a linksys iPhone (no longer available) and the voip is awful with that device, Skype on my computer is pretty good. Is the voice quality on the Obi boxes closer to Skype on the computer or Skype on the linksys iPhone (under water bad)?
    Would the OBi110 be a better choice if I could plug the incoming landline into the phone jack on the device and be able to receive the incoming landline calls through that jack?
    Ray S

  7. Ray S – without commenting on how well any VoIP device will work with Centurytel DSL (because I honestly don’t know), I will tell you that an OBi110 should do what you need it to do. You can directly access Google Voice, so incoming and outgoing calls should be no problem (you don’t even need the Centurytel line for those), and there’s no verification call needed (assuming that you already have an active Google Voice account, which I’m assuming you do). If someone dials your Centurytel number (and you have the incoming line connected to the LINE jack on the device, NOT THE PHONE JACK), it should ring your phone that’s connected to the PHONE jack. And if you dial 911, by default that will go to the LINE jack connection because Google Voice doesn’t support 911, so they route 911 calls to the LINE jack by default. So in short, once you get your Google Voice account configured, I am fairly certain it will work exactly the way you need it to, unless I’m not completely understanding your questions here.

  8. Ray S said

    Thank you, I believe you understood my convoluted question nicely, and I applaud you for that. Your explanation helps and I’m going to order the OBi110.
    Thanks again for a well written explanation setting up the many options, I love digging into these things, there is a lot to learn.

  9. RobF said

    After reading this I’m thinking my approach is the right one but I’m not quite able to get things working properly all around.

    I’m doing things a bit differently using SP1 in the obi for my FXS registration since I’m managing GV from my asterisk server. I have the FXS registering as an extension and that appears to be working as I can call it from a softphone on my pc.

    My goal is that asterisk manages the trunks and the extensions so I want to set the obi to register the FXO as a trunk and the FXS as an extension.

    Part of that appears to be working as I can dial other extensions from the FXS endpoint and asterisk shows the sip peer as registered. As I said, I can also dial that extension from a pc based softphone.

    If I dial my POTS line from a cell phone then my FXS port rings as I have set an inbound route for that extension. So inbound seems to working properly too.

    The problem occurs when I try to dial out. Asterisk doesn’t appear to match the outbound route… or so it seems and it ends up at the IVR saying “Please wait while we find someone to take your call” and then ext 701 rings…

    So dialing out the of the POTS trunk is failing at this point.
    I only have 2 extensions configured and whichever I try to dial out with the pots trunk the other one ends up ringing after the “Please wait while…” message.

    Strange, but I’m still digging.

    Many Thanks.

  10. Rob, my initial impression is that it sounds like you are going into a queue, or perhaps a ring group. Do you have any queues or ring groups set up? Could there be a conflict between the number you are trying to call and the number associated with a queue or ring group?

  11. RobF said

    double checked my settings and restarted after tweaking things like disabling unused trunks as the CLI showed it was always trying to use GV trunk even though my route for pots is first.

    When I try to dial out at this point I get “all circuits are busy now”
    I have max channels set to 1 and the context to “from-trunk-sip-trunk_name” as you have indicated in the article.

    inbound seems to work fine… haven’t done any quality tests yet.
    pots line works great if I move back to my production box with a TDM400 and dahdi.


  12. Martin said

    You can set this up without using the peer settings on FreePBX. Replace the items below in {} with the thing described inside the {}.

    Trunk Name: TENDIGIT##

    NOTE: Using the 10 digit number you specified in the Obi as the trunk name is critical! It won’t work unless you make it match!

    Peer Details:

    If you use these settings, the USER details are not necessary.

    P.S. I’d love to take credit for this, but I stole it from the SPA3102 configuration I found at the Freepbx site.

  13. Martin said

    P.S. It turns out you can leave out the Port=5061 as well.

  14. Adrian said

    I just saw the link to my blog from your site. Thanks!!!!

  15. Martin said

    A couple more important points.

    If you use your ten digit phone # as the trunk and user name, it appears to interfere with inbound routing of calls that come in using that ten digit # as the caller ID. So, it’s better to use a word, such as “OBITRUNK1″ as the Trunk Name, Username, etc. in the FreePBX Route and in the Obi configuration settings. The only place you should use your ten digit # in the OBI settings is in the dial plan area and the only place you should your use ten digit # in FreePBX is in the inbound route DID area.

    Second, change the context to “from-trunk-sip-OBITRUNK1″ so that inbound calls count against the trunk maximum.

  16. RobF said

    I have things working properly for the most part. Call routing is all working perfectly. My POTS, GV number and OBiTalk numbers route in to asterisk and land in the right place. Outbound is working great too.. Many thanks for the valuable posts here that allowed me to get that working.

    The one case that is NOT handled properly is when a call comes into the OBI110 from the POTS line WITHOUT any callerid data. The obi routes as expected to asterisk which is correct. The problem is that Asterisk puts the trunk name in the callerid field before routing back to the obi…. I am assuming because its blank. As stated it properly routes the call back to the obi and to the Phone port there. The problem is that it sets the callerid to the trunk name … Whether I had the trunk set to one of my DIDs on the obi (GV or LINE) or OBITRUNK1 asterisk would “fill in” those values as the callerid when sending back to my PH extension on the obi. So the phone shows a callerid of either my GV number or my POTS line number or the actual Trunk Name set in the trunk.(depending on how I set the obi to login in the incoming context)
    If callerid is provided on the incoming POTS call then that is sent to Asterisk and its handled properly either by blacklist, incoming routes etc and if forwarded to my phone extension on the obi then the callerid is displayed as expected.

    Has anybody else seen this?
    I would prefer that asterisk catch this and allow me to route based on no callerid. Not sure what inbound route I would need but presumably that is where I would deal with this corner case.

    Many Thanks,

  17. RobF, are you saying that if the trunk name is OBi110 that Asterisk puts that in the Caller ID NUMBER field before routing it back to the OBi? I guess I’m not quite certain of what’s happening here, but here are a few thoughts.

    First, inbound routes can route calls on both the DID and the Caller ID. The mouseover for the Caller ID Number field states:

    Define the Caller ID Number to be matched on incoming calls.

    Leave this field blank to match any or no CID info. In addition to standard dial sequences, you can also put Private, Blocked, Unknown, Restricted, Anonymous and Unavailable in order to catch these special cases if the Telco transmits them.

    So if you are getting any of those “special” strings you could match on them. Unfortunately, as shown above, Inbound routes treat “any” or “no” CID info exactly the same way.

    Now suppose you added a context in extensions_custom.conf (this is UNTESTED so I’m not sure if it would work):

    exten => _X!,1,GotoIf($["${CALLERID(num)}" != ""]?hascontent)
    exten => _X!,n,Set(CALLERID(num)=UNKNOWN)
    exten => _X!,n(hascontent),Goto(from-trunk,${EXTEN},1)

    Then if you changed your trunk context statement to point to from-trunk-obi, it should go to that context, where if there is a “nothing” sent as a Caller ID number, it will change it to UNKNOWN, which is one of the special strings that you could match on.

    Might be worth a try, anyway.

  18. robfreyder said

    Thanks for the prompt reply.. I’ll try your suggestion.

    I wasn’t matching on CID just the DID which is working fine in terms of routing the call.( I’m matching ANY CID)
    I’ll test and let you know what I find.

    many thanks.

  19. Martin said

    Okay, so I found that with my prior configuration, I was occasionally getting a situation where the OBI 110 would reboot when I tried to make an outgoing call. I’ve tinkered some more and I think I have it working. Here’s what I’ve got.

    Trunk Name: OBITRUNK1 (NOTE: This must match AuthUserName and words before @ in URI in OBI device). DON’T USE TEN DIGIT # here, or inbound calls from that number to other trunks will fail.

    Maximum Channels: 1

    Peer Details:


  20. Phil said

    I’m probably repeating a question, sorry, but I read a little on this box at the Amazon site and it appears that you are required to enter your Gmail address AND password into OBi’s website.

    Am I correct and does anyone have an issue with that. I don’t want anyone knowing my email password.

    Thanks, these are excellent reviews.


  21. If you enter your password into the OBiTalk portal, it only uses it to send to your Obi device and then does not save it anywhere on the site (unlike your other settings). If you’re really paranoid about it, you could just insert a dummy password (so it will go ahead and configure the device with the proper settings), then directly access the device’s built-in web portal and enter the correct password and save it.

    But, that aside, I recommend you get a different Gmail account (that you do not use with normal e-mail) for use with Google Voice. Otherwise you run the risk of not getting calls while you are logged into Gmail. If you are careful not to log into Gmail at times when you might be expecting calls AND you always log out when finished reading your mail, or if you use an e-mail client (such as Thunderbird) to get your e-mail via POP or IMAP, then it’s not as much of an issue.

  22. [...] my research, I found this great review over at Part 1, Part 2, Part 3, Part 4. Part 3 covers how to get 911 service, which you don’t get with Google Voice. That’ll [...]

  23. HoangNguyen said


    I just bought obi110 last week. I followed instruction from youtube. It is easy to setup but i didn’t see more information. I did the search and found this website. I have some questions and I hope you guys can answer.
    If GV is ended, can you use NetTalk or Magic Jack service to put in Obi110?
    Do you know any other VOIPs (like NetTalk and Magic Jack) which I can use on Obi110?

  24. No, the OBi110 won’t work with the two specific services you mentioned (they both use their own devices). It will work with the following providers:

    Google Voice

    The OBiTALK portal provides easy configuration for all of the above. If you wish to use the device with a service not shown here, you can probably set it up using the Generic Service Provider option, assuming the service you are using allows you to “bring your own device”. For example, a guy in this thread says he has used an Obi110 with Voipo, Viatalk and (presumably not all at the same time). So there will be plenty of other ways you can use your OBi110 if Google Voice service comes to an end (which I consider rather unlikely anytime soon, barring some sort of natural disaster or other unanticipated calamity).

  25. HoangNguyen said

    Hi michigantelephone,

    I didn’t expect you replied so soon. Thank you very much. I try to find a cheap VOIP service to replace GV when it is ended. Majic Jack and NetTalk seem to be the cheapest one which can call Canada for free.

    I setup the my Obi110 as a gateway to dial out to Canada. I added my parents’ number to “trusted phone #” and they can use this box to dial out to Canada. I use my Iphone, which has Obion apps installed and had its softphone Obi number, to dial to my Obi110 number but AA of Obi110 doesn’t pick up; however, I did add my Iphone softphone Obi number to trusted phone # in my Obi110 box. How do I configure the Obi110 so that AA can pick up the incoming numbers which they are regular phone numbers (Land Line or cellular phone) and Obi #? I know I can configure the Obi110 from its IP address. I can switch AA to ObiTalk but if I do, the AA of the box doesn’t pick up on regular phone #. Please advise. I am new to VOIP technology. I apologize if my words may confuse you. Thanks again.

RSS feed for comments on this post

Comments are closed.


Get every new post delivered to your Inbox.

Join 136 other followers

%d bloggers like this: