|
Working Settings for Using Asterisk with VT White
Below is just a very basic configuration to use as a base to set up your VTWhite service on an Asterisk server. Here's a quick explanation of how it works:
To get things started the first thing to do would be to add your server as a node in your VTWhite account interface. To do so just click on node manager and fill in the necessary server information. Once this is complete, create the file called sip.conf in your asterisk configuration folder(most likely /etc/asterisk) with the contents below. This file contains everything you will need to connect to VTWhite's servers. Notice that since the connection is a peer, there is no registration line. The other entry in sip.conf, labeled [100] is just a sample extension created for the means of this example configuration. It is in no way needed for using VTWhite, but is necessary for the use of this sample configuration. To use this extension, simply register a softphone or ATA using the following credentials:
proxy- your.server.ip.address
username- 100
password- password
Next comes extensions.conf, which acts as the call logic for processing incoming and outgoing calls. You will see 2 contexts created in this file. A context is simply an independent scenario for processing a call. We specify in sip.conf under the line "context=vtwhite-test" that incoming calls from VTWhite will be processed by the [vtwhite-test] context. You'll see this context is set to ring extension 100 whenever a call from VTWhite comes in to the server. If the call isn't answered in 25 seconds, the call is sent to voicemail. The second context [vtwhite-out] is meant for outgoing calls. This context is set up to call any 10 or 11 digit number dialed by sending it through VTWhite for processing. The other option is to call yourself, extension 100, which will in turn bring you to VoicemailMain, asterisk's voicemail retrieval interface. This is where you would check your messages, etc.
The third file is voicemail.conf. This is just a quick sample of how to set up voicemail accounts in asterisk. You can see the template as well as the mailbox 100 created.
Let me know if you have any questions:
SIP.CONF
---------------
[general]
port=5060
bindport=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
dtmf=rfc2833
context=incoming
rtptimeout=120
relaxdtmf=no
rtcachefriends=yes
rtautoclear=yes
rtupdate=yes
trustrpid=yes
maxepirey=1200
defaultexpirey=1100
sendrpid=yes
progressinband=yes
insecure=invite
autocreatepeer=no
allowguest=yes
;vtwhite's peer. This connection is what will allow you to receive and send out calls via the
;VTWhite server. You will need to add this server as a node in the node manager as well.
[vtwhite]
type=peer
host=sip.vtwhite.com
context=vtwhite-test
canreinvite=no
insecure=very
qualify=yes
nat=no
;This is just a sample extension created for testing purposes
[100]
type=friend
regexten=100
regcontext=vtwhite-out
username=100
secret=password
callerid="Iain TestExtension" <100>
host=dynamic
nat=yes
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context=vtwhite-out
dtmf=rfc2833
extensions.conf
------------------
[general]
static=yes
writeprotect=no
[globals]
DYNAMIC_FEATURES=>automon
CONSOLE=Console/dsp
;TRUNK1=@vtwhite
[vtwhite-test]
;For all incoming calls from VTWhite call Iain's extension which is 100
exten => _X!,1,VERBOSE(1|${DATETIME} -- Calling Iain for VTWhite -- Incoming Call from ${CALLERIDNUM})
exten => _X!,2,Dial(SIP/100,25,rTw)
exten => _X!,3,VERBOSE(1|${DATETIME} -- Iain Didn't Answer, leaving Voicemail)
exten => _X!,4,Voicemail(su100)
exten => _X!,5,Hangup
[vtwhite-out]
;check voicemail
exten => 100,1,VoicemailMain()
;dial out 10 digit numbers
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@sip.vtwhite.com,25,rTw)
;dialout 11 digit numbers
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@sip.vtwhite.com,25,rTw)
voicemail.conf
---------------------
[general]
maxlogins=3
silencethreshold=128
maxsilence=10
maxgreet=60
maxmessage=120
serveremail=voicemail@mynode.com
fromstring="Voicemail Service"
emailsubject=You have a new voicemail from ${VM_CIDNAME}
emailbody=Dear ${VM_NAME}:\n\n\n You were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance. Thank you.\n\n\t\t\t\t--The Voicemail System-- \n\n
[zonemessages]
AST=America/Anchorage|
HST=Pacific/Honolulu|
EST=America/New_York|
CST=America/Chicago|
MST=America/Phoenix|
PST=America/Los_Angeles|
[default]
;mailbox => password,user,user's email
100 => 4321,Iain,iain@vtwhite.com
Keep in mind this is a very basic scaffold for what you will probably want to do, but it will at least get you started if you feel stuck. Feel free to PM me if you have any other questions or if you're having problems with this configuration. Thanks
-Iain
|