[Asterisk-Users] Call-in/Call-out

Erik Slooff erik at slooff.net
Wed Oct 5 06:27:36 MST 2005


<snip>
written by Crystal Stream, Incorporated
> Here is my extensions.conf file. Things have been left
> out or changed to protect the innocent.
> Why isn't it working when I call from the outside that
> when I press 124 it repeats the menu and doesn't
> initiate DISA correctly to dial out?
>
> [general]
> static=yes
> writeprotect=yes
>
> [globals]
>
> [voicepulse-in]
> exten => ${OURVOIP1},1,Noop(${DATETIME} ${CALLERID})
> exten => ${OURVOIP1},2,Answer
> exten => ${OURVOIP1},3,Goto(main-menu,s,2)
> exten => ${OURVOIP1},4,Hangup
>
> [nufone-in]
> exten => ${OURVOIP3},1,Noop(${DATETIME} ${CALLERID})
> exten => ${OURVOIP3},2,Answer
> exten => ${OURVOIP3},3,Goto(main-menu,s,2)
> exten => ${OURVOIP3},4,Hangup
>
> [incoming-sip]
> include => voicepulse-in
> include => nufone-in
>
> exten => s,1,Noop(${DATETIME} ${CALLERID})
> exten => s,2,Answer
> exten => s,3,Goto(main-menu,s,6)
> exten => s,4,Hangup
>
> ;;;; MAIN MENU ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> [main-menu]
> include => operator
> include => queues
>
> ; if pressed 4-digit extension:
> include => local
> ; conferences from outside:
> include => conferences-external
>
> ; for main menu selections:
> exten => 1,1,Goto(office-day,1,1)
> exten => 2,1,Goto(office-day,2,1)
> exten => 3,1,Goto(office-day,3,1)
> exten => 4,1,Goto(office-day,4,1)
> exten => 5,1,Goto(office-day,5,1)
>
> exten => s,1,Noop(${DATETIME} ${CALLERID})
> exten => s,2,Wait(${WAIT_AFTER_ANSWER})
> exten => s,3,SetCallerID(${CALLERID})
> exten => s,4,DigitTimeout,2
> exten => s,5,ResponseTimeout,7
> exten =>
> s,6,Background(/usr/local/etc/asterisk/ivr/UPGRADEPHONES)
> exten =>
> s,7,Background(/usr/local/etc/asterisk/ivr/GREETING)
> exten => s,8,WaitExten(1.2)
> exten => s,9,SetGlobalVar(prompt_loops=0)
> exten =>
> s,10,GotoIfTime(07:00-18:00|mon-thu|*|*?office-day,s,2)
>
> exten =>
> s,11,GotoIfTime(10:00-16:30|fri|*|*?office-day,s,2)
> exten => s,12,Goto(office-night,s,1)
>
> exten => t,1,Goto(main-menu,#,1)          ; If they
> take too long, go to hangup
>
> ; invalid
> exten => i,1,Wait(1)
> exten => i,2,Playback(invalid)   ; "That's not valid,
> try again"
> exten => i,3,Wait(1)
> exten => i,4,Goto(s,6)
>
> ; #=hangup
> exten => #,1,Wait(1)
> exten => #,2,Playback(vm-goodbye)
> exten => #,3,Wait(2)
> exten => #,4,Hangup
>
>
> [office-day]
> include => operator
> include => queues
>
> ; if pressed 3-digit extension:
> include => local
> ; conferences from outside:
> include => conferences-external
>
> ; for accessing voicemail:
> include => voicemail
>
> exten => s,1,SetGlobalVar(prompt_loops=1)
> exten => s,2,WaitExten(${BETWEEN_PROMPTS})
> exten =>
> s,3,Background(/usr/local/etc/asterisk/ivr/MAINMENU)
> exten => s,4,WaitExten(4)
> exten =>
> s,5,SetGlobalVar(prompt_loops=$[${prompt_loops} + 1])
> exten => s,6,GotoIf($[${prompt_loops} <
> ${MAX_MENU_LOOPS}] ? 2:23)
> exten => s,7,Goto(operator,0,1)
>
> ; invalid
> exten => i,1,Playback(invalid)   ; "That's not valid,
> try again"
> exten => i,2,Wait(1)
> exten => i,3,Goto(s,7)
> ; timeout
> exten => t,1,Goto(operator,0,1)
>
> [office-night]
> include => operator
> include => queues
>
> ; if pressed 3-digit extension:
> include => local
> ; conferences from outside:
> include => conferences-external
>
> ; for accessing voicemail:
> include => voicemail
>
> exten => s,1,SetGlobalVar(prompt_loops=1)
> exten => s,2,WaitExten(${BETWEEN_PROMPTS})
> exten =>
> s,3,Background(/usr/local/etc/asterisk/ivr/MAINMENU)
> exten => s,4,WaitExten(4)
> exten =>
> s,5,SetGlobalVar(prompt_loops=$[${prompt_loops} + 1])
> exten => s,6,GotoIf($[${prompt_loops} <
> ${MAX_MENU_LOOPS}] ? 2:23)
> exten => s,7,Goto(operator,0,1)
>
> ; invalid
> exten => i,1,Wait(1)
> exten => i,2,Playback(invalid)   ; "That's not valid,
> try again"
> exten => i,3,Wait(1)
> exten => i,4,Goto(s,4)
>
> ; timeout
> exten => t,1,Goto(main-menu,#,1)          ; If they
> take too long, go to hangup
>
> [local]
> ; Directory:
> exten => 411,1,Directory(crystal-sip|local)
> exten => 411,2,Hangup
>
> ; DISA
> exten => 124,1,Answer
> exten => 124,2,DigitTimeout(5)
> exten => 124,3,ResponseTimeout(10)
> exten => 124,4,Authenticate(16435679)
> exten => 124,DISA(4376194673164379|crystal-sip)
<and snip>
---------------^^^^
Why did you not set a priority here or is it a typo?

Erik





More information about the asterisk-users mailing list