首先你当然要装上asterisk,在Ubuntu上apt-get install -y asterisk
在神游上opkg install asterisk
然后到/etc/asterisk/下 (/opt/etc/asterisk/ on ac68u),改4个config。改一下GV
用户名和密码,其它都不用动。
文件改好之后service stop asterisk;service start asterisk (on ac68u it is /
opt/etc/init.d/S31asterisk11 stop|start)
obi里面用户名201,密码12345678,不喜欢自己改。
分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线
>> extension.conf (append content)
[home]
exten => 201,1,Dial(SIP/201,20)
exten => _NXXXXXX,1,Set(CALLERID(dnid)=1858${CALLERID(dnid)})
exten => _NXXXXXX,n,Goto(1858${EXTEN},1)
exten => _NXXNXXXXXX,1,Set(CALLERID(dnid)=1${CALLERID(dnid)})
exten => _NXXNXXXXXX,n,Goto(1${EXTEN},1)
exten => _1NXXNXXXXXX,1,Dial(Motif/google/${EXTEN}@voice.google.com,,r)
[incoming-motif]
exten => s,1,NoOp()
same => n,Wait(1)
same => n,Set(crazygooglecid=${CALLERID(name)})
same => n,Set(stripcrazysuffix=${CUT(crazygooglecid,@,1)})
same => n,Set(CALLERID(all)=${stripcrazysuffix})
same => n,Dial(SIP/201&SIP/203,20,D(:1))
分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线
>> motif.conf (replace content)
[default](!)
disallow=all
allow=ulaw
allow=h264
context=incoming-motif ; Default context that incoming sessions will land in
[gtalk-endpoint](default)
[google]
context=incoming-motif
disallow=all
allow=ulaw
connection=google
分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线
>> sip.conf (append)
[201]
deny=0.0.0.0/0.0.0.0
secret = 12345678
dtmfmode = rfc2833
canreinvite=no
context = home
host = dynamic
trustrpid=yes
sendrpid=no
type = friend
nat=no
qualify=yes
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/201
[email protected]
permit=0.0.0.0/0.0.0.0
callerid = User1
callcounter=yes
faxdetect=no
分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线分割线
>> xmpp.conf (replace content)
[google]
type=client
serverhost=talk.google.com
[email protected]
secret=YOUR_GV_PASS
priority=25
port=5222
usetls=yes
usesasl=yes
status=available
statusmessage=Asterisk Phone
timeout=5