Asterisk 11 + google voice [solved]

Hi all,

I cannot seem to figure out my configuration to get google voice and asterisk playing nicely. This is my configuration along with corresponding log messages:

log message

CALL_ID [C-00000000] created by thread.
For destination '192.168.6.15', our source address is '192.168.6.1'.
Setting SIP_TRANSPORT_UDP with address 192.168.6.1:5060
Allocating new SIP dialog for fde6d118-c1d5-1230-7c9e-c038f9b30000 - INVITE (No RTP)
CALL_ID [C-00000000] bound to thread.
Begin: parsing SIP "Supported: timer, 100rel"
Found SIP option: -timer-
Matched SIP option: timer
Found SIP option: -100rel-
Matched SIP option: 100rel
Using engine 'asterisk' for RTP instance '0x7f185400e788'
Allocated port 18744 for RTP instance '0x7f185400e788'
RTP instance '0x7f185400e788' is setup and ready to go
Setup RTCP on RTP instance '0x7f185400e788'
Setting NAT on RTP to Off
Processing session-level SDP v=0... UNSUPPORTED OR FAILED.
Processing session-level SDP o=- 1905461344291330214 5355068562481029090 IN IP4 192.168.6.15... UNSUPPORTED OR FAILED.
Processing session-level SDP s=-... UNSUPPORTED OR FAILED.
Processing session-level SDP t=0 0... UNSUPPORTED OR FAILED.
Setting payload 18 based on m type on 0x7f18b00c0ac0
Setting payload 97 based on m type on 0x7f18b00c0ac0
Setting payload 8 based on m type on 0x7f18b00c0ac0
Setting payload 0 based on m type on 0x7f18b00c0ac0
Setting payload 104 based on m type on 0x7f18b00c0ac0
Setting payload 101 based on m type on 0x7f18b00c0ac0
Processing media-level (audio) SDP c=IN IP4 192.168.6.15... OK.
Processing media-level (audio) SDP a=rtpmap:18 G729/8000... OK.
Processing media-level (audio) SDP a=rtpmap:97 ILBC/8000... OK.
Processing media-level (audio) SDP a=fmtp:97 mode=30... OK.
Processing media-level (audio) SDP a=rtpmap:8 PCMA/8000... OK.
Processing media-level (audio) SDP a=rtpmap:0 PCMU/8000... OK.
Processing media-level (audio) SDP a=rtpmap:104 speex/8000... OK.
Processing media-level (audio) SDP a=rtpmap:101 telephone-event/8000... OK.
Processing media-level (audio) SDP a=fmtp:101 0-15... UNSUPPORTED OR FAILED.
Setting RTCP address on RTP instance '0x7f185400e788'
Copying payload 0 from 0x7f18b00c0ac0 to 0x7f185400e950
Copying payload 8 from 0x7f18b00c0ac0 to 0x7f185400e950
Copying payload 18 from 0x7f18b00c0ac0 to 0x7f185400e950
Copying payload 97 from 0x7f18b00c0ac0 to 0x7f185400e950
Copying payload 101 from 0x7f18b00c0ac0 to 0x7f185400e950
Copying payload 104 from 0x7f18b00c0ac0 to 0x7f185400e950
Ignoring duplicate RTCP property on RTP instance '0x7f185400e788'
We're settling with these formats: (ulaw|alaw)
Checking SIP call limits for device 
Updating call counter for incoming call
Trying to put 'SIP/2.0 404' onto UDP socket destined for 192.168.6.15:58073
Call from '' (192.168.6.15:58073) to extension 'xxxxxxxxxx' rejected because extension not found in context 'default'.
Updating call counter for incoming call
Call_ID [C-00000000] being removed from thread.
CALL_ID [C-00000000] bound to thread.
Stopping retransmission on 'fde6d118-c1d5-1230-7c9e-c038f9b30000' of Response 37478725: Match Found
Call_ID [C-00000000] being removed from thread.
Destroying SIP dialog fde6d118-c1d5-1230-7c9e-c038f9b30000
Destroyed RTP instance '0x7f185400e788'
XML parsing successful

extensions.conf

[general]
static=yes
writeprotect=no

;[default]
;include => google-out
;include => google-in

;https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google

[google-out]
exten => _1XXXXXXXXXX,1,Dial(Motif/WalterWhite/${EXTEN}@voice.google.com,,r)

[google-in]
exten => s,1,NoOp()
 same => n,Set(crazygooglecid=${CALLERID(name)})
 same => n,Set(stripcrazysuffix=${CUT(crazygooglecid,@,1)})
 same => n,Set(CALLERID(all)=${stripcrazysuffix})
 same => n,Dial(SIP/WalterWhite,20,D(:1))

motif.conf

;[buddy]
[WalterWhite]
context=google-in
disallow=all
allow=ulaw
connection=WalterWhite

sip.conf

[WalterWhite]
;type=friend
type=peer
username=WalterWhite
secret=1234
host=dynamic
context=google-out

xmpp.conf

[general]
debug=yes
autoprune=no
autoregister=no

[WalterWhite]
type=client
serverhost=talk.google.com
username=fredrogers@gmail.com
secret=1234
priority=1
port=5222
usetls=yes
usesasl=yes
status=available
statusmessage="Asterisk Instance - Google Talk - VoIP"
timeout=5

When I attempt to dial out on my SIP phone, I get the error “contact offline” from my SIP phone while the error message in asterisk indicates something else. I don’t understand how the dialplan works.

If I add the lines:

[default]
include => google-out
include => google-in

I then get the error, unable to establish connection.

Endpoint 'WalterWhite' does not exist.
Unable to create channel of type 'Motif' (cause 6 - Channel unacceptable)

Any ideas what I am missing?

EDIT: I figured it out, I had to use [WalterWhite] instead of [buddy]. It appears that is the identifier which is needed to match my extensions.conf. I can now make and receive calls perfectly fine.

Walter