Adding Google Voice to FreePBX

If you’ve moved ahead to Asterisk 1.8 in production or are testing it out, use FreePBX as your configuration GUI, and want to add Google Voice such that inbound and outbound routing can easily be configured from FreePBX, here’s a small how-to. Unless and until a GTalk FreePBX module comes along, there’s some command-line work to do, but only for initial configuration.

References:

How To Add Google Voice To FreePBX

Part 1: In the shell

  1. Refer to the Asterisk Wiki: Calling Using Google. We’ll be following that as our guide.
  2. From the command line, as user root or asterisk, verify that the res_jabber and chan_gtalk modules are loaded.
    • [root@asterisk18 ~]# asterisk -rx "module show" | grep res_jabber
      res_jabber.so                  AJI - Asterisk Jabber Interface          0
      [root@asterisk18 ~]# asterisk -rx "module show" | grep chan_gtalk
      chan_gtalk.so                  Gtalk Channel Driver                     0
    • If one or both of those grep commands returns nothing, you need to build the modules (don’t forget to have OpenSSL development libraries installed) and make sure they are loading at Asterisk startup (autoload=yes OR load => res_jabber.so and load=> chan_gtalk.so in /etc/asterisk/modules.conf).
  3. There are three config files in /etc/asterisk to edit by hand (use vi, nano, emacs or whatever you like): jabber.conf, gtalk.conf, and extensions_custom.conf.
    • jabber.conf

      Edit or replace jabber.conf to follow what is listed in Calling Using Google, and which I am pasting almost verbatim here. (I removed debug=yes.) This establishes the XMPP connection.

      [general]
      autoprune=no
      autoregister=yes

      [asterisk]
      type=client
      serverhost=talk.google.com
      username=your_google_username@gmail.com/asterisk
      secret=your_google_password
      port=5222
      priority=1
      usetls=yes
      usesasl=yes
      statusmessage="I am an Asterisk Server"
      timeout=100

    • gtalk.conf

      Again referring to the Asterisk wiki, edit gtalk.conf thus:

      [general]
      context=from-google
      allowguest=yes
      bindaddr=0.0.0.0
      ;externip=1.2.3.4 ; if you know your external ip addr
      stunaddr=stun01.sipphone.com ; use STUN if you're on dynamic IP and NAT

      [guest]
      disallow=all
      allow=ulaw
      context=from-google
      connection=asterisk

      Some notes about gtalk.conf:

      • Use context from-google, which we will set up in the extensions_custom.conf.
      • connection=asterisk must match the connection definition (in square brackets) in jabber.conf.
      • Use externip or stunaddr to get your external IP address if you’re behind a NAT.
    • extensions_custom.conf

      Make a section like this:

      [from-google]
      exten => s,1,Answer()
      exten => s,n,Wait(2)
      exten => s,n,SendDTMF(1)
      exten => s,n,Set(CALLERID(num)=${CUT(CALLERID(name),@,1)})
      exten => s,n,Set(CALLERID(name)=${CUT(CALLERID(name),/,1)})
      exten => s,n,Goto(from-trunk,YOUR-GV-NUMBER,1)
      exten => s,h,Hangup

      • Replace YOUR-GV-NUMBER with your Google Voice DID.
      • The Set commands fix up the caller ID to get rid of the long XMPP ID that is passed on an inbound call.
  4. Once these files are in place, restart Asterisk (amportal restart).
  5. Issue the following command to see that the XMPP connection to Google Talk has been established:

    # asterisk -rx "jabber show connections"
    Jabber Users and their status:
           User: ...@gmail.com/asterisk     - Connected
    ----
       Number of users: 1

  6. Now you’re ready to set up a Google Voice trunk and inbound and outbound routes in FreePBX.

Part 2: FreePBX

  1. Add a new Custom Trunk.
    • Trunk name: Google Voice
    • Outbound Caller ID: put your Google Voice DID, even though this will be ignored (GV always uses your GV number for the outbound Caller ID)
    • Dialed Number Manipulation Rules: Google Voice requires that the number be a full 11 digits, starting with 1. Either here or in your outbound route (or both), make sure you are sending a full 11-digit number. See the screenshot for my config.
    • Custom Dial String: This is the most important part. Enter gtalk/asterisk/+$OUTNUM$@voice.google.com where asterisk matches the client definition in your jabber.conf (in square brackets). If you’ve followed this how-to exactly, then this line is correct.
    • Submit changes.
    • Screenshot (click for full version):
      gvtrunk-small.png
  2. Add a new Outbound Route.
    • You can send any US domestic calls through Google Voice. Just configure an appropriate outbound route and select Google Voice as the trunk. In this screenshot, I have configured 11-, 10-, and 7-digit dialing within my own area code.
    • Screenshot (click for full version):
      outroute-small.png
  3. Add a new Inbound Route.
    • Refer back to this line you entered in extensions_custom.conf: exten => s,n,Goto(from-trunk,YOUR-GV-NUMBER,1) Whatever you entered for YOUR-GV-NUMBER will be the DID you use for your inbound route.
    • Description: Google Voice (or whatever you want)
    • DID Number: YOUR-GV-NUMBER
    • Other stuff: defaults
    • Destination: wherever you want the incoming call to go. In my screenshot, it is directly dialing an extension.
    • Screenshot (click for full version):
      inroute-small.png
  4. Submit all changes and apply configuration. Done! You have added a Google Voice two-way trunk to FreePBX and can use it in your inbound and outbound routing. Don’t forget to log in to Google Voice and select Google Chat (…@gmail.com) as the phone to which your incoming calls are forwarded!

61 thoughts on “Adding Google Voice to FreePBX”

  1. A number of people have come back to this posting and reported that it doesn’t work reliably anymore. I agree. When this was first posted, inbound calls using the Answer, Wait1, SendDTMF sequence connected reliably. Something changed. I have hacked at it and tried a variety of wait times after answer, multiple DTMF 1 tones, and other hacking. Folks are probably better off now connecting the call manually by passing the incoming Google Voice calls to a ring group or extension and then, after answering, pressing 1 when prompted by Google Voice.

  2. Hi,

    I would like to get brief information.

    I want to setup a system where i call and then that system calls me back using GV and then asks me to dial a number.

    Can someone guide me how to get started.

    Thank you

  3. Hi – Thank you, this all seems to work, except for answer confirmation on an inbound call. SendDTMF(1) is being executed in the inbound context – in fact, I added another second of delay, and repeated the DTMF tone – but Google Voice does not seem to be getting it.

    — Executing [s@from-google:1] Answer(“Gtalk/+1781879xxxx-8a22”, “”) in new stack
    — Executing [s@from-google:2] Wait(“Gtalk/+1781879xxxx-8a22”, “3”) in new stack
    — Executing [s@from-google:3] SendDTMF(“Gtalk/+178187xxxx-8a22”, “1”) in new stack
    — Executing [s@from-google:4] SendDTMF(“Gtalk/+1781879xxxx-8a22”, “1”) in new stack

    After picking up the call at the extension, I can enter manually enter a “1” from the keypad, and then media is enabled and the calling party gets answered. I tried changing the DTMF transport from inband RFC2833 to audio, but that didn’t work. Also, on the Asterisk side, I never hear the Google Voice prompt for accepting the call.

    thoughts .. & thanks much. Very nice tutorial.

  4. dilan: Sorry, not sure what the Invalid XML error is about. It’s possible you were disconnected from Google Talk and it failed to reconnect. Turn on debug and see whether any more information appears.

    j2680: Did you set up your jabber.conf correctly?

    Raja: If you have a trunk for each GV account, you can use Outbound Routes to configure what calls go out each trunk. For example if you want extension 1000 to always use GV trunk X you can make an outbound route that specifies trunk X for a certain pattern when the CID is 1000. It’s not specific to this tutorial or Google Voice, just some extra complexity in the area of Outbound Routes.

  5. Hi,

    Thanks for the great info. I have configured one GV account with my freepbx and its working like a charm. But I have a concern. While making outbound calls, all the calls from different DIDs shows the same CID on the receiver’s part. This is because I am using a single trunk. Now I have created 10 trunks with ten different GV accounts. But how will it be possible to use individual GV account with individual numbers i.e that if someone making an outbound call, it must display his CID on the receiver’s part?

  6. [Jul 18 10:55:04] ERROR[1695]: chan_gtalk.c:1871 gtalk_request: No XMPP client to talk to, us (partial JID) : asterisk
    [Jul 18 10:55:04] WARNING[1695]: app_dial.c:2196 dial_exec_full: Unable to create channel of type ‘gtalk’ (cause 0 – Unknown)

    i follow your tut but i cant get it work..

  7. Hi all,

    I have a problem. I have connected the asterisk box with talk.google. com. Time to time its working fine. But sometimes it gives this error.
    At that time calls are not completing properly.
    It is a great help if someone can help me on this.

    [Jul 11 13:17:13] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.
    [Jul 11 13:17:20] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.
    [Jul 11 13:17:20] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.
    [Jul 11 13:17:21] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.
    [Jul 11 13:17:25] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.
    [Jul 11 13:17:29] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.
    [Jul 11 13:17:32] WARNING[17856]: res_jabber.c:1388 aji_recv: Parsing failure: Invalid XML.

    KR
    Dilan

  8. Hi David, yes, you can use more than one GTalk account. My tutorial on setting up Google Voice + Asterisk + FreePBX was amongst the first, but since then, there have been many more writeups that include instructions for multiple accounts. Check pbxinaflash.com/forum – those guys have totally exhausted the topic.

    If you’d like to figure it out on your own, however, the basic gist is that you simply go through the steps again, updating the names of the config blocks. All you need in order to have multiple GTalk accounts is unique identifiers. For example, in jabber.conf, you might have [asterisk] and [asterisk2] and so on, for however many GTalk accounts you want to set up. Then you can make FreePBX trunks that point to “gtalk/asterisk/…” and “gtalk/asterisk2/…” and so on.

  9. Great tutorial…

    I have a question, may i use more than one Gtalk acount with my Asterisk Server, so when someone is using one account, another extension can call from another one?

    And if i can, how can i make it work?

  10. Thank you, Marcus! Note to readers: I have not tested this module and cannot yet recommend it, but if anyone does try it, please let us know what you think, and provide good feedback to Marcus to continue to improve on his work.

  11. Hi Bill, I got frustrated and started from scratch, followed your awesome guide, and I now have a working setup. Thanks for your help and an awesome how to.

  12. I think I see the issue, Marc. You need to specify either the external IP address of your Asterisk box or a STUN server.

    In the [general] section of gtalk.conf:

    ;externip=1.2.3.4 ; if you know your external ip addr
    stunaddr=stun01.sipphone.com ; use STUN if you’re on dynamic IP and NAT

  13. Marc,

    You pasted the Jabber: INCOMING line from your jabber debug. Can you also paste the rest of the transaction if there is one? What does Asterisk send back as Jabber: OUTGOING ?

  14. Hi, thanks for the great how to. I think I followed all the steps perfectly but something isn’t working right. Jabber is connected and I see the incoming call hit asterisk but it doesn’t seem to forward it to the trunk.

    JABBER: asterisk INCOMING: from=”+1949***@voice.google.com/srvres-MTAuMTQyLjQzLjIxOjk4MTA=” to=”***@gmail.com/asterisk06DAC03D” id=”jingle:10.142.43.21-810592:1:4664DCE8″ type=”set”>m**

    Jabber.conf

    [general]
    ;debug=yes ;;Turn on debugging by default.
    autoprune=no ;;Auto remove users from buddy
    list. Depending on your
    ;;setup (ie, using your personal Gtalk account for a test)
    ;;you might lose your contacts list. Default is ‘no’.
    autoregister=yes ;;Auto register users from buddy list.

    [asterisk] ;;label
    type=client ;;Client or Component connection
    serverhost=talk.google.com ;;Route to server for example,
    ;; talk.google.com
    username=***@gmail.com/asterisk ;;Username with optional resource.
    secret=***@831 ;;Password
    :priority=1 ;;Resource priority
    port=5222 ;;Port to use defaults to 5222
    usetls=yes ;;Use tls or not
    usesasl=yes ;;Use sasl or not

    ;status=available ;;One of: chat, available, away,
    ;; xaway, or dnd
    statusmessage=”I am available” ;;Have custom status message for
    ;;Asterisk.
    timeout=100 ;;Timeout on the message stack.

    gtalk.conf

    [general]
    context=from-google ;;Context to dump call into
    bindaddr=0.0.0.0 ;;Address to bind to
    allowguest=yes ;;Allow calls from people not in
    ;;list of peers

    [guest] ;;special account for options on guest account
    disallow=all
    allow=ulaw
    context=from-google
    connection=asterisk

    ;[ogorman]
    ;username=ogorman@gmail.com ;;username of the peer your
    ;;calling or accepting calls from
    ;disallow=all
    ;allow=ulaw
    ;context=default
    ;connection=asterisk ;;client or component in jabber.conf
    ;;for the call to leave on.
    ;

    relevant part of extensions_custom.conf

    [from-google]
    exten => s,1,Answer()
    exten => s,n,Wait(2)
    exten => s,n,SendDTMF(1)
    exten => s,n,Set(CALLERID(num)=${CUT(CALLERID(name),@,1)})
    exten => s,n,Set(CALLERID(name)=${CUT(CALLERID(name),/,1)})
    exten => s,n,Goto(from-trunk,19498912653,1)
    exten => s,h,Hangup

    Let me know if you see anything out of place. Thanks again for the great write up!

  15. If you are using PBX In A Flash Purple, Google Voice should be all set up for you, so there is no need to use these or any other instructions to set it up. Stick with your preconfigured PIAF setup and enjoy!

  16. I completely reinstalled everything. I did find some errors in my work with the file edits; however, I don’t think that was the real issue. After installation, I had the same problem – incoming calls were fine but outgoing would get a Google Voice message that my call couldn’t be completed….. I let it sit overnight and today it is working just fine. I’m not sure what changed for outgoing calls to start working, but they’re happending now.

    As for the modifications you have here, I used PIAF Purple with Asterisk 1.3.8.2 and FreePBX 2.8.1.3 installed. This automatically installed trunks, incoming and outoing routes, and the script files (jabber.conf, gtalk.conf, etc). Would you recommend modifying these settings with the steps you provided above or keep them as is – since they are working.

  17. Sorry Jim, I’m out of ideas for you. The Sipgate thing is totally unrelated, and you should check with them directly for support on it. I’m not sure what’s causing your Google Voice calls to fail.

  18. I’m running Asterisk 1.3.8.2 and FreePBX 2.8.1.3. I’m neeeding sipgate as I’m using analog phone with the Cisco adapter. Can I change something to stop it from trying to register with sipgate? Any ideas on what is causing the outoing call failure?

  19. Here’s the log entry for an outgoing call attempt…maybe you can make sense of it and see what the issue might be:

    JABBER: asterisk OUTGOING:
    [2011-03-25 19:57:23] VERBOSE[9129] app_dial.c: — Called asterisk/+15033259179@voice.google.com
    [2011-03-25 19:57:23] VERBOSE[6453] res_jabber.c:
    JABBER: asterisk INCOMING: Placing GVoice Call: 5033259179
    [2011-03-25 19:57:23] VERBOSE[6453] res_jabber.c:
    JABBER: asterisk INCOMING: xmpp:+15033259179@voice.google.com/srvres-MTAuMTQyLjUwLjE5Ojk4NTc=
    [2011-03-25 19:57:23] VERBOSE[6453] res_jabber.c:
    JABBER: asterisk INCOMING: xmpp:+15033259179@voice.google.com/srvres-MTAuMTQyLjUwLjE5Ojk4NTc=
    [2011-03-25 19:57:23] DEBUG[6453] chan_gtalk.c: redirect +15033259179@voice.google.com/srvres-MTAuMTQyLjUwLjE5Ojk4NTc=
    [2011-03-25 19:57:23] VERBOSE[6453] res_jabber.c:

    Note that my Google Voice area code is not in my local area code – it may not matter but I thought I’d mention it. I replaced my actual google account name and email address with something generic.

    What do you think?

    Also, there’s repeat log entries of this:
    [2011-03-25 19:57:29] NOTICE[6531] chan_sip.c: Failed to authenticate on REGISTER to ‘sipID@sipgate.com’ (Tries 3)
    [2011-03-25 19:57:29] NOTICE[6531] chan_sip.c: — Registration for ‘sipID@sipgate.com’ timed out, trying again (Attempt #801)

    Jim

  20. If you are logged into the shell as root or the user running Asterisk (username asterisk), type ‘asterisk -r’ to get the Asterisk prompt. Type ‘quit’ or Control-C to get back out of it. Easiest way to view the log file is to install FreePBX’s “Asterisk Logfiles” module. Do that from the web interface, Module Admin. When you view the logs, it color-codes them for you.

  21. You are correct – I was at the wrong prompt. How do I view the log /var/log/asterisk/full and what’s the command to switch back to the Asterisk command ling?

  22. That sounds very unusual, Jim. ‘jabber set debug on’ should work, if res_jabber is loaded. And it must be loaded if you are getting calls inbound from Google Voice, unless they’re coming in some other way. That’s from the Asterisk command line, by the way: ‘asterisk -r’ to get the CLI> prompt. Were you trying the jabber command from the Unix shell instead, by any chance?

    The first thing to do to solve almost any Asterisk problem is turn up the logging, by setting the debug on (as you are trying to do) and ‘core set verbose 9’ to make sure all messages are getting logged. Then scour /var/log/asterisk/full to find out where the call makes a wrong turn in your dialplan.

  23. I’ve followed your steps and I cannot call outbound. Inbound works great. I’m using a CISCO PAP2T with analog phone. Something that doesn’t work is the jabber set debug on – responds that command is not found.

    I’m going to go back through and make sure there are no errors but I simply cannot get outbound calling to work.

    Any help is much appreciated.

    Jim

  24. Bill,

    Thank You,for the good, easy to understand writeup on Asterisk FreePBX and Google Voice! The screen shots are a life saver too! I would still be wrangling with this if it weren’t for your walk through here!

    One thing I wanted to add that may possibly help someone else looking at this article.

    After having this setup working flawlessly for about three weeks, I delved into trying to setup Google Voice on my freshly built Android phone through SIPDroid. (I have been using SipGo on WinMo which workks great with this setup here!)
    OK, the next day my Asterisk,GV no longer was working on my Asterisk server?
    I could still do outbound calls but could not receive inbound calls.
    Long story short, the SIPDroid ‘transparent’ setup had created a trunk through PBXes to Google that I didn’t know about? I logged into my newly created PBXes account(which SIPDroid had generated) and found sure enough I had a trunk as my username to Google,to PBXes. I deleted this trunk and after this the Asterisk server was working as before.

    There is a ‘priority’ setting in the jabber.conf file that I could have set to a high value that I (think) would have circumvented this situation,but I did not know of it ,at the time.
    Sorry for looong comment!

    Barry

  25. Michigan Telephone wrote up an article that is slightly more complicated in the dial plan but also more feature-filled, and accommodates multiple Google Voice accounts. I’d give that one a try. It’s not based on Incredible PBX.

    (Edit: I see you’ve already been there and left a comment on his blog entry.)

  26. Bill,

    I was able to get everything working very well, it syncs up to my Cisco 7961 phone and works great. I am now working to get this solution going with multiple google voice accounts. One for my personal use, and another for business. The only info i can find out there is from people that used Incredible PBX. I didn’t want to do this, but it seems no one has gotten it to work properly without it(that I have been able to find). Have you been able to, or even attempted this?

    Thanks again for the easy how to.

  27. Greg, the “annoying attendant” on your incoming calls must be because of the inbound route you chose for your Google Voice DID. It has nothing to do with these instructions. To debug outbound calls you will have to go deeper than the FreePBX GUI. Get on the Asterisk console and use “jabber set debug on” to see how Asterisk is interacting with Google Voice.

  28. I go this set up today, and can receive incoming calls although the annoying attendant comes on and says please hold blah blah. I cannot find out why the outbound calls are not working though. I have everything set to above from what I can see, and in the PBX GUI, I see that GVoice is answering, but not transferring the call from what I can tell. Any help would be greatly appreciated.

    thanks,
    Greg

  29. Nice job here.. With the fixes in Asterisk 1.8.1.1, this is working like a champ.

    Thanks!

  30. Looks like you may have forgotten the SendDTMF(1) in your inbound context or the DID you set in the inbound context isn’t matching up with the one you put in the inbound route. That’s all I can guess.

  31. Thank you for the nice instruction. I followed step by step as you outlined above. On the pbx, I set the incoming route to an extension. I watched the console as the call came through, it identifies my phone cell phone caller id(not same as google voice)in the Jabber Incoming information. After that, I get a call saying the subscriber is unavailable. Internally the extension works fine. Are there additional instructions that I need to follow to get this working?

  32. I also lost the ability to make outbound calls. With “jabber set debug on” I can see that voice.google.com is sending back some errors when Asterisk tries to set up the call. I haven’t made any config changes, and it was working great for a while…

  33. I’m having the same problem now. When calling out from asterisk on a Google Voice trunk the line just rings and rings.

  34. Hello.

    I got a weird one here.

    Great job on the tutorial btw.

    anyways, I was working fine for a couple of days, no problem.
    suddenly I wasn’t able to dial out anymore.
    no changes to the config files mentioned above.

    I created a new goog voice account and tried it again. same problem

    dialing out from gmail works fine though.

    do you have an idea of what it could be?

  35. It looks like gtalk.conf mod to keepalive=yes did the trick.
    For those of you having this issue, here’s what you need to do:
    edit gtalk.conf in /etc/asterisk and insert the following line at the end of the file: keepalive=yes. Then restart Asterisk: amportal restart

    If that still doesn’t keep the connection alive, do this:

    cd /root
    echo ‘#!/bin/bash’ > jab
    echo ‘asterisk -rx “jabber test”‘ >> jab
    chmod +x jab
    echo ‘*/9 * * * * root /root/jab > /dev/null’ >> /etc/crontab
    service crond restart

    Thanks again Bill! great job

  36. This article at NerdVittles has a tip saying that you can add keepalive=yes in your gtalk.conf and it will keep your connection to Google Talk alive.

    I haven’t needed it because the system where I am testing is directly connected to the internet. My home system is behind a NAT but doesn’t seem to need any Jabber keeping-alive in order to remain online. Hope this helps you.

  37. Hi Bill,

    Thanks for your help so far.
    I’ve used your command, and I found that unfortunately the call is not hitting the box at all. Which lead me to beleive that at some point (within minutes) that the registration is dropped.

    It will work fine once I initiate an outbound call.

    Anything I can do to keep alive the registration ?

    Thanks

  38. You can follow my build article for Asterisk 1.8 on RS Cloud, which would actually work fine on physical hardware as well. As I mention in that article, it’s not command-for-command comprehensive. Using these tutorials along with the INSTALL documents included with Asterisk and FreePBX will get you there. (Really, the included documentation is quite good.)

    There’s a really good (official) Asterisk Wiki (Installing Asterisk) available. And a lot of accumulated knowledge on voip-info.org.

  39. Use the commands I gave you previously to trace the call through your PBX. Verify your Inbound Route in FreePBX and set it to something simple to start with (like directly to an extension or Music on Hold). Good luck.

  40. Hello,

    Yes I verified that it is going only to google chat and no other place.

    Whenever I place a call right now to the GV number, it will say
    “Thank you for calling, please hold a moment while we locate someone to take your call…. “.. then a few moment later it say “The person at extension 701 is unavailable.”..

    I believe it is hitting the asteriskbox

  41. “core set verbose 99” at the Asterisk console should help you get a little more detail out of the logs. Then scour /var/log/asterisk/full for the step where the call makes a wrong turn.

    Verify in Google Voice that you are only sending calls to Google Chat and not to any other destination.

    “jabber set debug on” will allow you to see whether the call is even being attempted to your Asterisk box. The recording you are quoting does not sound like a standard Asterisk Voicemail (Comedian Mail) recording. Are you sure it’s not going to your Google Voice voicemail?

  42. Thank you very much for the tutorial. Everything is working properly except:

    When placing an outbound call using googlevoice trunk, it is working fine. It’s perfect.

    Placing an inbound call using googlevoice via the google number immediately after the outbound call above, it is working fine. Perfect.

    BUT when I waited about 10 minutes or so and place an incoming call with the GV number, it goes to “The person at extension 701 is unavailable… “.. I DO NOT have ext 701 configured ( i do not think so)

    Can you help?

    Thanks

  43. I haven’t experienced this, but it looks like you are not alone. jj, I saw your comment in one of the Google support forum threads. Let us know what you find out.

    If you open these accounts in the GMail web client and try to place calls, does it do the same thing? Is it somehow discriminating between the GMail web client and Asterisk?

  44. I also got the message “could not complete your call message,please try again”. However this only happens to the account that I use for asterisk and not to my main account.

    Do you know what is happening here?

  45. Seems like google voice is having issues. All of a sudden I get “could not complete your call message,please try again later”.

  46. Not that I am aware. My results are different: no matter what settings I use, including setting Asterisk’s jabber login to “available” and my GMail client to “DND” or fiddling with the priorities, it always rings to my GMail client, and never Asterisk, when GMail+chat is open.

  47. One last thing, and there may be no way around this. When a call comes in, and I have gmail open, sometimes it rings asterisk, and sometimes it rings in gmail chat. Is there no way to specify which login for a call to ring on? Or at least tell it to ring on all logins?

  48. I just noticed that I had confused a brace with a parentheses. It works great now that I have corrected that.

  49. Thanks for the response, but maybe I did something wrong. This is what I get now:

    “+18005558765@voice.google.com”

    I tried commenting out the CALLERID(num) command, but then there was no number at all. Not even a pair of >. I thought maybe I forgot a parentheses, but I can’t see where if I did. For reference, this is my entry in extensions_custom.conf:

    [from-google]
    exten => s,1,Answer()
    exten => s,n,Wait(2)
    exten => s,n,SendDTMF(1)
    exten => s,n,Set(CALLERID(num)=$(CUT(CALLERID(name),@,1)})
    exten => s,n,Set(CALLERID(name)=${CUT(CALLERID(name),/,1)})
    exten => s,n,Goto(from-pstn-e164-us,MY-GV-NUMBER,1)
    exten => s,h,Hangup

  50. You can get 10-digit formatted Caller ID with a simple change. FreePBX has an inbound context that changes E164 format to 10-digit. Edit the Goto in your extensions_custom.conf:

    exten => s,n,Goto(from-pstn-e164-us,YOUR-GV-NUMBER,1)

    and then reload.

  51. Nevermind. It is working, just not as expected. I was hoping to get the number formatted as a 10 digit number, i.e. 8005558765.

  52. Thanks for this. It works great! The only problem I have is with the CALLERID formatting part. It worked at first, but now it doesn’t seem to do anything. Everything seems to work otherwise; I just get the full XMPP ID as the CALLERID. I’ve checked and rechecked it. I even re-entered it. I can’t seem to figure out why it’s not working anymore.

  53. Hi Saleh,

    Thanks for your compliment. I’ll try to address your issues.

    1. There are so many things this can be. What kind of hardware are you running on (is it adequate?), how much bandwidth do you have and what are the loss/latency/jitter characteristics from your location to the Google Voice server, etc.? These are rhetorical questions for you to investigate because I can’t troubleshoot the whole range of possibilities from here. Use tools like ‘top’ and ‘mtr’ on your machine to get some readings. Also, can you make a clean phone call using GMail Chat on the web from your location?

    2. The DISA module in FreePBX will allow you to configure this easily. Incoming calls can be directed to the DISA where they’ll get a dial tone and can make calls according to your dialing plan. For internal users, forget about the dial tone and just set up a specific route prefix for the Google Voice trunk. Then someone could dial (as one string) 73001xxxxxxxxxx and the dial plan will remove the 7300 part and send the rest to the Google Voice trunk.

  54. Thanks.
    i was waiting for this :), excellent job.
    i have 2 issues:

    1- The voice quality is poor, and there is lots of noises, is there any thing that can be done. i used SIPgate (without asterisk using X-Lite) before and the quality was perfect.

    2- how to setup an extension ex:7300 and any one calling this extension get a dial tone and he enter US number and the call connect using Google Voice trunk.

    thanks.

Comments are closed.