Skip to content
Snippets Groups Projects
Commit db78eeb7 authored by Leif Madsen's avatar Leif Madsen
Browse files

Additional fixes to the extensions.conf.sample file.

Update the extensions.conf.sample [stdexten] context so that we use the 
variable instead of requiring it to be passed explicitly. Also updated uses of
the [stdexten] context throughout.

(closes issue #15858)
Reported by: pprindeville
Patches:
      stdexten-context-update.txt uploaded by lmadsen (license 10)
Tested by: pprindeville

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 4b69c3af
No related branches found
Tags 18.0.0
No related merge requests found
......@@ -236,7 +236,7 @@ TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;
; List canonical entries here
;
;exten => 12564286000,1,Gosub(stdexten(6000,IAX2/foo))
;exten => 12564286000,1,Gosub(6000,stdexten(IAX2/foo))
;exten => 12564286000,n,Goto(default,s,1) ; exited Voicemail
;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
......@@ -406,9 +406,9 @@ exten => _s-.,1,NoOp
[stdexten]
;
; Standard extension subroutine:
; ${ARG1} - Extension
; ${ARG2} - Device(s) to ring
; ${ARG3} - Optional context in Voicemail (if empty, then "default")
; ${EXTEN} - Extension
; ${ARG1} - Device(s) to ring
; ${ARG2} - Optional context in Voicemail (if empty, then "default")
;
; Note that the current version will drop through to the next priority in the
; case of their pressing '#'. This gives more flexibility in what do to next:
......@@ -422,9 +422,9 @@ exten => _s-.,1,NoOp
; previous value (before being declared as LOCAL()) upon Return.
;
exten => _X.,50000(stdexten),NoOp(Start stdexten)
exten => _X.,n,Set(LOCAL(ext)=${ARG1})
exten => _X.,n,Set(LOCAL(dev)=${ARG2})
exten => _X.,n,Set(LOCAL(cntx)=${ARG3})
exten => _X.,n,Set(LOCAL(ext)=${EXTEN})
exten => _X.,n,Set(LOCAL(dev)=${ARG1})
exten => _X.,n,Set(LOCAL(cntx)=${ARG2})
exten => _X.,n,Set(LOCAL(mbx)="${ext}"$["${cntx}" ? "@${cntx}" :: ""])
exten => _X.,n,Dial(${dev},20) ; Ring the interface, 20 seconds maximum
......@@ -527,7 +527,7 @@ exten => 1000,1,Goto(default,s,1)
;
exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
; (but skip if channel is not up)
exten => 1234,n,Gosub(stdexten(1234,${GLOBAL(CONSOLE)}))
exten => 1234,n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)}))
exten => 1234,n,Goto(default,s,1) ; exited Voicemail
exten => 1235,1,Voicemail(1234,u) ; Right to voicemail
......@@ -644,11 +644,11 @@ include => demo
;exten => 6391,1,Dial(JINGLE/asterisk@digium.com/mogorman@astjab.org) ;Dial via jingle using asterisk as the transport and calling mogorman.
;exten => 6394,1,Dial(Local/6275/n) ; this will dial ${MARK}
;exten => 6275,1,Gosub(stdexten(6275,${MARK}))
;exten => 6275,1,Gosub(${EXTEN},stdexten(${MARK}))
; assuming ${MARK} is something like DAHDI/2
;exten => 6275,n,Goto(default,s,1) ; exited Voicemail
;exten => mark,1,Goto(6275,1) ; alias mark to 6275
;exten => 6536,1,Gosub(stdexten(6236,${WIL}))
;exten => 6536,1,Gosub(${EXTEN},stdexten(${WIL}))
; Ditto for wil
;exten => 6536,n,Goto(default,s,1) ; exited Voicemail
;exten => wil,1,Goto(6236,1)
......@@ -715,10 +715,10 @@ include => demo
;
;[acme-extens]
;include => stdexten
;exten => 111,1,Gosub(stdexten(111,SIP/pete_1,acme))
;exten => 111,1,Gosub(111,stdexten(SIP/pete_1,acme))
;exten => 111,n,Goto(s,exten)
;
;exten => 112,1,Gosub(stdexten(112,SIP/nancy_1,acme))
;exten => 112,1,Gosub(112,stdexten(SIP/nancy_1,acme))
;exten => 112,n,Goto(s,end)
;
; end of acme example
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment