Open Source Software Asterisk “Hello World” Initial Demo Mode.
-
Upload
gloria-hutchinson -
Category
Documents
-
view
230 -
download
2
Transcript of Open Source Software Asterisk “Hello World” Initial Demo Mode.
Agenda
What we will accomplish sip.conf extensions.conf iax.conf Extra’s
enum.conf enum lookup routing
Questions
sip.conf
[1234]type=friend username=1234secret=XXXXcontext=incomingcallerid=John Doe <1234>host=dynamicnat=yescanreinvite=nodtmfmode=rfc2833call-limit=1mailbox=1234@defaultdisallow=allallow=ulawQualify=5000
extensions.conf
[demo];; We start with what to do when a call first comes in.;exten => s,1,Wait,1 ; Wait a second, just for funexten => s,n,Answer ; Answer the lineexten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 secondsexten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 secondsexten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory messageexten => s,n(instruct),BackGround(demo-instruct) ; Play some instructionsexten => s,n,WaitExten ; Wait for an extension to be dialed.
exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.exten => 2,n,Goto(s,instruct)
exten => 3,1,Set(LANGUAGE()=en) ; Set language to englishexten => 3,n,Goto(s,restart) ; Start with the congratulations
exten => 1000,1,Goto(default,s,1)
extensions.conf - 2
; We also create an example user, 1234, who is on the console and has; voicemail, etc.;exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
; (but skip if channel is not up)exten => 1234,n,Macro(stdexten,1234,${CONSOLE})
exten => 1235,1,Voicemail(u1234) ; Right to voicemail
exten => 1236,1,Dial(Console/dsp) ; Ring foreverexten => 1236,n,Voicemail(u1234) ; Unless busy
;; # for when they're done with the demo;exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"exten => #,n,Hangup ; Hang them up.
extensions.conf - 3
; Create an extension, 500, for dialing the; Asterisk demo.;exten => 500,1,Playback(demo-abouttotry); Let them know what's going onexten => 500,n,Dial(IAX2/[email protected]/s@default); Call the Asterisk demoexten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo siteexten => 500,n,Goto(s,6) ; Return to the start over message.
iax.conf
[demo]type=peerusername=asterisksecret=supersecrethost=216.207.245.47;sendani=no;host=asterisk.linux-support.net;port=5036;mask=255.255.255.255;qualify=yes ; Make sure this peer is alive;qualifysmoothing = yes ; use an average of the last two PONG
; results to reduce falsely detected LAGGED hosts
; Default: Off;qualifyfreqok = 60000 ; how frequently to ping the peer when
; everything seems to be ok, in milliseconds;qualifyfreqnotok = 10000 ; how frequently to ping the peer when it's
; either LAGGED or UNAVAILABLE, in milliseconds;jitterbuffer=no ; Turn off jitter buffer for this peer
enum lookup – extensions.conf[company-default];--------------------------------------------------------; Primary +1 Dialing with enum support;--------------------------------------------------------exten => _1NXXN.,1,SetCallerID(${CALLERID})exten => _1NXXN.,2,EnumLookup(${EXTEN})exten => _1NXXN.,3,BackGround(enum-lookup-successful)exten => _1NXXN.,4,Dial(${ENUM},30,r)exten => _1NXXN.,5,Goto(204)exten => _1NXXN.,103,Dial(Zap/g1/${EXTEN},40,r)exten => _1NXXN.,104,Dial(SIP/${EXTEN}@broadvoice,45,r)exten => _1NXXN.,105,Dial(IAX2/XXXX@voipjet/${EXTEN},60,r)exten => _1NXXN.,106,Congestion