[size=150]Symptom:[/size]
[size=150]Diagnose:[/size]
[ul]
[li]The cause is that Asterisk is behind nat.[/li]
[li]Google Voice login and call setup are initiated by Asterisk, so these functions work fine.[/li]
[li]The inbound audio, however, is initiated from google and has troubles reaching Asterisk.[/li][/ul]
[size=150]Check if Asterisk is behind nat:[/size]
Compare the ip of the default interface eth0 using ifconfig with the public ip as reported by icanhazip.com.
ip -f inet addr list eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.1/32 brd 10.0.0.0 scope global eth0
valid_lft forever preferred_lft forever
wget -q -O - icanhazip.com
The bold-face IP addresses are different, there is trouble.
[size=150]Deteremine what IP is sent to Google:[/size]
That nat to Google is working properly can be checked in Asterix cli:
on asterisk server do:
sudo asterisk -rvvvv
xmpp set debug on
Then initiate a call via Google Voice into your asterisk server, or a call from your asterisk server out to Google Voice.
in the second XMPP sent to ‘’
there are series of candidate elements provided by Asterisk ice enabled in rtp.conf:
Ice basically lists every ip assigned to the server.
[ul][li]Make sure at least one candidate lists your asterisk server’s public ip, 1.2.3.4 above.[/li][/ul]
[size=150]Fix Google Voice:[/size]
in /etc/asterisk/rtp.conf insert in the [general] section:
stunaddr=stun.counterpath.com:3478
Your public ip should no be sent to Google if it wasn’t before.
This is not described in the official instructions here:
https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google
Also note that directmedia (rtp-udp voice packets sent direct from sip phone to sip phone) does not work for Google Voice. Google voice rtp will always go via your Asterisk server.