Tag Archives: Google Voice

Asterisk on Amazon EC2 cloud; Google Voice update

Some quick updates on interesting topics featured on this blog.

A blog reader recently introduced me to Amazon’s Free Tier offering of their cloud infrastructure service. The gist: get a free year of a virtual server, within the limits of 10GB storage, 613MB RAM, and low CPU usage with some “bursting” as needed. That’s good enough for a test box, certainly.
I have been running Asterisk and FreePBX on the Rackspace Cloud since October 2010. It works great there, and if it weren’t for Amazon offering something for free, I would say that RS Cloud is still the better deal. (You can see the numbers for yourself if you calculate the price of Rackspace’s lowest-configuration cloud server and compare with Amazon’s. At only 256MB, the Rackspace server is a bit slim on memory, but more than adequate for development and testing and even running a few calls at a time in production.) But I’m into saving pennies and decided to move my test system to Amazon’s cloud, at least for the twelve months they’ll let me use it for free.
In short, it works according to my previous instructions for installing Asterisk and FreePBX on the Rackspace Cloud Server. Hackers who have set it up on RS Cloud can do the same on EC2 by selecting an instance within the Free Tier; use the Amazon Linux 64-bit image with 8GB disk. Use Elastic IP to give yourself a consistent (but not “static,” really) IP address. And note that your server is actually behind Amazon’s NAT, so you’ll need to configure SIP NAT settings as if you were behind a home router. Tip: use for the localnet. Lastly, the firewall is configured on Amazon’s EC2 console, not in iptables. Enjoy!
Google Voice update
An unofficial, unsupported, much discussed Google Voice module for FreePBX made the rounds recently. In fact, the original author commented here on this blog advertising his module, but apparently no longer maintains it. I recommend sticking to the manual-configuration method documented here (hit the link just referenced and scroll all the way up). Unfortunately, Google Voice integration with Asterisk is still pretty flaky. Outbound calls will work perfectly, but inbound calls are hit-and-miss. I have seen this in my testing and so have others. (Note: don’t cross Michigan Telephone! Hi, MT!) Get a DID to forward to, use FreeSWITCH or an OBi ATA box for better success.

VoIP news roundup

Some interesting VoIP-related news I read this week:

TAC to FCC: Set a Date Certain for the End of the PSTN – and the proposed year is 2018. The big concern seems to be maintenance of infrastructure when traditional landline subscribers are dropping off rapidly. I think that infrastructure still has a lot of value to it, but not necessarily for traditional telephone service. What could the utilities or private enterprise do with a copper grid and switching infrastructure that reaches even the most rural parts of the United States?

From the VoIP and Gadgets blog: How Skype Works With Facebook – an interesting interview about how Skype put their technology in the web browser for Facebook video chat. It’s basically the Skype client condensed down to a browser plugin.

Meanwhile, Google is doing it their own way with XMPP: Announcing Google+ Hangouts – Google keeps working at the XMPP extensions to make the protocol media-rich, and now they have group video chat. I don’t have a Google+ account and haven’t tried it out yet.

Google’s offering is standards-based: “To support Hangouts, we built an all-new standards-based cloud video conferencing platform.” And those standards are “XMPP, Jingle, RTP, ICE, STUN, SRTP” and “HTTPS + SRTP”. Some folks would say that it’s not “standards-based” unless SIP is doing the signaling. I think the only thing standard means today is that your work is published for others to use and some technical group of people reviews it. XMPP has that. SIP’s technical body is the IETF and H.323’s technical body is the ITU. Who’s more standard?

The standard with the most implementations wins (Betamax, anyone?) and Google has the weight to tip the end-user-connectivity scales toward XMPP/Jingle. SIP is firmly in place as the current IP trunking standard but might soon be falling behind when it comes to connecting the end-users.

Google killing off Gizmo5

I just received this e-mail stating that Google is killing off the Gizmo5 VoIP service they acquired in 2009:

Gizmo5 is writing to let you know that we will no longer be providing service starting on April 3, 2011. A week from today, March 11, 2011, you will no longer be able to add credit to your account.

Although the standalone Gizmo5 client will no longer be available, we have since launched the ability to call phones from within Gmail at even more affordable rates.

Thank you,

The Gizmo5 Team

Before Google’s purchase of Gizmo5, the SIP provider had a unique relationship with GrandCentral and then Google Voice that allowed a SIP connection (incoming only) to a Google Voice number. Until FreeSWITCH and Asterisk provided updated Google Talk modules last fall, Gizmo5 was the only way to have a purely VoIP connection to Google Voice.

Asterisk hack: make your Google Talk client invisible

It’s been a too-busy-to-write week, but I found some time the last few evenings to brush up my C coding (only hacking at this point, really) to make Asterisk 1.8 do something I’ve wanted from the beginning: Google Talk’s invisible mode for the Google Voice integration.

Quick background: Google wrote a variety of XMPP extensions to make Google Talk do voice and a bunch of other non-standard XMPP things. One of those things is what Google calls “shared statuses,” which also includes invisible mode–the ability to be online but set your client as invisible so that others can’t see you, but could chat with you.

You might want to use this feature if, like me, your Google Voice number is attached to your main GMail account. I don’t use the chat features but I appear online to anyone who has me in their contact list, as long as Asterisk is logged in, and that has the potential to draw unwanted instant messages (that will never get answered).

Note: I want to reinforce that this is a hack. The code is clean enough, but this is only useful for Google Talk and is only implemented as a set of Asterisk CLI commands. Furthermore, this functionality would probably never be implemented in Asterisk’s res_jabber because it’s Google-proprietary. On the other hand, if any Asterisk developers want to run with this, go for it! I don’t guarantee that this code will work for you and if your Asterisk process segfaults, stop using it.


Apply this patch against Asterisk’s (or trunk, currently) res/res_jabber.c by downloading the patch to your Asterisk source directory and running patch < res_jabber.patch . You may have to tell it to apply the patch to res/res_jabber.c.

Rebuild (or build) Asterisk. If you are rebuilding, just run make after applying the patch. You should see make build the res_jabber module. Then make install and restart Asterisk.


At the CLI, you can issue jabber set invisible on asterisk to turn on invisibility for the Jabber connection named “asterisk.” If you don’t know what your Google Talk XMPP connection is called, just issue jabber show connections and find out. You can set your connection visible again with jabber set invisible off asterisk.

Now, here’s another thing that is really hacky: Google Talk only seems to apply the visibility/invisibility change if you are toggling. Here’s what I mean: if you were invisible, and logged out, then logged back in, Google still thinks you are invisible–but you’re not! So in that case, if you jabber set invisible on ..., it doesn’t do anything, until you first set it off and then back on again. I think I know why this is happening and it has to do with res_jabber sending standard <presence> information at login rather than Google’s special shared-status presence scheme. If you want to be sure you are invisible, just start off by setting invisible off and then set it on. For me, that works every time. (I’d be grateful for someone who really knows all about this to fix it up and make it work right, the first time.)


I got the idea from this year-old blog posting about enabling Google Talk invisibility in Pidgin, which refers to the official documents published by Google on how it works.

Asterisk 1.8+Google Voice fixed

The Asterisk team released a small patch that fixes the protocol issue that was keeping Asterisk 1.8 users from dialing out through Google Voice.

You can apply the patch against version 1.8.0 or 1.8.1. And if you’ve never used the patch command before, it’s easy:
  • Go to the Asterisk bug tracker and get the attached file named fix

  • Put it in your Asterisk source directory (the root, where the configure script, Makefile, and other such files exist). Call it gtalkfix.patch, to be a little less ambiguous.
  • From that same directory, run the command patch < gtalkfix.patch . If it says it can’t find the file to patch, specify channels/chan_gtalk.c. Oh, and if you don’t have the patch command, just yum install patch first.
  • You should see something like this:
    patching file channels/chan_gtalk.c
    Hunk #1 succeeded at 193 with fuzz 2 (offset -3 lines).
    Hunk #2 succeeded at 463 (offset -5 lines).
    Hunk #3 succeeded at 1006 (offset -3 lines).
    Hunk #4 succeeded at 1814 (offset -5 lines).
  • Now run make and you will see it compile chan_gtalk again. Of course, if you are applying it against the raw distribution, you’ll go through the entire build process.
  • make install and start Asterisk and you’ll be able to call through Google Voice again.

Asterisk 1.8+Google Voice broken; FreeSWITCH still works

As some folks commented, Google Voice seems to have stopped accepting outbound calls from Asterisk 1.8. There’s a bug report open with Asterisk on this issue, and several discussions in user forums.

I fired up FreeSWITCH again, without updating any code (still the source from mid-October, 1.0.head (git-dc40a77 2010-10-17 16-19-38 -0400)), and it works perfectly. Apparently, the FreeSWITCH guys are using a different method to make the Google Voice connection, or the Google folks are specifically filtering Asterisk or have made a change that affects Asterisk and to which FreeSWITCH is immune.

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.


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.


      statusmessage="I am an Asterisk Server"

    • gtalk.conf

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

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


      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:

      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):
  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):
  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):
  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!

Asterisk 1.8, FreePBX 2.8, and Google Voice on a Cloudy Day

This past weekend, I had a chance to test out all of the named technologies, all together–including the cloud.

The news last week was that Asterisk 1.8 connects directly to Google Voice via the Google Talk protocol. No more scripts or free DIDs to act as intermediary. And if you’ve set up GTalk with Asterisk on previous versions, it’s simple to go the extra couple steps and enable Google Voice.

Tested, and it works. Thanks to Michigan Telephone who drew my attention to the Asterisk wiki where the Google Voice setup is documented. If you’re already in a place where you can install Asterisk 1.8 and want to try it out, that wiki document will take you the whole way through it. (One note, however: I have allowguest=yes, which is how this option is documented in the sample gtalk.conf, rather than allowguests=yes, which is how it is documented in the wiki, and allowguest [no s] works for me.)

While I am a huge fan of Google Voice, what was more interesting than getting that working this weekend was getting it running in the cloud–namely, Rackspace CloudServers. This was my venture into cloud VoIP, starting with dev/test, and partially out of necessity–I don’t have any more hardware at home to use for testing. I’ll give the end of the story first: it works nearly as well as my physical hardware setup at home in terms of audio quality and general calling functions, and an order of magnitude better for rapid deployment of a testing environment in which to set up the new versions of Asterisk and FreePBX. Naturally, I began to think: could I move my home PBX to the cloud? Not yet, and I have a number of technical reasons (not FUD) why, but I plan to try tackling them.

This is an introduction, and I know a number of folks stop by this blog looking for technical how-tos, so this week and next I will be digging into these topics: setting up Asterisk 1.8 and FreePBX 2.8, configuring Google Voice and nicely integrating into FreePBX (not just hacking it into the extensions_custom.conf by hand some config file editing required…), setting up a RS CloudServer for Asterisk, and some of the technical considerations I mentioned in the previous paragraph.

That’s a lot to write about, and I’ll get to it piece by piece. Meanwhile, if you want to just try it out (minus the cloud part), go get the latest Incredible PBX/PBX In A Flash from NerdVittles, install the ISO and have at it. They’ve gotten it working and bundled it together so that you can have a cutting-edge PBX… in a flash! But as for me and this blog, let’s just call it Asterisk PBX in a slow-cooker.

Using FreeSWITCH to add Google Voice to Asterisk

Michigan Telephone and I have been discussing using FreeSWITCH as an on-box adjunct to Asterisk to enable cutting-edge features, such as Google Voice integration, without having to use development-level Asterisk code. Here’s how to set up a very minimal FreeSWITCH on the same server as Asterisk for this very purpose.

References, at the top of the post to suggest that you read these first:

The steps:


  1. Follow the installation guide to retrieve the development version of FreeSWITCH from the git repository. Warning! The Subversion repository is old, and so is the tarball, which claims to be a nightly snapshot. It is not. Only git will get you the current code.
  2. Build:
    • ./bootstrap.sh
    • Edit modules.conf in the source directory and uncomment endpoints/mod_dingaling. Later, once you see the minimal installation we’re producing, you may want to comment out other unused modules to save some build time.
    • ./configure, make, and make install. My Asterisk box already had most of the required libraries; only libtiff-devel was missing (needed for the spandsp module). I was able to retrieve libraries and headers with yum (yum install libtiff-devel for example). The make process will alert you of anything missing. Just install the requirements and then make again, and it will pick up where it left off.
  3. FreeSWITCH will now be installed in /usr/local/freeswitch and is contained within this directory and subdirectories. I noticed that it builds its own copy of iksemel, which I already have installed elsewhere for Asterisk’s use, but the custom libs are in /usr/local/freeswitch/lib so there is no interference.
  4. Delete the contents of /usr/local/freeswitch/conf. You can get them back later if you want by doing make samples from your FreeSWITCH source directory, but for this minimal installation, we can put all of the configuration in a single file and be sure nothing else is loading.
  5. I spent some time trying to optimize the FreeSWITCH config so that it contains just enough to act as a gateway between Asterisk (using SIP) and Google Voice. My freeswitch.xml config, appended to this post, should work for anyone following these steps. Copy it to the /usr/local/freeswitch/conf directory, editing the lines related to GMail login.


  1. If you’re set up for NAT, you may not (probably don’t) have the loopback network configured in your sip.conf as a local (non-NAT) network. Add localnet = to [general] in sip.conf or the sip_nat.file if you’re using FreePBX. Otherwise, Asterisk will try to use NAT-traversal methods for the Asterisk-FreeSWITCH on-box trunk.
  2. Set up a new SIP trunk. In FreePBX, name the peer “freeswitch” and use these trunk details:


    (FreePBX now sets up contexts appropriately within from-trunk, so the context line can be omitted here unless you wish to specify one.) The non-FreePBX method would be to create a [freeswitch] block in sip.conf with the aforementioned details and an appropriate context= line. That’s it. No registration, no usernames, nothing–we are authenticating by IP address and port only.

  3. Set up appropriate inbound and outbound routes in FreePBX or in your extensions.conf dialplan. This is outside the scope of this how-to.


FreeSWITCH and/or the GTalk/Jingle protocol use more RTP ports than what I had previously configured in my router-firewall for Asterisk. So I updated my firewall to include UDP ports 10000-65000.

Google Voice and GMail

  1. Log into the GMail account with an associated Google Voice number, bring up the chat window and enable voice calling. Call a number and see that it works through your browser.
  2. Log into Google Voice and instruct it to route calls to Google Chat. According to the FreeSWITCH wiki, the FreeSWITCH integration only works when call screening is turned on. (Why?) So turn it on. Call your Google Voice number from any phone and see that it rings through to your browser. Then sign out of chat.

Get it started

With these settings in place, Asterisk should be listening to FreeSWITCH on port 5060, and FreeSWITCH should be listening to Asterisk on port 5050. Furthermore, FreeSWITCH should be able to navigate a NAT and talk to the Google Talk server and, using the latest FreeSWITCH code, send and receive calls on the Google Voice number.

Start FreeSWITCH. /usr/local/freeswitch/bin/freeswitch -c will give you a console and once you have worked out the bugs, you can run it in the background with -nc instead.

Does it work?

Let me know if you have followed these instructions and achieved success. I was able to send and receive calls with Google Voice, with working DTMF and mostly acceptable audio quality. 

Place test calls with dl_debug on in the FreeSWITCH console to see the XMPP messages. I spent a lot of time examining these and Wireshark captures to find RTP issues (solved in the config and with the firewall adjustments).

I was disappointed that the audio was sometimes jittery, which I never see with the Gizmo5 or PSTN Google Voice transports. I don’t know if it was from the Internet or from the server itself, but I can say that FreeSWITCH in this very minimal mode seems to add very little additional memory or CPU usage.

Appendix: the config 
My single-config-file freeswitch.xml. Cut, paste and use. Replace YOURUSERNAME, YOURPASSWORD, and YOURDID with your settings. A veteran FreeSWITCH user could help me optimize this even more.

<?xml version=”1.0″?>
<document type=”freeswitch/xml”>
    <!– this is a good place to pre-define globals if you want –>
    <X-PRE-PROCESS cmd=”set” data=”global_codec_prefs=G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM”/>
  <section name=”configuration” description=”Various Configuration”>
    <configuration name=”modules.conf” description=”Modules”>
        <load module=”mod_console”/>
        <load module=”mod_logfile”/>
        <load module=”mod_sofia”/>
        <load module=”mod_dingaling”/>
        <load module=”mod_commands”/>
        <load module=”mod_dptools”/>
        <load module=”mod_dialplan_xml”/>
    <configuration name=”console.conf” description=”Console Logger”>
        <map name=”all” value=”console,debug,info,notice,warning,err,crit,alert”/>
        <param name=”colorize” value=”true”/>
        <param name=”loglevel” value=”info”/>
    <configuration name=”switch.conf” description=”Core Configuration”>
        <key name=”1″ value=”help”/>
        <key name=”2″ value=”status”/>
        <key name=”3″ value=”show channels”/>
        <key name=”4″ value=”show calls”/>
        <key name=”5″ value=”sofia status”/>
        <key name=”6″ value=”dingaling status”/>
        <key name=”7″ value=”reloadxml”/>
        <param name=”colorize-console” value=”true”/>
        <param name=”max-sessions” value=”1000″/>
        <param name=”sessions-per-second” value=”30″/>
        <param name=”loglevel” value=”debug”/>
        <param name=”dump-cores” value=”yes”/>
        <param name=”rtp-enable-zrtp” value=”false”/>
    <configuration name=”logfile.conf” description=”File Logging”>
        <param name=”rotate-on-hup” value=”true”/>
        <profile name=”default”>
            <param name=”rollover” value=”10485760″/>
            <map name=”all” value=”debug,info,notice,warning,err,crit,alert”/>
    <configuration name=”sofia.conf” description=”sofia Endpoint”>
        <param name=”log-level” value=”0″/>
        <param name=”debug-presence” value=”0″/>
        <profile name=”freeswitch-sip”>
            <gateway name=”asterisk-local”>
              <param name=”username” value=”freeswitch”/>
              <param name=”password” value=”0″/>
              <param name=”proxy” value=”″/>
              <param name=”register” value=”false”/>
              <param name=”retry-seconds” value=”30″/>
              <param name=”caller-id-in-from” value=”true”/>
            <domain name=”all” alias=”true” parse=”false”/>
            <param name=”debug” value=”0″/>
            <param name=”sip-trace” value=”no”/>
            <param name=”log-auth-failures” value=”false”/>
            <param name=”forward-unsolicited-mwi-notify” value=”false”/>
            <param name=”context” value=”asterisk”/>
            <param name=”rfc2833-pt” value=”101″/>
            <param name=”sip-port” value=”5050″/>
            <param name=”dialplan” value=”XML”/>
            <param name=”dtmf-type” value=”info”/>
            <param name=”inbound-codec-prefs” value=”$${global_codec_prefs}”/>
            <param name=”outbound-codec-prefs” value=”$${global_codec_prefs}”/>
            <param name=”use-rtp-timer” value=”true”/>
            <param name=”rtp-timer-name” value=”soft”/>
            <param name=”vad” value=”none”/>
            <param name=”rtp-ip” value=”″/>
            <param name=”sip-ip” value=”″/>
            <param name=”inbound-codec-negotiation” value=”generous”/>
            <param name=”tls” value=”false”/>
            <param name=”nonce-ttl” value=”60″/>
            <!–<param name=”disable-transcoding” value=”true”/>–>
            <param name=”auth-calls” value=”false”/>
            <param name=”auth-all-packets” value=”false”/>
            <param name=”ext-rtp-ip” value=”″/>
            <param name=”ext-sip-ip” value=”″/>
            <param name=”rtp-timeout-sec” value=”300″/>
            <param name=”rtp-hold-timeout-sec” value=”1800″/>
            <param name=”challenge-realm” value=”auto_from”/>
    <configuration name=”dingaling.conf” description=”XMPP Jingle Endpoint”>
        <param name=”debug” value=”0″/>
        <param name=”codec-prefs” value=”PCMU”/>
      <profile type=”client”>
        <param name=”name” value=”gtalk”/>
        <param name=”login” value=”YOURUSERNAME@gmail.com/freeswitch”/>
        <param name=”password” value=”YOURPASSWORD”/>
        <param name=”dialplan” value=”XML”/>
        <param name=”context” value=”gtalk”/>
        <param name=”message” value=”This is FreeSWITCH”/>
        <param name=”auto-reply” value=”This is an automated system for audio calls only. Please do not chat.”/>
        <param name=”rtp-ip” value=”auto”/>
        <param name=”candidate-acl” value=”wan.auto”/>
        <param name=”local-network-acl” value=”localnet.auto”/>
        <param name=”ext-rtp-ip” value=”stun:stun.freeswitch.org”/>
        <param name=”auto-login” value=”true”/>
        <param name=”sasl” value=”plain”/>
        <param name=”server” value=”talk.google.com”/>
        <param name=”tls” value=”true”/>
        <!– disable to trade async for more calls –>
        <param name=”use-rtp-timer” value=”false”/>
        <!– default extension (if one cannot be determined) –>
        <param name=”exten” value=”gtalk-in”/>
    <configuration name=”post_load_modules.conf” description=”Post-load modules” />
  <section name=”dialplan” description=”Regex/XML Dialplan”>
    <context name=”asterisk”>
      <extension name=”asterisk-outbound”>
        <condition field=”destination_number” expression=”^(.*)$”>
          <action application=”ring_ready” />
          <action application=”set” data=”hangup_after_bridge=true”/>
          <action application=”set” data=”bridge_generate_comfort_noise=true”/>
          <action application=”bridge” data=”dingaling/gtalk/+$1@voice.google.com”/>
    <context name=”gtalk”>
      <extension name=”gtalk-in”>
        <condition field=”destination_number” expression=”^(.*)$”>
          <action application=”set” data=”hangup_after_bridge=true”/>
          <action application=”set” data=”effective_caller_id_name=${caller_id_number}”/>
          <action application=”set” data=”execute_on_answer=send_dtmf 1″/>
          <action application=”set” data=”bridge_generate_comfort_noise=true”/>
          <!– <action application=”answer” /> Add this to answer the call before bridge to * –>
          <!– <action application=”ring_ready” /> Or GV Voicemail will get it if you don’t ans. –>
          <!– <action application=”set” data=”ringback=%(2000, 4000, 440.0, 480.0)” /> –>
          <action application=”bridge” data=”sofia/gateway/asterisk-local/YOURDID” />