System information

specify which account calls will be coming from with the connection option, which
we’ve set to the account created in jabber.conf.
The chan_gtalk module does not support reloading the configuration. If you change
the configuration, you will have to either restart Asterisk or unload and reload the
module, which can only be done when no GTalk calls are up. You can do that using
the following commands:
*CLI> module unload chan_gtalk.so
*CLI> module load chan_gtalk.so
Accepting calls from Google Talk
To allow calls from other Google Talk users, we need to configure our dialplan to accept
incoming calls. Inside your extensions.conf file, add the [gtalk_incoming] context:
[gtalk_incoming]
exten => s,1,Verbose(2,Incoming Gtalk call from ${CALLERID(all)})
same => n,Answer()
same => n,Dial(SIP/0000FFFF0001,30)
same => n,Hangup()
We’ve now configured a simple test dialplan that will send calls to the SIP/
0000FFFF0001 device and wait 30 seconds before hanging up the line. The s extension
can be used to match any incoming call from Google Talk or Google Voice, but if you
have multiple accounts that could be coming into this context, you can match different
users by specifying the username portion of the Gmail email address as the extension.
So, for example, if we had a user my_asterisk_user@gmail.com, the username portion
would be my_asterisk_user, and this is what we’d specify in [gtalk_incoming]:
[gtalk_incoming]
exten => my_asterisk_user,1,Verbose(2,Gtalk call from ${CALLERID(all)})
same => n,Answer()
same => n,Dial(SIP/0000FFFF0001,3)
same => n,Hangup()
The order of rules used for matching incoming calls to chan_gtalk is:
1. Match the username portion of the Gmail account in the context specified for the
[guest] account.
2. Match the s extension in the context specified for the [guest] account.
3. Match the s extension in the [default] context.
Accepting calls from Google Voice
The configuration for accepting calls from Google Voice is similar (if not identical) to
that for Google Talk, which we set up in the preceding section. A little tip, though, is
that sometimes you can’t disable the call screening functionality (for some reason we
still got it even when we’d disabled it in the Google Voice control panel). If you run
into this problem but don’t want to have to screen your calls, you can automatically
Using XMPP (Jabber) with Asterisk | 427