本帖最後由 角色 於 2012-11-27 21:46 編輯
In order to simplify the following discussion, please follow the procedures when you set up multiple Google Voice accounts.
Google's talk service operates on port 5222; port=5222
1. Installation of Asterisk 11 from a tarball zipped source code
2. backup the files sip.conf, extensions.conf, extensions.ael, motif.conf and xmpp.conf and followed by empty these files.
3. sip.conf contains- [general]
- bindport=5080
- bindaddr=192.168.1.6
- srvlookup = yes
- ;nat=force_rport,comedia
- nat=no
- [2001]
- type=friend
- secret=2001
- qualify=yes
- host=dynamic
- canreinvit=no
- context=internal
- [2002]
- type=friend
- secret=2002
- qualify=yes
- host=dynamic
- canreinvit=no
- context=internal
複製代碼 4. extensions.conf contains:- [viaMotif]
- exten => _747XXXXXXXXXX,1,Dial(Motif/google1/+1${EXTEN:3}@voice.google.com,,r)
- exten => _748XXXXXXXXXX,1,Dial(Motif/google2/+1${EXTEN:3}@voice.google.com,,r)
- [internal]
- include => viaMotif
- exten => 2001,1,Dial(SIP/2001,,r)
- exten => 2002,1,Dial(SIP/2002,,r)
- ;Echo Test
- exten => 15,1,Playback(demo-echotest)
- exten => 15,n,Echo
- exten => 15,n,Playback(demo-echodone)
- [incoming-motif1]
- exten => s,1,NoOp()
- same => n,Wait(1)
- same => n,Answer()
- same => n,SendDTMF(1)
- same => n,Dial(SIP/2001,20)
- [incoming-motif2]
- exten => s,1,NoOp()
- same => n,Wait(1)
- same => n,Answer()
- same => n,SendDTMF(1)
- same => n,Dial(SIP/2002,20)
複製代碼 5. xmpp.conf contains- [general]
- [google1]
- type=client
- serverhost=talk.google.com
- username=gv1@gmail.com
- secret=password_gv1
- priority=1
- port=5222
- usetls=yes
- usesasl=yes
- status=available
- statusmessage="I am available"
- timeout=5
- [google2]
- type=client
- serverhost=talk.google.com
- username=gv2@gmail.com
- secret=password_gv2
- priority=1
- port=5222
- usetls=yes
- usesasl=yes
- status=available
- statusmessage="I am available"
- timeout=5
複製代碼 6. motif contains- [google1]
- context=incoming-motif1
- disallow=all
- allow=ulaw
- connection=google1
- [google2]
- context=incoming-motif2
- disallow=all
- allow=ulaw
- connection=google2
複製代碼 Outbound:
Prefix=747 + <9-digit US/CAN number> using GV1 account
Prefix=748 + <9-digit US/CAN number> using GV2 account
Inbound:
incoming call to GV1 to be picked up by extension 2001
incoming call to GV2 to be picked up by extension 2002
Extension 15 is used for Echo Test. |