I installed asterisk 13 from source on an old laptop and I have connected my gvoice account to it. Inbound/outbound calls are working but I have a couple issues.
-
The incoming-motif CID is showing as the google voice number instead of the actual callers number
-
When the incoming caller hangs up there appears to be no response from google telling asterisk to hang up the calls. It will just ring until timeout.
relevent extensions.conf:
[incoming-motif]
exten => s,1,NoOp(“Receiving call from google voice”)
same => n,Wait(1)
same => n,Answer()
same => n,Set(cnum=${CALLERID(number)})
same => n,Set(cnum=${cnum:2})
same => n,Set(CALLERID(all)="" <${cnum}>)
same => n,Dial(SIP/jeff&SIP/googletest,30,twD(:1))
[outgoing]
exten => _1XXXXXXXXXX,1,Dial(Motif/google/${EXTEN}@voice.google.com,r)
MOTIF.CONF
default
disallow=all
allow=ulaw
allow=h264
context=incoming-motif
google
transport=google-v1
context=incoming-motif
disallow=all
allow=ulaw
connection=google
XMPP.CONF
[google]
type=client
serverhost=talk.google.com
username=myusername@gmail.com
secret=mysecret
priority=25
port=5222
usetls=yes
usesasl=yes
status=available
statusmessage="I am available"
timeout=5
Here is the feedback from the CLI on a call (i replaced my gvoice number with 1234567890). I hang up after hearing the first ring from asterisk…
– Executing [s@incoming-motif:1] NoOp(“Motif/+1234567890-4eaf”, ““Receiving call from google voice””) in new stack
– Executing [s@incoming-motif:2] Wait(“Motif/+1234567890-4eaf”, “1”) in new stack
– Executing [s@incoming-motif:3] Answer(“Motif/+1234567890-4eaf”, “”) in new stack
– Executing [s@incoming-motif:4] Set(“Motif/+1234567890-4eaf”, “cnum=+1234567890”) in new stack
– Executing [s@incoming-motif:5] Set(“Motif/+1234567890-4eaf”, “cnum=234567890”) in new stack
– Executing [s@incoming-motif:6] Set(“Motif/+1234567890-4eaf”, “CALLERID(all)=”" <234567890>") in new stack
– Executing [s@incoming-motif:7] Dial(“Motif/+1234567890-4eaf”, “SIP/jeff&SIP/googletest,30,twD(:1)”) in new stack
== Using SIP RTP CoS mark 5
== Using SIP RTP CoS mark 5
– Called SIP/jeff
– Called SIP/googletest
– SIP/jeff-00000000 is ringing
– SIP/googletest-00000001 is ringing
== Spawn extension (incoming-motif, s, 7) exited non-zero on ‘Motif/+1234567890-4eaf’
I’m not sure what other info is needed. I am using pjsip for NAT traversal