原文地址:http://www.cnblogs.com/phoenixken/archive/2007/05/21/754279.html
Asterisk 1.4.1版本开始支持XMPP协议及Jingle协议, 遵循Google公布的信令及RTP协议。通过架构配置,可实现Asterisk用户与Google Talk用户间的通话。

Asterisk是当前红得发紫的Open source IP-PBX平台,通过XMPP与即时聊天平台的对接,将在下一步的通信领域中带来旗杆效应 。

下面是配置通过的Asterisk 设置: 仅供参考。

[root@asterisk]# more sip.conf
[general]
context=google-in
bindport=5060
bindaddr=192.168.84.25
srvlookup=yes
dtmfmode=rfc2833
relaxdtmf=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
maxexpirey=30
defaultexpirey=180
canreinvite=yes
nat=0
UserAgent=Asterisk

[533]
type=friend
context=gtalk_out
regexten=533
username=533
secret=123456
fromuser=533
callerid=Test user
host=dynamic
nat=route
canreinvite=no
dtmfmode=RFC2833
incominglimit=3
mailbox=533

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

[gtalk_account]
type=client
serverhost=talk.google.com
username=abcd00@gmail.com/Talk
secret= "password"
port=5222
usetls=yes
usesasl=yes
buddy=gogtalk@gmail.com
statusmessage=”This is an Asterisk server”
timeout=100

[root@nistnetserver asterisk]# more gtalk.conf
[general]
context=google-in
allowguest=yes
[guest]
disallow=all
allow=ulaw
context=google-in
[buddy]
username=gogtalk@gmail.com
disallow=all
allow=ulaw
context=google-in
connection=gtalk_account

[root@asterisk]# more extensions.conf
[general]
static=yes
writeprotect=yes
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[google-in]
exten => s,1,NoOp( Call from Gtalk )
exten => s,n,Set(CALLERID(name)=”From Google Talk”)
exten => s,n,Dial(SIP/533)

[google-out]
exten => 200,1,Dial(gtalk/gtalk_account/gogtalk@gmail.com)
[gtalk_out]
include => google-in
include => google-out