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 12:11PM
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 12:14PM
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 01: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 10: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 10:52PM
Re: Minimum implementation of Asterisk for Google Voice?
June 26, 2012 07: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 10: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 10: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 04:46PM
Which version of Asterisk did you use, ed?
Re: Minimum implementation of Asterisk for Google Voice?
July 14, 2012 05: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 09: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 10: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 10: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 01: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 01: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/29/2013 12:29AM by twinclouds.
Re: Minimum implementation of Asterisk for Google Voice?
April 28, 2013 05:06PM
I still have the original configuration 1.8.3 and its working fine AFAIK. I don't use it very often though.

-PG
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: