System information
You must already have a Gmail account, which you can get at http://
www.gmail.com.
Our jabber.conf file should look like this:
[general]
debug=no
autoprune=no
autoregister=yes
auth_policy=accept
[asterisk]
type=client
serverhost=talk.google.com
username=asterisk@shifteight.org
secret=<super_secret_password>
port=5222
usetls=yes
usesasl=yes
status=available
statusmessage="Ohai from Asterisk"
Let’s take a quick look at some of the options we just set so you understand what is
going on. The options are described in Table 18-3. Note that the first four options are
set in the [general] section, and the others are set in the peer section.
Table 18-3. jabber.conf options
Option Description
debug Enables/disables XMPP message debugging (which can be quite verbose). Available options are yes or no.
autoprune Enables/disables autoremoval of users from your buddy list each time res_jabber.so connects to your
accounts. Do not use this for accounts you might use outside of Asterisk (e.g., your personal account).
Available options are yes or no.
autoregister Specifies whether to automatically register users from your buddy list into memory. Available options
are yes or no.
auth_policy Determines whether or not we should automatically accept subscription requests. Available options are
accept or deny.
type Sets the type of client we will connect as. Available options are client or component. (You will almost
always want client.)
serverhost Indicates which host this connection should connect to (e.g., talk.google.com).
username Provides the username that will be used to connect to the serverhost (e.g., asterisk@gmail.com).
secret Specifies the password that will be used to connect to the serverhost.
port Indicates which port we will attempt the connection to serverhost on (e.g., 5222).
usetls Specifies whether to use TLS or not when connecting to serverhost. Available options are yes or no.
usesasl Specifies whether to use SASL or not when connecting to serverhost. Available options are yes or no.
420 | Chapter 18: External Services