I no longer recommend using Asterisk’s Google Voice support — try these methods instead!


This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

EDIT (May, 2018): FreePBX and Asterisk users that wish to continue using Google Voice after Google drops XMPP support should go here: How to use Google Voice with FreePBX and Asterisk without using XMPP or buying new hardware.

This article was originally written in January of 2012, and has been heavily edited in an attempt to update it a bit.

Not that anyone probably cares what I think, but anyone who regularly reads this blog (or any of the other VoIP-related blog that cover Asterisk) may have noticed that prior to the release of Asterisk 11, Asterisk’s support for Google Voice had become less and less reliable over time, particularly for incoming calls. You have to do all sorts of “tricks” to make it work, and these usually involve adding delays that don’t always fix the problem, inconvenience your callers, and possibly cause more hangups as people get tired of waiting for you to answer the phone.

Therefore, I suggest that if you are using a version of Asterisk earlier than Asterisk 11, you stop using Asterisk’s Google Voice support completely. Assuming that you feel you must keep using an older version of Asterisk, I suggest trying one or more of the following:

  1. Use YATE as a gateway between Asterisk and Google Voice. See Using YATE to overcome Google Voice issues in FreeSWITCH and Asterisk, this article and this forum thread on YATE in a Flash, and this thread on YATE Tips & Tricks). YATE is what powers Bill Simon’s gateway (mentioned below). See comments by Bill and pianoquintet under this article.
  2. Use Bill Simon’s Google Voice-SIP gateway to handle your Google Voice calls. Some people may not want to rely on an external service for this, while others may very much appreciate having the option. I mention it for those in the latter group. For more information see Bill Simon’s Free SIP-to-XMPP Gateway Easily Puts Google Voice on Your VoIP Phone (Voxilla). While the linked articles talk about using the gateway with a SIP device, it can be used as an Asterisk trunk.  EDIT: As of April 7, 2015 the Google Voice Gateway has been relaunched and there is now a one-time fee to sign up.
  3. If your only issue is with incoming calls, you could use a DID to bring the calls into your system.  But keep in mind that Google Voice does not like it when calls are answered the moment they connect, so in your FreePBX Inbound Route be sure to set the “Pause Before Answer” option to at least 1.  I have found that a 1 second pause is sufficient, but I’m not saying that is the correct value for everyone, or even that everyone will need to include such a pause (some DID providers may delay the call sufficiently before connecting through to your system that the pause isn’t needed).

At this point, any of those would likely produce better results than using the Google Voice support in any version of Asterisk prior to Asterisk 11.

EVERYTHING in this article is my personal opinion.  Nothing here should be taken as a statement of fact.

EDIT:  Ward Mundy reports that he just may have found a workaround for the incoming calls issue — see this thread in the PBX in a Flash forum.

26 thoughts on “I no longer recommend using Asterisk’s Google Voice support — try these methods instead!

  1. Wow, great suggestion! With the wife working at home, we don’t want to give out the primary number and I have many google voice numbers so I’ll look into setting up one of those numbers for her to make and use as incoming/outgoing.

    1. Thanks for the link, Bill. Maybe it will help someone create an Asterisk <–> Google Voice bridge using YATE.

    1. Will, that’s basically a variation of the method we’ve been using, and it SUCKS for incoming calls. Did you happen to notice this line:

      exten => s,n,Wait(8)

      That’s a big old red flag that things aren’t working as they should. You should never need to make callers wait an extra 8 seconds to get an answer. Some WON’T wait, and even for those who will, it’s just plain rude to waste their time like that. But the worst part is, even doing that doesn’t guarantee that a call will get through. Sometimes it will, and sometimes your phone will ring and when you pick it up there will be no one there, while the caller will still be hearing a ringing tone. If you have the presence of mind to do so, you might still be able to get the call if you quickly press “1”, but obviously it’s NOT working the way it should. With any of the methods I’ve mentioned, to the best of my knowledge you do not have to put up with that kind of nonsense (and I speak from personal experience in the case of #1 and #2).

  2. which one of these methods is the best to do>? also which one takes less time to setup and get going?
    thanks in advance.

    1. nsdemon, if you only have one Google Voice account then I would say using an Obihai device as a gateway would provide the best results, and it is pretty easy to configure. However, if you don’t wish to buy an Obihai device or have multiple Google Voice accounts then I’d give Bill Simon’s gateway a try, particularly if you’re looking for something as easy as possible to set up. FreeSWITCH would be best if you have multiple accounts (or don’t want to buy an Obihai device) and you don’t want to rely on someone else’s gateway. YATE might work better than FreeSWITCH but it would be the hardest to set up, because there are no published instructions for setting it up for this application that completely describe what would need to be done (the only instructions I have found that address the subject at all are these, and I’m afraid that just isn’t quite enough set up a working gateway between Asterisk and Google Voice using YATE).

  3. I have used the instructions at http://www.tuxguides.com/yate-server-free-google-voice-calling/ to create a bridge between Asterisk and GV through Yate and it seems to be working on 100% of the calls. The following were the adjustments I made:

    1. I ignored regfile.conf, as this is not relevant.

    2. I replaced the line for handling incoming calls with the following under [default] in regexroute.conf :

    ${in_line}GoogleVoice=sip/sip:[PUT THE DID ASTERISK WILL EXPECT HERE]@;jingle_version=0;dtmfmethod=rfc2833;jingle_flags=noping

    3 I put the following in ysipchan.conf (not sure if any of these were relevant, as there is no documentation, but it worked):



    [listener general]


    4. I added a pipe before “1” in the line below in regexroute.conf under [call.answered]


    On asterisk’s side, I followed the same instructions for integrating with Freeswitch found here http://www.personal.psu.edu/wcs131/blogs/psuvoip/2010/10/using_freeswitch_to_add_google.html

  4. I am only want to setup one google voice account now, but may want to add more later.
    I looked over the FreeSwitch how to and i think i can do that if i had to.
    would it be goo if i want to add to it later.
    would the Obihai device support more then 1 account?
    i dont mind buying a good piece of hardware and this seems like a good buy.

  5. FreeSWITCH or Yate?

    Although I typically use an Obi100 for incoming and outgoing Google Voice calls, I’ve been using YateClient as a softphone when traveling. And as I wrote before in another thread, I’ve found that incoming Google Voice calls ring YateClient about 100% of the time.

    Given the reliable performance of YateClient (and that it allows for registering unlimited Google Voice accounts), I’ve been contemplating trying Yate server as a bridge between Google Voice and Asterisk. But the lack of easily understandable documentation for Yate has chilled my motivation to get started.

    Now, after reading about using FreeSWITCH as a bridge between Google Voice and Asterisk, I’m wondering: Is there any point in experimenting with Yate? That is, if I use FreeSWITCH as a bridge between Google Voice and Asterisk, will incoming gvoice calls ring through about 100% of the time? If so, then I’ll invest my time into FreeSWITCH and give up on Yate (at least for now).

    So with the above in mind, anyone care to share thoughts on how well (or poorly) the FreeSWITCH approach is working? What are the problems with the FreeSWITCH approach, if any?

    1. GizmoChicken, I would love to see a complete guide to installing and using YATE in parallel to Asterisk. pianoquintet’s comment is a start but it’s not what I would consider a complete walkthrough on installing and connecting to Asterisk, and it doesn’t show how to handle multiple Google Voice accounts.

      But I will just say this: When I first installed FreeSWITCH I thought it had fixed the problem. I still think it is more reliable than Asterisk’s channel drivers, but I discovered it’s not 100% reliable on incoming calls. Unfortunately, I don’t know if that’s because I did something wrong while setting it up, or it’s an actual issue with the way FreeSWITCH interfaces with Asterisk. I’m always mindful that it could be an issue peculiar to my particular installation so that’s why I sort of hoped that others would try it and report their experiences. I think sometimes people give me a little too much credit for understanding this stuff — the truth is that (as I have often said) I am NOT a Linux geek and when something that runs under Linux doesn’t work right, I generally have no idea why, and no clue as to how to fix it. So I am not blaming FreeSWITCH and I am not saying anyone else would have issues — I can only say that it’s not been the ultimate fix that I’d hoped it would be. And the fact that Bill over at the PSU VoIP blog went with YATE for his gateway suggests to me that YATE may be the better choice. I just don’t have enough information on how to set it up on an Asterisk/F—PBX server (not enough to make me feel comfortable enough to attempt and installation). Basically I’m looking for the equivalent of Bill’s page on installing FreeSWITCH as a gateway (as mentioned in the article), but for YATE — in other words, instructions with that same level of detail.

      Sounds like you are in about the same position I am but if you have the time or inclination to get it working, I’d only ask that you try to document what you do as you go along (including any pitfalls you may encounter) and consider adding it as a comment, or posting it online somewhere and posting a link to it here.

  6. I’m the fellow that Bill is referring to on the (second?) post above. I’ve been using YATE w/ Google Voice (GV) on my dockstar for quite some time and in virtually all respects it has worked more reliably and with less maintenance than asterisk.

    Since YATE version 3.0 Yate has been pretty much a turnkey solution with GV. Just follow the link Bill posted earlier. Since my deployment is SIP+GV only I’ve migrated completely from asterisk to YATE.

    For those of you who want to deploy both asterisk and YATE, there really should be no difficulties. Just remember to change YATE’s (or asterisk) SIP port to something other than default 5060 if you are running YATE and asterisk on the same box.

    Keep in mind too that YATE is now a compiled package for openwrt. If you’re only using a IP-PBX for your own household of a few phones you can easily get away with deploying YATE on your router.

    1. In the last couple of weeks asterisk has been handling my incoming calls from GV (including into IVRs) with 100% reliability. I am experiencing this both on a local ARM/Debian squeeze box and on a 686/Amazon Linux EC2 virtual machine. Both have asterisk 10.2.0 installed.

      Because asterisk has not changed since, perhaps GV has done some work to fix the issue.

  7. I was bitching that I won’t buy OBi202 until the price drops to $50; however, I wanted to buy it anyway, in order to have GV / 4 providers. But now that I can have GV on my old SPA… OBi202 will have to wait. Thank you for alerting me to simonics 🙂

    1. Felix, just so you know, you can still use the Simon Telephonics Google Voice gateway with an Obihai device, but with an Obihai device, if the gateway ever goes down or loses its connection to the Internet for some unforeseen reason, all it takes is a simple configuration change on the OBiTALK portal to go directly to Google Voice. Whereas, with your old device, if the gateway goes down, you completely lose service and there is nothing you can do about it.

      This may or may not be a small thing, depending on how reliant you become on your Google Voice service. Please keep in mind that “stuff happens” even with the best of intentions. As I write this, the servers at DSLreports.com are just slowly coming back up (and there is almost a year and a half worth of messages still missing). They’ve been down or operating in a very limited mode for about two weeks mow. If a big organization of networking experts can have that kind of issue, you have to wonder what the result would be if the single server operating the Simon Telephonics Google Voice gateway goes down. While I grant that it probably wouldn’t take too many days to bring it back up, you’d still be without service for however many hours or days it takes, unless you have some alternate way to connect to Google Voice. I have no way to predict how reliable the gateway will turn out to be, and I’m certainly not attempting to discourage anyone from using it, but I am saying that if you have an Obihai device you do have an additional option to connect to Google Voice should the gateway ever go down or become inaccessible from the network.

      I’ve had to deal with server failures in the past, where the servers were run by someone else. The fact is that if the operation of that server isn’t their day job, so to speak, then when it goes down, restoration gets a much lower priority (and if it’s a network connectivity issue, it may be entirely beyond the server operator’s control). So, it’s always good to have a fallback plan in the event that things go wrong!

  8. Pingback: Bill Simon’s Free SIP-to-XMPP Gateway Easily Puts Google Voice on Your VoIP Phone
  9. I am, for the first time ever, having problems receiving GVoice calls using Yate Client. (I can still have no problems making outgoing GVoice calls with Yate Client.)

    Anyone else having problems receiving GVoice calls using Yate or Yate Client? Is FreeSwitch still able to receive GVoice calls? I’m wondering if Google has made more changes.

    I’ll just note that the above mentioned problems with Yate started at about the same time that I began having problems with my Obi100, which I reported elsewhere. Don’t know if the problems are related.

  10. Updating my previous post…

    Yate does NOT seem to the source of the above described problem. I say this because, upon disconnecting my Obi100, and thereby disconnecting my Obi100 from GVoice, Yate once again answers incoming GVoice calls flawlessly. So the problem seems to be with Google and/or Obi.

    I’ll just note that, in the past, my Obi100 didn’t interfere with Yate. That is, in the past, I could be logged into GVoice with both Yate and my Obi100, and could answer a call with either. So something has changed, probably at Google.

  11. Pingback: Need Google Voice for Your VoIP Phone? | VoIP Insider
  12. Another Google Voice Gateway: Not free, but I found a coupon over at Web Hosting Talk: WHT4GV with that coupon it’s $2/mo, unlimited channels, they claim they completed 3 simultaneous connections, and “We successfully tested three simultaneous calls, perfectly from an asterisk based PBX, we believe more connections would be possible, but have not done further investigation to the limits of Google’s XMPP (Google Talk) Services. “.

    I think I’m gonna signup for an account today, I’ll let u know how it goes.

  13. I just finished setting up the Tropo developer account for incoming calls to Asterisk and then pointed my GV number to it. Maybe not the most elegant solution, but it is working perfectly! I was using Ipkall with a similar setup but had no caller id (all calls were showing coming from the same number). This solution is great and I even got a local number. Just hope they keep the developer account open and free! Thanks for the guides!

  14. thanks everyone.. I was able to install Yate on Raspberry Pi and associate GV account to it and make/receive calls succesfully. My next step is to integrate CallerID superfecta sort of thing into this mix – Got any ideas?

    As of last night, I succesfully installed OpenWRT on my Netgear WNDR3700 router. So I will try out installing Yate on it and ‘free up’ RaspPi for some other purpose..

    Thanks again!

  15. NOTICE: All comments above this one were imported from the original Michigan Telephone Blog and may or may not be relevant to the edited article above.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

Recent Comments




GiottoPress by Enrique Chavez