System information
channel drivers in Asterisk. For now chan_gtalk is fairly simple, but future versions of
Asterisk may add this feature.
Our gtalk.conf file looks like this:
[general]
bindaddr=0.0.0.0 ; Address to bind to
allowguests=yes ; Allow calls from people not in contact list
; Optional arguments
; externip=<external IP of server>
; stunaddr=<stun.yourdomain.tld>
[guest] ; special account for options on guest account
disallow=all
allow=ulaw
context=gtalk_incoming
connection=asterisk ; connection name defined in jabber.conf
If your Asterisk system lives behind NAT, you may need to add some additional options
to the [general] section in order to place the correct IP address into the headers. If you
have a static external IP address, you can use the externip option to specify it. Alter-
natively, you could use the stunaddr option to specify the address of your STUN server,
which will then look up your address from an external server and place that information
into the headers.
If you configure the stunaddr option in gtalk.conf and the lookup is suc-
cessful, it will override any value specified in the externip option.
Let’s discuss briefly the options we’ve configured in gtalk.conf. In the [general] section,
we have set the bindaddr option to 0.0.0.0, which means to listen on all interfaces.
#
You can also specify a single interface to listen on by specifying the IP address of that
interface. The next line is allowguests, which can be set to either yes or no but is only
useful when set to yes. Because the module does not offer the ability to specify different
control mechanisms for different users, all users are treated as guests.
*
Next we’ve specified the [guest] account, which will let us accept calls from Google
Voice and Google Talk users. This account is only used for incoming calls. When plac-
ing outgoing calls, we’ll use the account specified in the jabber.conf file. Within the
[guest] account, we’ve disabled all codecs with the disallow=all option, and then
specifically enabled the ulaw codec with allow=ulaw on the following line. Incoming
calls are then directed to the gtalk_incoming context with the context option. We
#The chan_gtalk module only support IPv4 interfaces.
* Future versions of Asterisk may offer more fine-grained control.
426 | Chapter 18: External Services