Home » Technology » Audio » Tweaking Asterisk for Free Google Voice Calling

The Most Versatile VoIP Provider: FREE PORTING

Tweaking Asterisk for Free Google Voice Calling

Lips from Google Now that the Asterisk® and Google Voice marriage is finally underway, we wanted to step back today and revise the original methodology a bit to take advantage of some of the terrific comments which were offered in response to our last article. First, the good news. U.S. calls through Google Voice using Asterisk work! They sound great, and they're free. The not so good news was that the MeetMe conferencing trick to join your outbound call with the Google Voice click-to-dial return call from your destination worked great so long as a real person answered the phone. But, if an answering machine picked up or no one answered the call at all, there were problems because these calls already had been transferred to the MeetMe conference and there was no simple way to disconnect them. And the need for two DIDs to support a single Google Voice interface just seemed a bit wasteful.

9/1/2010 Update: A good bit has changed with Google Voice since this article was first published. For the definitive guide and installation procedure, we highly recommend The Incredible PBX and accompanying article which can be found at this link. Google Voice (and much more) already is included in our new PBX which is literally Plug-and-Play. If you prefer to roll your own, be sure to also have a look at this excellent update on the Michigan Telephone Blog.

Today we want to try to eliminate these two quirks while stiill providing a seamless interface between Google Voice and Asterisk. We also appreciate that thousands of you already have implemented the previous approach. So we want your transition to the new way of doing things to be as painless as possible. On the other hand, for frequent readers, we hope you'll bear with us as we repeat some of what already has been covered in previous articles so new visitors don't have to jump around between articles to get the complete picture of what we're trying to accomplish.

The objective remains the same. We want a methodology that lets us make outbound calls from any Asterisk phone using the Google Voice service to take advantage of free calling in the United States and Canada. And we want calls to our Google Voice number delivered to our Asterisk system for transparent call processing. Yes, SIP is still on our wish list for both outbound and inbound calls with Google Voice, but we'll make do with PSTN calls particularly while Google is footing the bill for all of the calls.

Update: There's now a turnkey Asterisk solution that implements Google Voice calling without getting your hands dirty. Check out our new Orgasmatron V.

Tweaked Design. Here's the new design. You obviously still need a free Google Voice account. If you don't have one, you can request an invite here. At last report, it's only taking a few days from application to invite which is really great news. Don't use a space in your Google Voice password! Once you have a Google Voice account and phone number (Google has reserved a million of them so... not to worry!), then you'll need a DID that provides unlimited, free incoming calls. Once you get your DID set up on your Asterisk system, we'll set up a forwarding phone number for this DID in your Google Voice account so that Google Voice calls can be connected to your Asterisk server.

For outbound calls, we'll combine a little dialplan voodoo with pygooglevoice to instruct Asterisk to place a click-to-dial call using your Google Voice forwarding number. Then we'll stuff in the destination U.S. phone number. When you dial GV-678-1234567 from any of your Asterisk phones, Asterisk will park your initial call in a reserved parking lot slot and then join the called party to the originally parked call. The entire procedure is virtually transparent both to the caller and the callee. And, unlike the MeetMe conference, the parking lot fades out of the picture as soon as the call is connected. Thus, if either party hangs up, the active channel for the call is terminated on your Asterisk server.

For inbound calls from your Google Voice number, we'll tweak the dialplan so that it can distinguish between a RingBack call that Google Voice initiated and a true inbound call. We'll peel off the real inbound calls and route them to a separate Inbound Route in FreePBX for processing in any way you desire.

Finally, for those that implemented the methodology in our previous article, we'll walk you through the steps to revise your existing setup to take advantage of these new tweaks. You can skip over the initial installation process if you already have gone through the Google Voice setup from our earlier article. Just skip down to Tweaking Previous Setups.

Special Thanks. At the outset, we again want to express our sincere appreciation to Jacob Feisley and Paul Marks for their pioneering work on a Python interface to Google Voice. We also stumbled upon another Python development project, Google Voice for Python. While we originally had planned to rely upon Jacob and Paul's script, we ultimately decided to implement pygooglevoice because of the additional flexibility it provided for down the road. With pygooglevoice, you not only can make Google Voice calls, but you also can send SMS messages with no muss or fuss. Jacob Feisley has now joined that project as well. So, our special tip of the hat goes to the entire Google Voice for Python development team. It's a terrific product as you will see.

Prerequisites. Today's setup requires a CentOS-based Asterisk aggregation with a current version of FreePBX. Be aware that today's solution requires Python 2.4 or higher and reportedly will not work with Python 2.3 found in some Linux distributions. We've tested everything with PBX in a Flash and, on that platform, you're good to go. The install script should work equally well with the other CentOS-based Asterisk aggregations, but we haven't tested them. Be our guest, and let us know if you encounter any problems. Finally, a word of caution. We don't ordinarily distribute solutions using development tools we don't use. Our knowledge of Python wouldn't fill a thimble. We've made an exception today because of the extraordinary interest in Google Voice by the Asterisk community. But, if something comes unglued, we can't fix it. So have a backup plan in place just in case. πŸ™‚

Today's Drill. To get everything working today, there are six steps: (1) obtaining and configuring a DID to manage calls between Google Voice and Asterisk, (2) configuring a Google Voice forwarding number for this DID to manage your outbound and inbound calls, (3) configuring FreePBX to route all outbound calls with a GV prefix to your special Google Voice dialplan context, (4) configuring an inbound route to manage incoming calls from your Google Voice number, (5) setting up a series of Parked Call extensions, one of which will be used to manage your outbound Google Voice calls, and (6) running our install script which adds the dialplan code for Google Voice calling with your credentials and puts the Python application into place on your server. It sounds more complicated than it is. So hang on to your hat. Here we go!

Dedicated DID. Before you can use Google Voice with Asterisk, you'll need a DID that can be dedicated to your Google Voice interface to Asterisk. We'd recommend a free IPkall or SIPgate DID. To get started, use one of the links above to obtain and configure the DID. Temporarily point the DID to an extension on your Asterisk system that can be used to verify your requests for the number. Since all of these calls are free, the area code of the DID really doesn't matter because you're never going to publish the fact that it exists.

The easiest method for setting up the DID is to first create a SIP URI for the DID on your Asterisk system. Next route the SIP URI to an Inbound Route in FreePBX where you can manage the destination for calls to that DID. Initially, you want the destination to be an extension on your Asterisk system that you can answer to verify both the DID setup and the GV setup below. Finally, point the DID you obtained to the SIP URI defined above.

HINT: The entry in extensions_override_freepbx.conf would look something like this for a SIP URI called ipkall-1:

exten => ipkall-1,1,Goto(from-trunk,${DID},1)

Then you would create an inbound route named ipkall-1 using FreePBX and designate some existing extension on your server as the destination for these inbound calls.

When you set up the SIP forwarding for the DID at ipkall.com, you'd specify the SIP URI as:


We've previously covered in detail how to do this so read the article if you need a refresher course. To reiterate, the area code of this DID really doesn't matter because you're never going to give out the number. So use one of the free sources and save yourself some money. The real trick is you want to use a DID with unlimited, free inbound calls. Both IPkall and SIPgate provide that functionality at no cost.

Google Voice Setup. Log into your Google Voice account and click Settings, Phones, Add Another Phone. Add the area code and phone number of your DID. Be sure the DID is pointed to an extension on your PBX that you can answer since you have to go through Google's confirmation drill to successfully register the number. After the DID is confirmed, be sure there's a check mark beside this Google Voice destination so that incoming calls to your GV number will be routed to your Asterisk server.

While you're still in the Google Voice Setup, click on the General tab. Uncheck Enable Call Screening. Turn Call Presentation Off. And set CallerID to Display Caller's Number. Be aware that IPkall DIDs only forward your IPkall number as the CallerID number while SIPgate DIDs reportedly forward the actual number of the person calling you. If this matters to you, then you may prefer the SIPgate DID option. Finally, uncheck Do Not Disturb. Now click the Save Changes button.

Integrating Google Voice into Asterisk with FreePBX. Open FreePBX with a web browser and choose Setup, Trunks, Add Custom Trunk. Insert your GV number in the Outbound CallerID field and add the following Custom Dial String on the form and Submit Changes and reload the dialplan:


Next, choose Setup, Outbound Routes, Add Route and fill in the following entries on the form:

Route Name: GoogleVoice
Dial Pattern: 48|NXXNXXXXXX
Trunk Seq: local/$OUTNUM$@custom-gv

Inbound Routes. Next, we need two Inbound Routes to get everything working. In setting up your DID with IPkall or SIPgate, you already should have created one inbound route for that provider. It already should be routing calls to an extension on your PBX. Now we need to create a Custom Destination for this inbound route and then reroute these calls there. In that way, your RingBack calls will be routed to some special dialplan code that drops these calls into a custom parking lot where the RingBack call is married up to the extension from which you placed the original call. Then we need to create another inbound route to manage normal incoming calls that are forwarded to your PBX whenever someone dials your Google Voice number.

To begin, choose Tools, Custom Destinations, Add Custom Destination and add an entry like this and then click the Submit Changes button:

Custom Destination: custom-park,s,1
Description: Custom GV-Park

Next choose Setup, Inbound Route and click on the inbound route you created previously for IPkall or SIPgate. Change the destination for these calls to Custom Destination: Custom GV-Park.

Now click on Add Incoming Route and create a new route for your incoming Google Voice calls. Give it any description you like but, for the DID number, it must be gv-incoming. You can leave most of the other defaults. Just be sure you set a destination for your incoming calls from Google Voice. It could be an extension, ring group, IVR, or whatever best meets your needs. The important entry here is gv-incoming for the DID number. Click the Submit button to save your entries. Ignore the warning that you've entered an oddball DID. We know what we're doing. πŸ™‚

Setting Up the Parking Lot. While still in FreePBX, we need to create or adjust your existing settings in Setup, Parking Lot. The parking lot is used by FreePBX to simulate old key telephones where you could place a call on hold and then someone else in the office could pick up the call by clicking on the blinking key on their phone. The Asterisk equivalent is to press the flash hook and dial your Parking Lot Extension which then places the call in a Parking Lot space and tells you what the space number is. Someone else then can dial the number of that space to pick up the call. Our little trick today works like this. When you place an outbound call through Google Voice, your extension will be dumped into a reserved parking lot space. When Google Voice initiates the RingBack call before connecting the destination number you've dialed, that call will be sent to the same reserved parking lot space. The two calls then are joined, and you'll hear the parking lot number followed by ring tones as your call is connected by GV to its final destination. Our special thanks to Richard Bateman for his comment on the previous article and this terrific tip! He wins an Atomic Flash installer from Nerd Vittles. In addition, A. Godong wins an Atomic Flash installer for his tip on consolidating two DIDs into a single DID to manage both inbound and outbound GV calls. Just send us your addresses.

Now, where were we? Most FreePBX systems have a default setup for the Parking Lot. What we need to do is be sure you have reserved one more space in the parking lot than you actually need for day to day operation of your PBX. We'll use the last parking lot space number to manage outbound calling through Google Voice. Our entries look like the following:

Enable Parking Lot Feature: checked
Parking Lot Extension: 70
Number of Slots: 5
Parking Timeout: 30 seconds
Parking Lot Context: parkedcalls

Destination for Orphaned Calls: Terminate Call: Hangup

If you use our setup above, the Magic Number is 75 which is the fifth slot in the Parking Lot. If you use a different Parking Lot extension or number of slots, here's how to calculate the Magic Number. Start counting the slots beginning with one more than the Parking Lot Extension. When you get to the last slot in the number of slots you've specified, that's your Parking Lot Magic Number. Write it down. You'll need it in a second when you run our GV installation script.

Save your entries and reload the Asterisk dialplan when prompted.

Integrating pygooglevoice. Now we're ready to complete the setup by running our revised script which loads pygooglevoice and sets up your dialplan in extensions_custom.conf. You'll need 5 pieces of information to run the script so write them down before you begin:

1. Your 10-digit Google Voice phone number
2. Your Google Voice email address
3. Your Google Voice password (no spaces!)
4. Your 11-digit RingBack DID (16781234567)
5. Your Parking Lot Magic Number

A word of caution: If you used a gMail address to set up your Google Voice account, it's possible to have different gMail and Google Voice passwords. For this to work, you'll need to enter your gMail password, not your Google Voice password (assuming they're different).

Now log into your Asterisk server as root and issue the following commands:

cd /root
wget http://bestof.nerdvittles.com/applications/gv/install-gv-new
chmod +x install-gv-new

Google Voice Speed Dials. For frequently called numbers, you can add speed dials by inserting entries in the [from-internal-custom] context of extensions_custom.conf that look like the example below where 333 is the speed dial number and 6781234567 is the area code and number to call. Be sure to reload your Asterisk dialplan to activate them.

exten => 333,1,Dial(local/6781234567@custom-gv,300)

Congratulations! You now have what we hope will be flawless and free U.S. calling on your Asterisk system using Google Voice. No gimmicks, no strings, no cost. Enjoy!

Finally, one additional word of caution. Both Google Voice and this call design are set up for a single call at a time. There are no safeguards to prevent multiple calls, but that may violate the Google Voice terms of service.

Asterisk 1.6 Solution. Several readers now have documented the procedure for implementing the Asterisk 1.6 bridge technology to make outbound Google Voice calls. You can read all about it here.

Tweaking Previous Setups. If you installed pygooglevoice using our previous tutorial, here's what you need to do. First, log into your Asterisk server as root and issue the following commands:

cd /etc/asterisk
nano -w extensions_custom.conf

Scroll to the bottom of the file by pressing Ctrl-W then Ctrl-V. Move up the file using up arrow until you reach [custom-gv]. Press Ctrl-K repeatedly to delete all of the lines in the [custom-gv] context. If you get to another line that starts with a label in brackets like [this], STOP deleting. Once you've deleted all of the lines in the [custom-gv] context, save the file: Ctrl-X, Y, and press Enter.

Now continue reading this article by jumping up to the Google Voice Setup topic. The Custom Trunk entry and the GoogleVoice outbound route will already be in your FreePBX system so there's no need to repeat those two steps. You will need to perform the remaining FreePBX steps beginning at the Inbound Routes topic and continuing on with Setting Up the Parking Lot. Finally, when you run the new installation script, it will detect that pygooglevoice is already on your system and will skip that step but will install the new custom contexts in extensions_custom.conf using your new settings. Enjoy!

Thought for the Day. Which is more arbitrary: (1) Apple snubs Google Voice or (2) Google Voice snubs SIP? Pays to look in the mirror occasionally.

Best Read of the Week. Memo to Steve Jobs and Apple: Stop Being A Jerk!

Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.

whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


Special Thanks to Our Generous Sponsors

FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.

Some Recent Nerd Vittles Articles of Interest...


  1. Just curious why you’re suggesting IPkall/SIPgate to be where GV forwards incoming calls instead of Gizmo5. I only ask because I’ve got a Gizmo account but not an IPkall or SIPgate account. If there’s a benefit to using IPkall/SIPgate over Gizmo5 (e.g., less latency, better call quality), I’m happy to sign up for one more free service. But under the theory that less is more, I figured I’d ask before I go ahead and take that extra step.

    [WM: We’re not convinced that any service at Gizmo5 will remain free for long. Hence, the reason we didn’t recommend it. However, a G5 DID should work if you can reliably receive SIP calls from G5 and complete the Google Voice setup process. Haven’t tested it.]

  2. Just curious what the purpose of using a DID (GV) which forwards to another DID is? Wouldn’t it make more sense to have the free DID (inbound, non-GV) for your incoming calls, then use the outbound method for the free outbound calling portion?

    Seems silly to me to forward one DID to another DID just to get your GV number to your Asterisk. Isn’t that what the free DID is doing anyways?

    [WM: The GV DID isn’t a DID that you can register with Asterisk at this point because they’ve blocked SIP connectivity. Down the road, we hope that will change. In the meantime, you need a way for inbound calls to GV to get to Asterisk, and that requires another DID that can be registered with Asterisk.]

  3. Thanks Ward!!! I have two questions:

    (1) Your stated that…."If you use a different Parking Lot extension or number of slots, here’s how to calculate the Magic Number. Start counting the slots beginning with one more than the Parking Lot Extension. When you get to the last slot in the number of slots you’ve specified, that’s your Parking Lot Magic Number."….

    This is a little confusing for me. If I read what was said above, with a Parking Lot Extension: 70 and Number of Slots: 5, wouldn’t I start at 71 and have 5, making the magic number 76? Or I start at 70 and 71 will be the first number of the additional 5 slots?

    [WM: Your Parking Lot slots would be 71, 72, 73, 74, and 75. So 75 is the last slot and the Magic Number. It still has to be in your range of parking lot extensions.]

    (2) I started the "revision" (did previous setup with pygooglevoice) process by following your article at the top. When I was finish, I notice where you stated that we should have edited the "extensions_custom.conf" first before proceeding with the new (revised) setup. I check the file after the fact and there doesn’t seem to be any duplication or redundant entries in that file). I’m I incorrect?

    [WM: If you previously used our pygooglevoice script, then there is a duplicate [custom-gv] context in the file. Use Ctrl-W in nano to search for the two occurrences and delete the contents of the top context. If you don’t find two, then something failed the first time around.]

  4. Sorry Ward, I found the answer to my second question!! After attempting to place a call and was unable to connect, I recheck the β€œextensions_custom.conf” file and YES, there were TWO "[custom-gv]" contexts and I delete the "old" context. Maybe you should place the "Tweaking Previous Setups" statements earlier in your writeup for people that have done the previous install. Thx.

    [WM: The article says, for previous installs, to jump directly to the last section of the article and names it. I don’t know how much clearer that could be. πŸ™„ ]

  5. What is the ringback did? is this sipgate/ipkall did i entered on my googlevoice account?

    I have sipgate setup but i am a little confuse with the sip uri thing. My sipgate did is working I am able to receive incoming calls via that did.

    [WM: That is your RingBack DID. If you can receive calls from that DID, you’re all set to configure it as a destination DID in Google Voice.]

  6. Thank you for all of the help with using GV! I was happily using the previous method using g5, and ipkall for inbound and am trying to move to this latest configuration. In my extensions override file, do I need the line exten => demo,1,Goto(from-trunk,3366,1)? Admittedly, I not sure what it does. Also, I don’t have an option for Custom Destinations under Tools. All of the modules appear to be installed and options enabled. What am I missing? Thanks again, this is great!

    [WM: Blog comments are a horrible way to diagnose problems and provide tech support. Visit the PIAF Forums and post issues there. Thanks.]

  7. WM: Oh, I get that you can’t register directly. I just don’t quite get why you would even bother with the Google Voice incoming if you’ve already got a DID that you could advertise.

    I guess if you want to use the voicemail on google and have the transcriptions and all that, I suppose you need to direct the calls to the GV DID.

    Anyways, was just thinking out loud mostly πŸ™‚

  8. Leif Madsen: One reason why you want to handle the incoming GV DID call is because your outgoing call Caller ID will be your GV DID. GV doesn’t allow you to override the caller ID (Well if they do it will defeat its main purpose as one number for all :)) and you’re right, having transcription is also a nice feature. You should advertise your GV DID instead of your ringback number.

  9. Strange, maybe someone can help. I can run the gvoice -e… command from the command prompt on trixbox as root and the call comes fine to try and answer a parked call, but when asterisk tries running it through System(gvoice -e…), the command does not seem to execute neither does it show an error through /var/log/asterisk/full nor /var/log/messages. Is there a log file I can find to see if there’s an error so I could fix this? Thanks.

  10. I finally got it to work, I had to add "asterisk ALL = NOPASSWRD: /usr/bin/gvoice" to the end of /etc/sudoers then run System(sudo gvoice -e "${ACCTNAME}" -p ${ACCTPASS} call ${EXTEN} ${RINGBACK}) notice the quotes around the acctname variable. Hopefully this helps anyone who’s in the same situation as I was.

  11. Well, this approach is using Park() function. But I dont see its advantages over Meetme() solution. One thing I like about MeetMe is you can set MusicOnHold to custom class, which will play connecting tone like "tit tit tit tit…" or my own message, and the caller does not aware of the technique being used.

    Maybe it is easier to create multiple Park Numbers than Conference Rooms.

    For the callback trunk from GV, since I dont want to mess up with default incoming route "Any DID/Any CID", I will create a incoming route just for GV callback as below:

    1. Description: Callback-from-GV
    2. DID Number: your-Sipgate-DID ;should be your SG username
    3. Caller ID Number: your-GV-Number
    4. Destination: [custom-park]-or-[whatever]


  12. Hector, or anyone else. I believe I have the same problem as Hector did. However i am not follwoing where to add Asterisk All = No Password

    what is going on is I am able to hit my GV trunk make call out I get the parking lot number when I call but the far end never rings.. looks like i am getting some errors below.. thanks for the help

    [root@asterisk1 ~]#
    [root@asterisk1 ~]# gvoice -e
    Traceback (most recent call last):
    File "/usr/bin/gvoice", line 4, in ?
    from googlevoice import Voice,LoginError,input
    File "/usr/lib/python2.3/site-packages/googlevoice/__init__.py", line 16
    SyntaxError: invalid syntax
    [root@asterisk1 ~]#

    [WM: Sounds like you have a Google Voice login issue, too. At the command prompt, run gvoice and answer the prompts. Does it complete the call? Post this on the forum once you have more info.]

  13. Hey Ward, i dont see to be follwing you. obviously I am a little green on CLI Not sure what you mean by answer the prompts or run gvoice? when I type in gvoice I get the below error. although my username and password are correct I even verified by logging into google.com/voice this morning.

    [root@asterisk1 ~]#
    [root@asterisk1 ~]# gvoice
    Traceback (most recent call last):
    File "/usr/bin/gvoice", line 4, in ?
    from googlevoice import Voice,LoginError,input
    File "/usr/lib/python2.3/site-packages/googlevoice/__init__.py", line 16
    SyntaxError: invalid syntax

    [WM: Something’s missing in your setup. Post your hardware config and this issue on the forum. Can’t debug tech issues on a blog. Sorry.]

  14. This is working great for me. A few (helpful, I hope) comments:

    (1) It seems to work fine using a Gizmo5 account. Because of the integration between GV and Gizmo5, you don’t need to sign up for a PSTN DID, you can just route everything through a SIP trunk registered to your Gizmo5 account.

    (2) I agree with Bao Nguyen that the dialplan is a bit more complicated than necessary. You should be able to use the standard incoming route for the DID/trunk you’re for incoming calls just fine. And you can simply have a new route incoming route for that trunk w/your GV caller-id that goes to the custom-park destination. This eliminates the need for a separate non-standard route "gv-incoming."

    (3) I’m running Asterisk/FreePBX on an Ubuntu box, and I needed to install simplejson (apt-get install python-simplejson) in order for pygooglevoice to work. But now everything’s working great.

  15. This is not clear to me:

    exten => ipkall-1,1,Goto(from-trunk,${DID},1)

    ipkall-1 thats an extension right? can I just randomly pick amy name ? i have sipgate so can I just put sipgate instead of ipkall-1?

    [WM It’s the label for your SIP URI and inbound route. Just be sure to use the same name here and in the name for the DID in your inbound route for SipGate, and you’re good to go.]

  16. This works like a charm first try with IPKALL. The only issue Im having is that when I make the destination of gv-incoming anything besides extension or ring group asterisk does not pickup and the call goes to the google voice voicemail. Any ideas why?

  17. Jordan, it’s the GV’s problem, and the same with direct routing to extension. If you answer right after it rings your extension, the call will go to GV voicemail.

    You should have Wait() for at least 3 seconds before the command Answer(), like this:

    exten => s,1,Wait(4)
    exten => s,2,Goto(ivr,s,1) ; or s,2,Goto(from-internal,your-extension-No,1)

  18. I have the same issue as Dan. I have the older version of python v2.3. Are there any instructions on how to update to ver 2.4 or any chances of making pygooglevoice backward compatible with version 2.3.
    Any help is appreciated.

  19. Got it working with this writeup πŸ™‚ Only problem is that when I place the call out, it rings the extension I’m calling from and when I answer it, then it rings and connects me. It shouldn’t be doing that, right?

  20. @Bao Nguyen

    Okay an IVR will kick in consistently now. However I have isolated another issue. DTMF – calling outbound from a zoiper softphone works. Calling inbound to my google voice number from my cellphone DTMF works about 5% of the time. Calling my ringback number direct with cellphone DTFM works 100% of the time. Conclusion – the trunk is configured properly something in Google Voice isnt doing DTMF very well which makes the usefulness considerably less. Anyone else having similar issues? And yes I know this should be in the PIAF forum… Im eagarly awaiting access approval.

  21. I am using an IAX connection for my ipkall DID. I guess I don’t have to setup extensions_override_freepbx.conf . Am I right?

  22. For incoming calls, why not point the Google Voice to Gizmo5 and do SIP Forwarding to the Asterisk Server? Most everyone has a DYNDns (or equivalent) FQD. Set the Gizmo5 SIP forwarding to asterisk_ext@DYNDns_FQD.

    [WM: Hundreds of possibilities. Should work fine.]

  23. After playing with it more, I think what my issue is that instead of this:
    "When Google Voice initiates the RingBack call before connecting the destination number you’ve dialed, that call will be sent to the same reserved parking lot space. The two calls then are joined, and you’ll hear the parking lot number followed by ring tones as your call is connected by GV to its final destination."

    The call is calling my same extension, so it causes it to call me on line 2, which I must answer while keeping the line where I placed the call on hold indefinitely and initiating the call on that second line on the same extension. For some reason it isn’t connecting it on the same line on that extension.

    [WM: The destination extension for your RingBack DID should be different than your calling extension.]

  24. There is a potential problem by using incoming CID to do parking. While most of the time it should work, all calls initiated from Google Voice’s web interface will fail. My solution is to use GROUP_COUNT instead. You don’t have to hard code the GV# into your dial plan.

    …..(after agi call)….
    exten => s,n,Set(GROUP()=gvout)
    include => parkedcalls
    exten => s,n,Set(PARKINGEXTEN=701)
    exten => s,n,Park()

    exten => s,1,NoOp()
    exten => s,n,GotoIf($[ ${GROUP_COUNT(gvout)} = 1 ]?parked:notparked)
    exten => s,n(parked),Wait(3)
    exten => s,n,ParkedCall(701)
    exten => s,n(notparked),GoTo(ring,s,1)

  25. Does this leave the original outgoing call parked til its terminated after 30 seconds, or does it just connect the two calls together?

    [WM: The two calls immediately get connected together, and the parking lot entry is cleared.]

  26. @Mark A Peters: If you use bridge in 1.6, multichannel works so you can set up follow me. Look at the forum on the article and add to that the non-CID pagemen solution.

  27. Awesome mashup =). Anyone know of a way to disable Allison from saying ‘7’ ‘5’ when an outbound call is placed in park?

    [WM: Look on the bright side. Could have been six less. πŸ™‚ Try explaining that to the Little Mrs.]

  28. An interesting new SIP dialing approach through Google Voice has been posted here. Keep in mind that the longevity of these SIP solutions is running about a week. πŸ™‚

  29. ********************************

    Turns out my problem was self induced. I am sorry for all the confusion.

    I made a mistake here:

    1. Your 10-digit Google Voice phone number

    I must have entered an 11-digit number. I found an 11 digit GV number in my extensions_custom.conf and got rid of the first digit "1″ . put everything back to the way i had it originally and shazam! it works

    thanks for the awesome solution.


  30. Jon:
    If you use exten => _X.,n,ParkAndAnnounce(pbx-transfer:PARKED|45|/dev/null) to park your call, rather than just Park(), Allison says nothing (actually, she does but it is sent to /dev/null).

    Now i’m trying to figure out how to get ring tones instead of hold music…

    [WM: Great tip! If you’d prefer not to have errors in your log, here’s an alternative that does the same thing:]

    exten => _X.,n,ParkAndAnnounce(pbx-transfer:PARKED|45|Console/dsp)

  31. Great write up!

    Has anyone got this working on a vanilla Asterisk install? This site leans more toward FreePBX which is cool and all, but I prefer an asterisk-only solution. The parts I’m having a hard time visualizing are how the two inbound and 1 outbound trunks should look in the dial plan. I’ve got GV forwarding to sipgate, which forwards to an extension on my asterisk system, and I can receive calls wonderfully on my sip phone. I’d like to now be able to place calls from GV. I’ve installed the python app and it seems like it setup extensions_custom.conf, but that’s where I’m stuck. Any help would be much obliged.

  32. I found that with pygooglevoice, if your login fails, the program goes interactive asking if you want to try again (and since no one is around to press Y or N, the channel just hangs, waiting for a key to be pressed.)

    I fixed the issue by getting commenting out the try/except statements, but kept:

    I would be nice to have another option, such as "-b" (batch) which would tell the program to end on any error (without interaction).

  33. I have this working fine but what I have noticed is there is no outbound CDR logged for calls sent over gvoice. The inbound CDR is fine, however. There is a NoCDR in the inbound section but that simply prevens the ringback from being logged, as far as I can tell. Is outbound CDR working for anyone else?

  34. It looks like people with AT&T phones can no longer call Google Voice subscribers (at least here in Minnesota). When they dial a Google Voice number they get a recording that says, "The call you are attempting to place is not allowed from this line. Please dial 611 for Customer Service."

    I’m calling Customer Care right now to see what the deal is.

  35. I am working on updating pygooglevoice to allow for python2.3 support (@Dan), batch mode (@jimb), and to move the asterisk configuration script under revision control at googlecode. You will still need to install simplejson in order for it to work. Look for the updates in the project soon

  36. ipkall fails for me. it does not pass GoogleVoice’s CID .Sipgate works ok though! thanks!

    [WM: Some IPkall numbers pass CID, and some don’t. πŸ™„ Can’t beat free though.]

  37. Ok, now what if you want to setup say five GV-Sipgate connections instead of just the one?

    [WM: You could do this with IPkall and SIP URI’s but probably not with SIPgate.]

  38. This is not working for me. I am trying to place the call using zoiper and at first I hear "are busy now please try your call again later" and then it hangs up with the error "invalid number format". I was able to successfully use google voice from the console, though. Any thoughts on what’s wrong?

  39. Here’s some more info from troubleshooting: it works if I do the speed-dial trick you mentioned above. So, is it a problem with the dial pattern? Or maybe the $OUTNUM$ variable?

  40. Okay, I got it working. Apparently it was using one of my other outbound routes… This dial pattern was apparently a better match?: NXXXXX.
    I changed it to NXXXXXX and now it’s working fine.

  41. There have been some updates to Google Voice which broke things… again. For new installs, there shouldn’t be a problem because we’ve fixed the downloads. If you’ve already installed this before NOW, do the following to get Google Voice working again. Make certain that you first have enabled the DAG Repository!

    Log into your server as root and issue the following commands:

    cd /root/pygooglevoice
    yum install mercurial
    rm -r pygooglevoice
    hg clone https://pygooglevoice.googlecode.com/hg/ pygooglevoice
    cd pygooglevoice
    rm /usr/bin/gvoice
    python setup.py install

  42. Sorry, but I am looking for the forum that would help in troubleshooting this. I performed all the steps exactly and reviewed it several times. I am getting inbound calls and outbound is going straight out my sipgate trunk. It appears not to invoke the gv parking and call initiation. The only difference may be I did article 637 first and ran the "configure-gv". Anyways, just looking to see where I can locate troubleshooting steps possibly. Thanks.

    [WM: http://pbxinaflash.com/forum ]

  43. Thanks for the update Ward. I was freaking out yesterday when my wife told me it wasn’t working – I thought it was my system. Hope they come up with a fix soon!

Comments are closed.