Minimum implementation of Asterisk for Google Voice? October 12, 2010 11:33AM |
Registered: 14 years ago Posts: 406 |
Re: Minimum implementation of Asterisk for Google Voice? October 16, 2010 10:52PM |
Registered: 14 years ago Posts: 406 |
Re: Minimum implementation of Asterisk for Google Voice? March 05, 2011 05:40AM |
Registered: 13 years ago Posts: 261 |
Re: Minimum implementation of Asterisk for Google Voice? March 05, 2011 07:42AM |
Registered: 13 years ago Posts: 261 |
Re: Minimum implementation of Asterisk for Google Voice? March 05, 2011 01:54PM |
Registered: 13 years ago Posts: 261 |
mkdir /etc/asterisk/tmp cd /etc/asterisk/tmp wget -r -nd http://www.arctangent.net/~superm1/gv_configs/ cd /etc tar cvfz asterisk_config.tgz asterisk # backup - just in case :-) cd /etc/asterisk cp /etc/asterisk/tmp/*.conf /etc/asterisk3) modify the config for gmail address peter.gunn@gmail.com with password peters_password
perl -pi -e 's/Mario Limonciello/Peter Gunn/g' /etc/asterisk/sip.conf perl -pi -e 's/superm1/peter.gunn/g' /etc/asterisk/sip.conf /etc/asterisk/jabber.conf /etc/asterisk/extensions.conf /etc/asterisk/gtalk.conf perl -pi -e 's/secret=.*/secret=peters_password/g' /etc/asterisk/jabber.conf4) log into http://voice.google.com, goto Settings->Phones, and make sure "Google Chat" is selected
/etc/init.d/asterisk restart6) Configure your VOIP Phone or ATA adapter
My settings for the Linksys PAP2... SIP Port: 5060 Proxy: 192.168.1.7 (IP address of your dockstar running asterisk) Display Name: Peter (anything works here) UserID: 101 Password: (blank) AuthID: 101 User AuthID: NoAnd thats it - all calls to my Google Voice phone number ring the phone plugged into the Linksys PAP2 adapter and any outgoing calls go out as if I dialed them on using Google Voice.
Re: Minimum implementation of Asterisk for Google Voice? March 06, 2011 08:01AM |
Registered: 13 years ago Posts: 261 |
[modules] autoload=no load => res_rtp_asterisk.so load => res_jabber.so load => chan_gtalk.so load=res_crypto.so ; Cryptographic Digital Signatures load=cdr_csv.so ; Comma Separated Values CDR Backend load=chan_sip.so ; Session Initiation Protocol (SIP) load=codec_g726.so ; ITU G.726-32kbps G726 Transcoder load=codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translat load=codec_ulaw.so ; Mu-law Coder/Decoder load=format_gsm.so ; Raw GSM data load=format_ilbc.so ; Raw iLBC data load=format_pcm.so ; Raw uLaw 8khz Audio support (PCM) load=format_sln.so ; Raw Signed Linear Audio support (SLN) load=format_wav.so ; Microsoft WAV format (8000hz Signed Line load=format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM) load=app_dial.so ; Dialing Application load=app_macro.so ; Extension Macros load=app_senddtmf.so ; Send DTMF digits Application load=app_verbose.so ; Send verbose output load=pbx_config.so ; Text Extension ConfigurationBTW I noticed Google has a bug - placing a call to the Google Voice number resulted in my wife receiving an email "Peter Gunn wants to chat" (looks like this bug). Turns out that this is because I invited her to gmail and she is on my gmail chat list with "invited" status (you have to click the down arrow in chat last and select "show all contacts" to see this). The emails stopped once I blocked her in the list.
Re: Minimum implementation of Asterisk for Google Voice? March 06, 2011 11:04AM |
Registered: 13 years ago Posts: 132 |
Re: Minimum implementation of Asterisk for Google Voice? March 06, 2011 12:31PM |
Registered: 13 years ago Posts: 264 |
Re: Minimum implementation of Asterisk for Google Voice? March 07, 2011 04:58PM |
Registered: 13 years ago Posts: 264 |
load=func_callerid.so ; function CALLERID() load=func_db.so ; function DB(), DB_EXIST() load=func_math.so load=func_channel.so load=func_strings.so load=func_logic.soAfter doing this, the /var/log/asterisk/messages log was clean on both call origination and reception and caller ids were displayed correctly. (Of course, the name was not given, as I don't think Google pays for that lookup.) This change does make the asterisk server a bit bigger, though, but nowhere near what it was originally:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 16222 root 20 0 16244 6768 4220 S 0.0 5.4 0:00.43 asterisk
Re: Minimum implementation of Asterisk for Google Voice? March 07, 2011 05:59PM |
Registered: 13 years ago Posts: 261 |
Re: Minimum implementation of Asterisk for Google Voice? March 07, 2011 11:04PM |
Registered: 13 years ago Posts: 264 |
Re: Minimum implementation of Asterisk for Google Voice? March 08, 2011 01:44AM |
Registered: 13 years ago Posts: 4 |
Re: Minimum implementation of Asterisk for Google Voice? March 12, 2011 02:20PM |
Registered: 13 years ago Posts: 261 |
[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=petergunns_dynamic_host.dyndns.org ; dynamic hostname asterisk uses to find external IP externrefresh=60 ; refresh every 60secs in case dynamic IP changes localnet=192.168.1.0/255.255.255.0 ; Class C LAN addesses ;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 home SIP phone connected to dockstar via Linksys PAP2 username=101 secret=passwordfor101 type=friend callerid="Peter Gunn <101>" host=dynamic context=outbound outgoinglimit=1 incominglimit=1 canreinvite=no [102] ; PG's HTC EVO username=102 secret=passwordfor102 type=friend callerid="Peter Gunn <102>" host=dynamic context=outbound outgoinglimit=1 incominglimit=1 nat=yes canreinvite=noThen modify /etc/asterisk/extensions.conf so it rings both the EVO and the home extension for incoming calls:
...
[google-in]
exten => peter.gunn@gmail.com, 1, GotoIf(${DB_EXISTS(gv_dialout/channel)}?bridged)
exten => peter.gunn@gmail.com, n, NoOp(Callerid ${CALLERID(name)})
exten => peter.gunn@gmail.com, n, Set(CALLERID(num)=${SHIFT(CALLERID(name),@)})
exten => peter.gunn@gmail.com, n, Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
exten => peter.gunn@gmail.com, n, Dial(SIP/101&SIP/102, 180, D(:1))
exten => peter.gunn@gmail.com, n(bridged),Bridge(${DB_DELETE(gv_dialout/channel)}, p)
...
I also changed my SIP port (see sip.conf above) and RTP port ranges in /etc/asterisk/rtp.conf so I just needed to set up port forwarding for 8024-8050 on my home router:
[general] rtpstart=8025 rtpend=8050On sipdroid I set the SIP Proxy to petergunns_dynamic_host.dyndns.org port 8024. I had to disable PCMA audio codec in sipdroid config to make sipdroid outgoing calls work correctly.
Re: Minimum implementation of Asterisk for Google Voice? March 15, 2011 08:12PM |
Registered: 13 years ago Posts: 261 |
anthonyjohnson
Re: Minimum implementation of Asterisk for Google Voice? March 15, 2011 09:42PM |
Re: Minimum implementation of Asterisk for Google Voice? March 15, 2011 10:16PM |
Registered: 13 years ago Posts: 261 |
[Mar 15 19:38:09] NOTICE[21056]: chan_sip.c:23357 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 101^^ Seems harmless - just means there is no mailbox set up in /etc/asterisk/voicemail.conf
-- Executing ["the number"@outbound:1] Dial("SIP/101-00000000", "Gtalk/"my accout"/"the number"@voice.google.com") in new stack^^ This is good.
[Mar 15 19:38:09] ERROR[21084]: chan_gtalk.c:1871 gtalk_request: No XMPP client to talk to, us (partial JID) : "my account" [Mar 15 19:38:09] WARNING[21084]: app_dial.c:2039 dial_exec_full: Unable to create channel of type 'Gtalk' (cause 0 - Unknown)^^ This is not good. I think something is wrong with your Jabber connection to Google Voice.
[superm1-gtalk]
username=superm1@gmail.com
...
connection=superm1 ; this is the important bit that references the [superm1] section in jabber.conf
In /etc/asterisk/jabber.conf
[superm1] type=client serverhost=talk.google.com username=superm1@gmail.com/Talk ; this needs to be the right username secret=superm1password ; this needs to be the right password for the google voice account port=5222 ...Bear in mind I'm an asterisk n00b myself :-)
Re: Minimum implementation of Asterisk for Google Voice? March 16, 2011 12:35AM |
Registered: 13 years ago Posts: 264 |
[general] context=google-in ; Context to dump call into allowguest=yes [guest] ; special account for options on guest account disallow=all allow=ulawI'm not saying it's correct, but this works for me.
Re: Minimum implementation of Asterisk for Google Voice? March 16, 2011 12:58AM |
Registered: 13 years ago Posts: 264 |
# adduser asterisk ... # chgrp -R asterisk /etc/asterisk /usr/lib/asterisk /var/lib/asterisk # chown -R asterisk:asterisk /var/log/asterisk # chown -R asterisk:asterisk /var/run/asterisk # chown -R asterisk:asterisk /var/spool/asterisk # chown -R asterisk /usr/lib/asterisk/keys /usr/lib/asterisk/astdb ## needed? # chown -R asterisk /var/lib/asterisk/sqlite.db ## needed? what is this? # vi /etc/default/asterisk + uncomment AST_USER and AST_GROUPI then restarted the server:
/etc/init.d/asterisk stop /etc/init.d/asterisk startverified that the logs were clean, and made a couple inbound and outbound test calls. Everything seemed to work just like it did before.
Re: Minimum implementation of Asterisk for Google Voice? March 16, 2011 02:50PM |
Registered: 14 years ago Posts: 406 |
Re: Minimum implementation of Asterisk for Google Voice? March 22, 2011 12:16AM |
Registered: 13 years ago Posts: 264 |
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)to:
exten => _1800NXXXXXX,1,Dial(SIP/sip.denetron.com/${EXTEN}) exten => _1888NXXXXXX,1,Dial(SIP/sip.denetron.com/${EXTEN}) exten => _1855NXXXXXX,1,Dial(SIP/sip.denetron.com/${EXTEN}) exten => _1877NXXXXXX,1,Dial(SIP/sip.denetron.com/${EXTEN}) exten => _1866NXXXXXX,1,Dial(SIP/sip.denetron.com/${EXTEN})denetron.com is another service that passes toll-free calls without cost and without requiring registration.
jason
Re: Minimum implementation of Asterisk for Google Voice? March 22, 2011 01:19PM |
Re: Minimum implementation of Asterisk for Google Voice? March 22, 2011 09:09PM |
Registered: 13 years ago Posts: 261 |
Ananon
Re: Minimum implementation of Asterisk for Google Voice? March 24, 2011 01:29AM |
Re: Minimum implementation of Asterisk for Google Voice? March 24, 2011 12:44PM |
Registered: 14 years ago Posts: 406 |
Re: Minimum implementation of Asterisk for Google Voice? March 24, 2011 12:57PM |
Registered: 13 years ago Posts: 261 |
Re: Minimum implementation of Asterisk for Google Voice? March 24, 2011 03:42PM |
Registered: 14 years ago Posts: 406 |
jason
Re: Minimum implementation of Asterisk for Google Voice? March 24, 2011 10:12PM |
Re: Minimum implementation of Asterisk for Google Voice? March 24, 2011 11:58PM |
Registered: 14 years ago Posts: 406 |
Re: Minimum implementation of Asterisk for Google Voice? March 27, 2011 07:27PM |
Registered: 13 years ago Posts: 261 |
load=format_h264.so/etc/asterisk/sip.conf
nat=yes videosupport=yes allow=h264 ; only needed if disallow=all is set
Re: Minimum implementation of Asterisk for Google Voice? April 03, 2011 08:00PM |
Registered: 14 years ago Posts: 406 |