Merged revisions 301311 via svnmerge from
authorPaul Belanger <paul.belanger@polybeacon.com>
Tue, 11 Jan 2011 19:19:01 +0000 (19:19 +0000)
committerPaul Belanger <paul.belanger@polybeacon.com>
Tue, 11 Jan 2011 19:19:01 +0000 (19:19 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r301311 | pabelanger | 2011-01-11 14:16:06 -0500 (Tue, 11 Jan 2011) | 9 lines

  Merged revisions 301310 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2

  ........
    r301310 | pabelanger | 2011-01-11 14:14:31 -0500 (Tue, 11 Jan 2011) | 2 lines

    Fix a logic issue when passing context ARG
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301319 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configs/extensions.conf.sample

index 2489d18..70ef647 100644 (file)
@@ -456,7 +456,7 @@ exten => _s-.,1,NoOp
 ; Standard extension subroutine:
 ;   ${EXTEN} - Extension
 ;   ${ARG1} - Device(s) to ring
-;   ${ARG2} - Optional context in Voicemail (if empty, then "default")
+;   ${ARG2} - Optional context in Voicemail
 ;
 ; 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:
@@ -473,23 +473,19 @@ exten => _X.,50000(stdexten),NoOp(Start stdexten)
 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
+exten => _X.,n,Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]?@${cntx})})
+exten => _X.,n,Dial(${dev},20)                         ; Ring the interface, 20 seconds maximum
 exten => _X.,n,Goto(stdexten-${DIALSTATUS},1)          ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
 
 exten => stdexten-NOANSWER,1,Voicemail(${mbx},u)       ; If unavailable, send to voicemail w/ unavail announce
-exten => stdexten-NOANSWER,n,NoOp(Finish stdexten NOANSWER)
 exten => stdexten-NOANSWER,n,Return()                  ; If they press #, return to start
 
-exten => stdexten-BUSY,1,Voicemail(${mbx},b)
-                                               ; If busy, send to voicemail w/ busy announce
-exten => stdexten-BUSY,n,NoOp(Finish stdexten BUSY)
+exten => stdexten-BUSY,1,Voicemail(${mbx},b)           ; If busy, send to voicemail w/ busy announce
 exten => stdexten-BUSY,n,Return()                      ; If they press #, return to start
 
 exten => _stde[x]te[n]-.,1,Goto(stdexten-NOANSWER,1)   ; Treat anything else as no answer
 
-exten => a,1,VoicemailMain(${mbx})             ; If they press *, send the user into VoicemailMain
+exten => a,1,VoicemailMain(${mbx})                     ; If they press *, send the user into VoicemailMain
 exten => a,n,Return()
 
 [stdPrivacyexten]