Welcome! Log In Create A New Profile

Advanced

Minimum implementation of Asterisk for Google Voice?

Posted by twinclouds 
Re: Minimum implementation of Asterisk for Google Voice?
June 24, 2012 11:11AM
ok lets try another.....

This one actually I did not modify other than by your line in the installation instructions, so I still have the tollfree stuff active that probably does not work and I have not changed the are code of calls. Neither of which should matter.


[general]
static=yes
writeprotect=no
clearglobalvars=no

[globals]
CONSOLE=Console/dsp                             ; Console interface for demo
IAXINFO=guest                                   ; IAXtel username/password
TRUNK=Zap/G2                                    ; Trunk interface
TRUNKMSD=1                                      ; MSD digits to strip (usually 1 or 0)

[default]
exten => s,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
exten => s,n,Dial(SIP/101,10)
exten => s,n, Hangup
exten => 101, 1, Dial(SIP/101, 10)
exten => 102, 1, Dial(SIP/102, 10)

[google-in]
exten => rottstein@gmail.com, 1, GotoIf(${DB_EXISTS(gv_dialout/channel)}?bridged)
exten => rottstein@gmail.com, n, NoOp(Callerid  ${CALLERID(name)})
exten => rottstein@gmail.com, n, Set(CALLERID(num)=${SHIFT(CALLERID(name),@)})
exten => rottstein@gmail.com, n, Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
exten => rottstein@gmail.com, n, Dial(SIP/101, 180, D(:1))
exten => rottstein@gmail.com, n(bridged),Bridge(${DB_DELETE(gv_dialout/channel)}, p)

[outbound]
include => seven-digit
include => local-devices
include => tollfree
include => talk-gmail-outbound
include => talk-numeric-outbound
include => dial-uri

[local-devices]
exten => _1, 1, Dial(SIP/101,10)
exten => 101, 1, Dial(SIP/101,10)
exten => _2, 1, Dial(SIP/102,10)
exten => 102, 1, Dial(SIP/102,10)

[tollfree]
exten => _411, 1, Dial(SIP/18004664411@proxy.ideasip.com,60)
exten => _1800NXXXXXX,1,Dial(SIP/${EXTEN}@proxy.ideasip.com,60)
exten => _1888NXXXXXX,1,Dial(SIP/${EXTEN}@proxy.ideasip.com,60)
exten => _1877NXXXXXX,1,Dial(SIP/${EXTEN}@proxy.ideasip.com,60)
exten => _1866NXXXXXX,1,Dial(SIP/${EXTEN}@proxy.ideasip.com,60)

[seven-digit]
exten => _NXXXXXX,1,Set(CALLERID(dnid)=1512${CALLERID(dnid)})
exten => _NXXXXXX,n,Goto(1512${EXTEN},1)
exten => _NXXNXXXXXX,1,Set(CALLERID(dnid)=1${CALLERID(dnid)})
exten => _NXXNXXXXXX,n,Goto(1${EXTEN},1)

[talk-gmail-outbound]
exten => _[a-z].@gmail.com,1,Dial(Gtalk/rottstein/${EXTEN}@gmail.com)
exten => _[A-Z].@gmail.com,1,Dial(Gtalk/rottstein/${EXTEN}@gmail.com)

[talk-numeric-outbound]
exten => _1NXXNXXXXXX,1,Dial(Gtalk/rottstein/${EXTEN}@voice.google.com)
exten => _+1NXXNXXXXXX,1,Dial(Gtalk/rottstein/${EXTEN}@voice.google.com)

[gv-agi-outbound]
exten => _1NXXNXXXXXX,1,AGI(google-voice-dialout.agi)
exten => _+1NXXNXXXXXX,1,AGI(google-voice-dialout.agi)

[dial-uri]
exten => _[a-z].,1,Dial(SIP/${EXTEN}@${SIPDOMAIN},120,tr)
exten => _[A-Z].,1,Dial(SIP/${EXTEN}@${SIPDOMAIN},120,tr)
exten => _X.,1,Dial(SIP/${EXTEN}@${SIPDOMAIN},120,tr)

I realize this next one probably seems a mess, but it is the recommended way of doing things. the (!) after [default] sets it as a template, then the (default) after each name attaches the template to the section.

and sip.conf:



[general]
context=default                 ; Default context for incoming calls
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
tcpenable=yes                   ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls


[Default](!)
type=friend
host=dynamic
context=outbound
outgoinglimit=1
incominglimit=1
canreinvite=no
disallow=all
allow=g722
allow=alaw
allow=ulaw
allow=gsm

[101](default)
username=Desk
secret=redacted
callerid="Charlie Black <101>"
mailbox=101

[102](default)
username=Dad-mobile
secret=redacted
callerid="Charlie Black <mobile>"
mailbox=102

Re: Minimum implementation of Asterisk for Google Voice?
June 24, 2012 11:14AM
twinclouds Wrote:
-------------------------------------------------------
> I don't use it for calling in so I don't know if
> it works for 1.8.13.0 or not.
> For 1.8.13.0, you don't need to do the PROC
> setting any more.
> You can check if gtalk is loaded or not by doing
> "module show" in the CLI prompt.

It says it is loaded, but the use count is 0.
Re: Minimum implementation of Asterisk for Google Voice?
June 24, 2012 12:52PM
my sip.conf:
[general]
context=default                 ; Default context for incoming calls
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
bindport=8024                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
externhost=www2.blahblah.org ; my DynDNS name
externrefresh=60
localnet=192.168.1.0/255.255.255.0
;tcpenable=yes                   ; Enable server for incoming TCP connections (default is no)
;tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls

[101]
; main SIP phone @ Home
username=101
secret=asterisk101
type=friend
callerid="PG Home <101>"
host=dynamic
context=peter.gunn-outbound
outgoinglimit=1
incominglimit=1
canreinvite=no

[102]
; PG's HTC EVO
username=102
secret=asterisk102
type=friend
callerid="PG cell <102>"
host=dynamic
context=peter.gunn-outbound
outgoinglimit=1
incominglimit=1
nat=yes
canreinvite=no
;videosupport=yes
disallow=all
allow=g722
allow=alaw
allow=ulaw
allow=gsm
;allow=h261
;allow=h263
;allow=h263p
;allow=h264
;allow=mpeg4
Re: Minimum implementation of Asterisk for Google Voice?
June 25, 2012 09:19PM
Can I see you extensions.conf? I now have incoming calls, but even when I pick up the phone, the caller goes right to voicemail.

I have seen a "fix" that requires something in extensions_custom.conf but I do not have that file. Is that loaded by default or would it be an include file?


Thanks.
Re: Minimum implementation of Asterisk for Google Voice?
June 25, 2012 09:52PM
Re: Minimum implementation of Asterisk for Google Voice?
June 26, 2012 06:44AM
Hmm mine looks functionally identical to yours. Have you had to change anything (there is supposed to be a fix adding a pause) to have calls not go directly to voicemail? There was something about changing a pause from 2 to 8. The problem I am seeing is exactly as those folks described. The problem is they were using a file called extensions_custom.conf which I do not have.
Re: Minimum implementation of Asterisk for Google Voice?
June 26, 2012 09:11PM
petergunn Wrote:

>
> Thats exactly what my set up does (rings home
> phones via LinksysPAP2 and my Android cell via
> Sipdroid), so it does work. I'm still using
> asterisk 1.8.3 with the
> [url=http://www.pbxinaflash.com/community/index.ph
> p?threads/google-outbound-fails.11055/page-4#post-
> 70055]outgoing calls patch[/url].
>
> -PG


Do you know which version of 1.8.3 you are using? Im going to reinstall using yours since it seems to work for you.
Re: Minimum implementation of Asterisk for Google Voice?
June 26, 2012 09:30PM
Unfortunately my disk on the dockstar hosting my asterisk server has failed yesterday. :-(

I still have the asterisk tarball on my server though - it is asterisk-1.8-current.tar.gz from Feb 2011 and unpacks as asterisk.1.8.3

Not sure if I will re-install or go with a $40 Obi100 since that seems less hassle and would let me retire the LinksysPAP2.

-PG
This thread was a huge help to me in getting a phone setup with google voice. I had an old vonage linksys rt31p2 sitting around and got that all set up with the pogoplug e02.
I originally was trying to use archLinux but didn't have much luck. This site got me on the debian path and it was painless to get it up and running.

The only remaining nit is that sometimes the phone doesn't pick up the call automatically. Hitting 1 on the keypad seems to force it, so no big deal.

next up: maybe trying a mini dlna server on the same plug.
Re: Minimum implementation of Asterisk for Google Voice?
July 14, 2012 03:46PM
Which version of Asterisk did you use, ed?
Re: Minimum implementation of Asterisk for Google Voice?
July 14, 2012 04:16PM
BTW I recovered my disk successfully. Everything is back up and working again (asterisk 1.8.3 and the outgoing calls patch - I didnt re-install tho).

-PG
optim Wrote:
-------------------------------------------------------
> Which version of Asterisk did you use, ed?

I grabbed the current 1.8, which is 1.8.13.1
Re: Minimum implementation of Asterisk for Google Voice?
July 28, 2012 08:37PM
I tried using asterisk 1.8.3 for incoming call (fax). It appear works fine. Is the reliability still an issue for incoming call nowadays?
Re: Minimum implementation of Asterisk for Google Voice?
July 28, 2012 09:34PM
I was not able to get any version to work for incoming calls via google voice. I believe I had one successful incoming call ever.

Maybe I will try again with a clean slate of config files and only change my login and password.
Re: Minimum implementation of Asterisk for Google Voice?
April 26, 2013 09:27AM
About two weeks ago, my Asterisk implementation used to interface to Google Voice (Asterisk server 1.8.9.2, built as described in this forum) started leaving me high-and-dry (would place calls, but I'd never get a ring tone) the first thing every morning. Waiting about 20 minutes after placing the first call or rebooting Asterisk would bring it back to life, after which it was good for the rest of the day. The only out-of-the-ordinary thing I'm doing is resetting my NAT at 4 AM, since my router has a problem with UDP connections which are tied up for more than 24 hrs. But Asterisk for Google Voice has worked flawlessly for years for me with this arrangement -- that is, until a couple weeks ago.

Is anyone else using Asterisk and Google Voice? If so, have you noticed any recent change in the way it operates?

BTW, the latest Asterisk, Asterisk 11, has made major changes in the code which handles Google Voice, undoubtedly for the better. But, it appears that compiling it has become a much more involved task. When I built Asterisk 1.8, which I use exclusively for GV, I spent some time minimizing the modules that were loaded. Otherwise, the Asterisk process was huge. Given that Asterisk 11 would have required that I apt-get half the world, would likely have been larger by default than the original 1.8, and given that GV may well not be free after the end of the year, I've decided to stick with 1.8 for the time being. But, what is everyone else doing?
Re: Minimum implementation of Asterisk for Google Voice?
April 27, 2013 12:17AM
optim Wrote:
-------------------------------------------------------
> I was not able to get any version to work for
> incoming calls via google voice. I believe I had
> one successful incoming call ever.
>
> Maybe I will try again with a clean slate of
> config files and only change my login and
> password.

I don't have much problem with incoming call even though I don't use it very often. The only problem I had was one older GV registration that I was registered with a non-gmail account then converted to a gmail account. Otherwise, every other accounts work fine.
Re: Minimum implementation of Asterisk for Google Voice?
April 27, 2013 12:19AM
restamp Wrote:
-------------------------------------------------------
> About two weeks ago, my Asterisk implementation
> used to interface to Google Voice (Asterisk server
> 1.8.9.2, built as described in this forum) started
> leaving me high-and-dry (would place calls, but
> I'd never get a ring tone) the first thing every
> morning. Waiting about 20 minutes after placing
> the first call or rebooting Asterisk would bring
> it back to life, after which it was good for the
> rest of the day. The only out-of-the-ordinary
> thing I'm doing is resetting my NAT at 4 AM, since
> my router has a problem with UDP connections which
> are tied up for more than 24 hrs. But Asterisk
> for Google Voice has worked flawlessly for years
> for me with this arrangement -- that is, until a
> couple weeks ago.
>
> Is anyone else using Asterisk and Google Voice?
> If so, have you noticed any recent change in the
> way it operates?
>
> BTW, the latest Asterisk, Asterisk 11, has made
> major changes in the code which handles Google
> Voice, undoubtedly for the better. But, it
> appears that compiling it has become a much more
> involved task. When I built Asterisk 1.8, which I
> use exclusively for GV, I spent some time
> minimizing the modules that were loaded.
> Otherwise, the Asterisk process was huge. Given
> that Asterisk 11 would have required that I
> apt-get half the world, would likely have been
> larger by default than the original 1.8, and given
> that GV may well not be free after the end of the
> year, I've decided to stick with 1.8 for the time
> being. But, what is everyone else doing?

I have been stick with A1.8. The problem is that, like you, I don't know which modules I need to use and how to configure the .conf files. As people say: if not broken, don't fix it.
I have been using GV through asterisk and obi to make phone calls. I don't had any problem lately at all.



Edited 1 time(s). Last edit at 04/28/2013 11:29PM by twinclouds.
Re: Minimum implementation of Asterisk for Google Voice?
April 28, 2013 04:06PM
I still have the original configuration 1.8.3 and its working fine AFAIK. I don't use it very often though.

-PG
Re: Minimum implementation of Asterisk for Google Voice?
December 17, 2013 11:16PM
FYI: Looks like the days of running Asterisk on our ARM boxes to serve up Google Voice are numbered:

http://www.reddit.com/r/google/comments/1pq6pu/google_voice_dropping_xmpp_calling_on_may_15_2014/

https://groups.google.com/forum/#!msg/indian-android/BQ6W8stwQ8w/TpM_KaxLaVYJ

Sigh. Well, it was fun while it lasted. I think I got three good years out of it.
STuPiDiCuS
Re: Minimum implementation of Asterisk for Google Voice?
January 03, 2014 12:48AM
You can always install FusionPBX and use Freeswitch's XMPP->GV setup while GV's XMPP lasts.

http://forum.doozan.com/read.php?2,14581,14637#msg-14637
Re: Minimum implementation of Asterisk for Google Voice?
January 05, 2014 10:21PM
You may be able to do the old way as described here. It is not as nice but still possible to make calls, hopefully.
Re: Minimum implementation of Asterisk for Google Voice?
January 07, 2014 05:29PM
Thanks, twinclouds. I'll squirrel this away for future use. Are you planning to try to implement this method yourself?
Re: Minimum implementation of Asterisk for Google Voice?
January 09, 2014 11:58PM
Yes. Actually, I already experimented somewhat. It works in the local net although the selection if DID is very important. If I call from my mobile over 3G, it seems hardware (!) dependent. Not sure why but at least something works.
We can share our experience when you are ready to try.
Re: Minimum implementation of Asterisk for Google Voice?
February 02, 2014 11:50PM
I found the problem with 3G mobile connection. It was not hardware problem. The problem is pretty interesting. In order to connect from internet through 3G on my Android phone, I need to open the sip port at the router. In order to reduce the chance of online attacks, I don't want to use the standard port like 5060. I use some arbitrary port number from outside and using port forwarding to translate to the standard port 5060. That does not work too well. After I changed the internal sip port number to be same the external port number, everything is fine. Something must happened during the port number translation. I am not sure if this phenominon has been reported before or if it is router dependent. In any case, there's about 3 to 5 additional delay compared to today's XMPP implementation. I fell it is tolerable to me. Hopefully we will still have something to use even after XMPP is going.
Re: Minimum implementation of Asterisk for Google Voice?
February 07, 2014 05:01PM
The new How-To can be found here.
Re: Minimum implementation of Asterisk for Google Voice?
May 18, 2014 10:53PM
Well, the ides of May has come and gone, and my Google Voice line continues to work fine with Asterisk. So, what's going on? Has Google simple not gotten around to disabling XMPP yet? Has the OBI crowd or anyone else lost access? I keep reading stories on the net referring to Google Voice XMPP in the past tense, but is that a reality to some folks or simply a presumed expectation?
Re: Minimum implementation of Asterisk for Google Voice?
May 19, 2014 06:31AM
Interesting. I replaced my dockstar that was running Asterisk with a Baytrail NUC running Ubuntu+XBMC so I'm not running Asterisk anymore. Recycled my old Sprint cell phones as free Freedom Pop phones for the kids since it gets them free 3g+wimax as well as voip calls. Might consider reinstalling Asterisk again if it keeps working reliably.

-PG
Re: Minimum implementation of Asterisk for Google Voice?
July 04, 2014 10:01PM
Asterisk should work well on Ubuntu.
I don't know what happened to GV with XMPP. To be fair, Google had never officially stated that they would be going to retire XMPP. In any case, it was a good excercize to revive the callback approach.
Instead of using NUC, another good candidate to replace Dockstar was those MK TV sticks. I did some CPU benchmarking on some of the devices I have using sysbench. MK802iv (4 core) took 16 seconds for prime number up to 2000. MK802 (one core) took 30 seconds. RPi took 60 seconds and Dockstar took over 100 seconds. Both MK802 and MK802iv consumes 0.8 Watts of power and Dockstar need 5 Watts. I am sure NUC is more powerful but I would assume it consumes a similar amount of electricity as Dockstar. Not sure why Dockstar was so slow.
Re: Minimum implementation of Asterisk for Google Voice?
July 18, 2014 09:17PM
Well my 3 remaining Dockstars will be switched off this weekend replaced by 2x HP N54L Microservers and an n2820 NUC, with just one Dockstar remaining at the in-laws house handling remote rsync backups. Not a single issue in 3+ years...

root@dockstar1:~# cat /etc/debian_version
squeeze/sid
root@dockstar1:~# uptime
21:10:27 up 606 days, 11:02, 1 user, load average: 0.05, 0.02, 0.00

Not sure if I'll attempt Asterisk on the new servers - too many other distractions (xbmc, btrfs, virtualbox, etc.)

-PG :-)
Re: Minimum implementation of Asterisk for Google Voice?
July 21, 2014 12:42PM
My Pogoplug E2s have been similarly robust, although I've upgraded them to Wheezy and keep them up-to-date with patches, so they don't have long run-times on them. I have a SheevaPlug that has sat in the corner untouched, spooling TV shows to disk for me for the past 5 years and, except for its power supply which was notorious on these devices, it has been reliable. Current run time: 375 days. These Arm devices are really amazing.

So, what are people doing with Google Voice under Asterisk on these devices? Just continuing to use it and hoping it doesn't go away?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: