Index: /freepbx/branches/2.2/amp_conf/astetc/extensions.conf =================================================================== --- /freepbx/branches/2.2/amp_conf/astetc/extensions.conf (revision 3798) +++ /freepbx/branches/2.2/amp_conf/astetc/extensions.conf (revision 3805) @@ -56,5 +56,4 @@ exten => s,10,Dial(${ds}) ; dialparties will set the priority to 10 if $ds is not null -exten => s,11,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!="" ]?${DIALSTATUS_CW}:${DIALSTATUS})}) exten => s,20,NoOp(Returned from dialparties with hunt groups to dial ) @@ -131,126 +130,5 @@ exten => _s-.,n,Congestion(10) -;------------------------------------------------------------------------ -; [macro-vm] -;------------------------------------------------------------------------ -; CONTEXT: macro-vm -; PURPOSE: call voicemail system and extend with personal ivr -; -; Under normal use, this macro will call the voicemail system with the extension and -; desired greeting mode of busy, unavailable or as specified with direct voicemail -; calls (usually unavailable) when entered from destinations. -; -; The voicemail system's two greetings have been 'hijacked' as follows to extend the -; system by giving the option of a private 'ivr' for each voicemail user. The following -; applies to both the busy and unavailable modes of voicemail and can be applied to one -; or both, and differently. -; -; Global Defaults: -; -; The following are default values, used in both busy and unavail modes if no specific -; values are specified. -; -; VMX_REPEAT -; The number of times to repeat the users message if no option is pressed. -; VMX_TIMEOUT -; The timeout to wait after playing message before repeating or giving up. -; VMX_LOOPS -; The number of times it should replay the message and check for an option when -; an invalid option is pressed. -; -; VMX_OPTS_DOVM -; Default voicemail option to use if vm is chosen as an option. No options will -; cause Allison's generic message, 's' will go straight to beep. -; VMX_OPTS_TIMEOUT -; Default voicemail option to use if it times out with no options. No options will -; cause Allison's generic message, 's' will go straight to beep. -; IF THE USER PRESSES # - it will look like a timeout as well since no option will -; be presented. If the user wishes to enable a mode where a caller can press # -; during their message and it goes straight to voicemail with only a 'beep' then -; this should be set to 's'. -; VMX_OPTS_LOOPS -; Default voicemail option to use if to many wrong options occur. No options will -; cause Allison's generic message, 's' will go straight to beep. -; -; VMX_CONTEXT -; Default context for user destinations if not supplied in the user's settings -; VMX_PRI -; Default priority for user destinations if not supplied in the user's settings -; -; VMX_TIMEDEST_CONTEXT -; Default context for timeout destination if not supplied in the user's settings -; VMX_TIMEDEST_EXT -; Default extension for timeout destination if not supplied in the user's settings -; VMX_TIMEDEST_PRI -; Default priority for timeout destination if not supplied in the user's settings -; -; VMX_LOOPDEST_CONTEXT -; Default context for loops destination if not supplied in the user's settings -; VMX_LOOPDEST_EXT -; Default extension for loops destination if not supplied in the user's settings -; VMX_LOOPDEST_PRI -; Default priority for loops destination if not supplied in the user's settings -; -; -; The AMPUSER database variable has been extended with a 'vmx' tree (vm-extension). A -; duplicate set is included for both unavail and busy. You could choose for to have an -; ivr when unavail is taken, but not with busy - or a different once with busy. -; The full list is below, each specific entry is futher described: -; -; state: Whether teh current mode is enabled or disabled. Anything but 'enabled' is -; treated as disabled. -; repeat: This is the number of times that the users message should be played after the -; timeout if the user has not entered anything. It is just a variable to the -; Read() function which will do the repeating. -; timeout: This is how long to wait after the message has been read for a response from -; the user. A caller can enter a digit any time during the playback. -; loops: This is the number of loops that the system will allow a caller to retry if -; they enter a bad menu choice, before going to the loop failover destination -; vmxopts: This is the vm options to send to the voicemail command used when a specific -; voicemail destination is chosen (inidcated by 'dovm' in the ext field). This is -; typically either set to 's' or left blank. When set to 's' there will be no -; message played when entering the voicemail, just a beep. When blank, you will -; have Allison's generic message played. It is not typical to play the greetings -; since they have been 'hijacked' for these IVR's and from a caller's perspecitive -; this system appears interconnected with the voicemail so instructions can be -; left there. -; timedest: The three variables: ext, context and pri are the goto destination if the caller -; enters no options and it timesout. None have to be set and a system default -; will be used. If just ext is set, then defaults will be used for context and -; pri, etc. -; loopdest: This is identical to timedest but used if the caller exceeds the maximum invalid -; menu choices. -; [0-9*]: The user can specify up to 11 ivr options, all as single digits from 0-9 or *. The -; # key can not be used since it is used as a terminator key for the Read command -; and will never be returned. A minimum of the ext must be specified for each valid -; option and as above, the context and priority can also be specified if the default -; is not to be used. -; Option '0' takes on a special meaning. Since a user is able to break out of the -; voicemail command once entering it with a 0, if specified, the 0 destination will -; be used. -; Option '*' can also be used to breakout. It is undecided at this point whether -; providing that option will be used as well. (probably should). -; -; -; /AMPUSER//vmx/[busy|unavail]/state: enabled|disabled -; /AMPUSER//vmx/[busy|unavail]/repeat: n (times to repeat message) -; /AMPUSER//vmx/[busy|unavail]/timeout: n (timeout to wait for digit) -; /AMPUSER//vmx/[busy|unavail]/loops: n (loop returies for invalid entries) -; /AMPUSER//vmx/[busy|unavail]/vmxopts/dovm: vmoptions (if ext is dovm) -; /AMPUSER//vmx/[busy|unavail]/vmxopts/timeout: vmoptions (if timeout) -; /AMPUSER//vmx/[busy|unavail]/vmxopts/loops: vmoptions (if loops) -; /AMPUSER//vmx/[busy|unavail]/timedest/ext: extension (if timeout) -; /AMPUSER//vmx/[busy|unavail]/timedest/context: context (if timeout) -; /AMPUSER//vmx/[busy|unavail]/timedest/pri: priority (if timeout) -; /AMPUSER//vmx/[busy|unavail]/loopdest/ext: extension (if too many failures) -; /AMPUSER//vmx/[busy|unavail]/loopdest/context: context (if too many failures) -; /AMPUSER//vmx/[busy|unavail]/loopdest/pri: priority (if too many failures) -; /AMPUSER//vmx/[busy|unavail]/[0-9*]/ext: extension (dovm for vm access) -; /AMPUSER//vmx/[busy|unavail]/[0-9*]/context: context -; /AMPUSER//vmx/[busy|unavail]/[0-9*]/pri: priority -;------------------------------------------------------------------------ [macro-vm] -; ARG1 - extension -; ARG2 - DIRECTDIAL/BUSY exten => s,1,Macro(user-callerid,SKIPTTL) exten => s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")}) @@ -260,118 +138,9 @@ ; transfers will properly function. ; -exten => s,n,GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?vmx,1) +exten => s,n,GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?s-${ARG2},1) ; ; we didn't branch so block this from voicemail ; exten => s,n,Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)}) - - -; If vmx not enabled for the current mode,then jump to normal voicemail behavior -; -exten => vmx,1,Set(MODE=${IF($["${ARG2}"="BUSY"]?busy:unavail)}) -exten => vmx,n,GotoIf($["${ARG2}" != "DIRECTDIAL"]?notdirect) -exten => vmx,n,Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = "1"]?busy:${MODE})}) -exten => vmx,n(notdirect),Noop(Checking if ext ${ARG1} is enabled: ${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}) -exten => vmx,n,GotoIf($["${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}" != "enabled"]?s-${ARG2},1) - -; If the required voicemail file does not exist, then abort and go to normal voicemail behavior -; TODO: figure out which is proper file (.wav or .WAV) and maybe find a better way -; -exten => vmx,n,Macro(get-vmcontext,${ARG1}) -exten => vmx,n(file),System(ls /var/spool/asterisk/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.wav) - -; Get the repeat, timeout and loop times to use if they are overriden form the global settings -; -exten => vmx,n,Set(LOOPCOUNT=0) -exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/repeat)}" = "0"]?vmxtime) -exten => vmx,n,Set(VMX_REPEAT=${DB_RESULT}) -exten => vmx,n(vmxtime),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timeout)}" = "0"]?vmxloops) -exten => vmx,n,Set(VMX_TIMEOUT=${DB_RESULT}) -exten => vmx,n(vmxloops),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loops)}" = "0"]?vmxanswer) -exten => vmx,n,Set(VMX_LOOPS=${DB_RESULT}) -exten => vmx,n(vmxanswer),Answer() - -; Now play the users voicemail recording as the basis for their ivr, the Read command will repeat as needed and if it timesout -; then we go to the timeout. Otherwise handle invalid options by looping until the limit until a valid option is played. -; -exten => vmx,n(loopstart),Read(ACTION,/var/spool/asterisk/voicemail/${VMCONTEXT}/${ARG1}/${MODE},1,skip,${VMX_REPEAT},${VMX_TIMEOUT}) -exten => vmx,n,GotoIf($["${EXISTS(${ACTION})}" = "1"]?checkopt) - -; If we are here we timed out, go to the required destination -; -exten => vmx,n(noopt),Noop(Timeout: going to timeout dest) -exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_TIMEOUT}) -exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/timeout)}" = "0"]?chktime) -exten => vmx,n,Set(VMX_OPTS=${DB_RESULT}) -exten => vmx,n(chktime),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/ext)}" = "0"]?dotime) -exten => vmx,n,Set(VMX_TIMEDEST_EXT=${DB_RESULT}) -exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/context)}" = "0"]?timepri) -exten => vmx,n,Set(VMX_TIMEDEST_CONTEXT=${DB_RESULT}) -exten => vmx,n(timepri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/pri)}" = "0"]?dotime) -exten => vmx,n,Set(VMX_TIMEDEST_PRI=${DB_RESULT}) -exten => vmx,n(dotime),Goto(${VMX_TIMEDEST_CONTEXT},${VMX_TIMEDEST_EXT},${VMX_TIMEDEST_PRI}) - -; We got an option, check if the option is defined, or one of the system defaults -; -exten => vmx,n(checkopt),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/ext)}" = "1"]?doopt) -exten => vmx,n,GotoIf($["${ACTION}" = "0"]?o,1) -exten => vmx,n,GotoIf($["${ACTION}" = "*"]?adef,1) - -; Got invalid option loop until the max -; -exten => vmx,n,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1]) -exten => vmx,n,GotoIf($[${LOOPCOUNT} > ${VMX_LOOPS}]?toomany) -exten => vmx,n,Playback(pm-invalid-option&please-try-again) -exten => vmx,n,Goto(loopstart) - -; tomany: to many invalid options, go to the specified destination -; -exten => vmx,n(toomany),Noop(Too Many invalid entries, got to invalid dest) -exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_LOOPS}) -exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/loops)}" = "0"]?chkloop) -exten => vmx,n,Set(VMX_OPTS=${DB_RESULT}) -exten => vmx,n(chkloop),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/ext)}" = "0"]?doloop) -exten => vmx,n,Set(VMX_LOOPDEST_EXT=${DB_RESULT}) -exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/context)}" = "0"]?looppri) -exten => vmx,n,Set(VMX_LOOPDEST_CONTEXT=${DB_RESULT}) ;TODO make configurable per above -exten => vmx,n(looppri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/pri)}" = "0"]?doloop) -exten => vmx,n,Set(VMX_LOOPDEST_PRI=${DB_RESULT}) ;TODO make configurable per above -exten => vmx,n(doloop),Goto(${VMX_LOOPDEST_CONTEXT},${VMX_LOOPDEST_EXT},${VMX_LOOPDEST_PRI}) - -; doopt: execute the valid option that was chosen -; -exten => vmx,n(doopt),Noop(Got a valid option: ${DB_RESULT}) -exten => vmx,n,Set(VMX_EXT=${DB_RESULT}) -; -; Special case, if this option was to go to voicemail, set options and go -; -exten => vmx,n,GotoIf($["${VMX_EXT}" != "dovm"]?getdest) -exten => vmx,n(vmxopts),Set(VMX_OPTS=${VMX_OPTS_DOVM}) -exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/dovm)}" = "0"]?vmxdovm) -exten => vmx,n(vmxopts),Set(VMX_OPTS=${DB_RESULT}) -exten => vmx,n(vmxdovm),goto(dovm,1) -; -; General case, setup the goto destination and go there (no error checking, its up to the GUI's to assure -; reasonable values -; -exten => vmx,n(getdest),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/context)}" = "0"]?vmxpri) -exten => vmx,n,Set(VMX_CONTEXT=${DB_RESULT}) -exten => vmx,n(vmxpri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/pri)}" = "0"]?vmxgoto) -exten => vmx,n,Set(VMX_PRI=${DB_RESULT}) -exten => vmx,n(vmxgoto),Goto(${VMX_CONTEXT},${VMX_EXT},${VMX_PRI}) - -; If the required voicemail file is not present, then revert to normal voicemail -; behavior treating as if it was not set -; -exten => vmx,file+101,Noop(File for mode: ${MODE} does not exist, going to normal voicemail) -exten => vmx,n,Goto(s-${ARG2},1) - -; Drop into voicemail either as a direct destination (in which case VMX_OPTS might be set to something) or -; if the user timed out or broke out of the loop then VMX_OPTS is always cleared such that an Allison -; message is played and the caller know's what is going on. -; -exten => dovm,1,Noop(VMX Timeout - go to voicemail) -exten => dovm,n,Voicemail(${ARG1}@${VMCONTEXT}|${VMX_OPTS}${VMGAIN}) ; no flags, so allison plays please leave ... -exten => dovm,n,Goto(exit-${VMSTATUS},1) exten => s-BUSY,1,NoOp(BUSY voicemail) @@ -389,43 +158,15 @@ exten => _s-.,n,Goto(exit-${VMSTATUS},1) -; If the user has a 0 option defined, use that for operator zero-out from within voicemail -; as well to keep it consistant with the menu structure -; exten => o,1,Background(one-moment-please) ; 0 during vm message will hangup -exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/ext)}" = "0"]?doopdef) - -exten => o,n,Set(VMX_OPDEST_EXT=${DB_RESULT}) -exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/context)}" = "1"]?opcontext) -exten => o,n,Set(DB_RESULT=${VMX_CONTEXT}) -exten => o,n(opcontext),Set(VMX_OPDEST_CONTEXT=${DB_RESULT}) -exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/pri)}" = "1"]?oppri) -exten => o,n,Set(DB_RESULT=${VMX_PRI}) -exten => o,n(oppri),Set(VMX_OPDEST_PRI=${DB_RESULT}) - -exten => o,n,Goto(${VMX_OPDEST_CONTEXT},${VMX_OPDEST_EXT},${VMX_OPDEST_PRIORITY}) -exten => o,n(doopdef),GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1) +exten => o,n,GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1) exten => o,n(nooper),GotoIf($["x${FROM_DID}"="x"]?nodid) -exten => o,n,Dial(Local/${FROM_DID)@from-pstn) +exten => o,n,Dial(Local/${FROM_DID}@from-pstn) exten => o,n,Macro(hangup) exten => o,n(nodid),Dial(Local/s@from-pstn) exten => o,n,Macro(hangup) -; If the user has a * option defined, use that for the * out from within voicemail -; as well to keep it consistant with the menu structure -; exten => a,1,Macro(get-vmcontext,${ARG1}) -exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/ext)}" = "0"]?adef,1) - -exten => a,n,Set(VMX_ADEST_EXT=${DB_RESULT}) -exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/context)}" = "1"]?acontext) -exten => a,n,Set(DB_RESULT=${VMX_CONTEXT}) -exten => a,n(acontext),Set(VMX_ADEST_CONTEXT=${DB_RESULT}) -exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/pri)}" = "1"]?apri) -exten => a,n,Set(DB_RESULT=${VMX_PRI}) -exten => a,n(apri),Set(VMX_ADEST_PRI=${DB_RESULT}) -exten => a,n,Goto(${VMX_ADEST_CONTEXT},${VMX_ADEST_EXT},${VMX_ADEST_PRI}) - -exten => adef,1,VoiceMailMain(${ARG1}@${VMCONTEXT}) -exten => adef,n,Hangup +exten => a,n,VoiceMailMain(${ARG1}@${VMCONTEXT}) +exten => a,n,Hangup exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured) @@ -439,5 +180,4 @@ exten => t,1,Hangup() -;------------------------------------------------------------------------ ;------------------------------------------------------------------------ @@ -559,5 +299,5 @@ ; Cleanup any remaining RG flag ; -exten => s,n,GotoIf($[ "x${USE_CONFIRMATION}" = "x" | "x${RINGGROUP_INDEX}" = "x" | "${CHANNEL}" != "${UNIQCHAN}"]?skiprg) +exten => s,n,GotoIf($[ "foo${USE_CONFIRMATION}" = "foo" | "foo${RINGGROUP_INDEX}" = "foo" | "${CHANNEL}" != "${UNIQCHAN}"]?skiprg) exten => s,n,Noop(Cleaning Up Confirmation Flag: RG/${RINGGROUP_INDEX}/${CHANNEL}) exten => s,n,DBDel(RG/${RINGGROUP_INDEX}/${CHANNEL}) @@ -565,14 +305,10 @@ ; Cleanup any remaining BLKVM flag ; -exten => s,n(skiprg),GotoIf($[ "x${BLKVM_BASE}" = "x" | "BLKVM/${BLKVM_BASE}/${CHANNEL}" != "${BLKVM_OVERRIDE}" ]?skipblkvm) +exten => s,n(skiprg),GotoIf($[ "foo${BLKVM_BASE}" = "foo" | "BLKVM/${BLKVM_BASE}/${CHANNEL}" != "${BLKVM_OVERRIDE}" ]?theend) exten => s,n,Noop(Cleaning Up Block VM Flag: ${BLKVM_OVERRIDE}) exten => s,n,DBDel(${BLKVM_OVERRIDE}) -; Cleanup any remaining FollowMe DND flags -; -exten => s,n(skipblkvm),GotoIf($[ "x${FMGRP}" = "x" | "x${FMUNIQUE}" = "x" | "${CHANNEL}" != "${FMUNIQUE}" ]?theend) -exten => s,n,DBDel(FM/DND/${FMGRP}/${CHANNEL}) - -exten => s,n(theend),Hangup +exten => s,n(theend),Wait(5) +exten => s,n,Hangup [macro-faxreceive] @@ -618,5 +354,4 @@ [macro-dialout-trunk] exten => s,1,Set(DIAL_TRUNK=${ARG1}) -exten => s,n,GotoIf($["x${OUTDISABLE_${ARG1}}" = "xon"]?disabletrunk,1) ; If NODEST is set, clear it. No point in remembering since dialout-trunk will just end in the @@ -643,12 +378,5 @@ exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) ; OUTNUM is the final dial number exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)}) ; Custom trunks are prefixed with "AMP:" - -; Back to normal processing, whether intracompany or not. -; But add the macro-setmusic if we don't want music on this outbound call -; -exten => s,n,GotoIf($[$["${MOHCLASS}" = "default"] | $["foo${MOHCLASS}" = "foo"]]?gocall) ; Set to YES if we should pump silence -exten => s,n,Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}) ; set MoH or off - -exten => s,n(gocall),GotoIf($["${custom}" = "AMP"]?customtrunk) +exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk) exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS}) ; Regular Trunk Dial exten => s,n,Goto(s-${DIALSTATUS},1) @@ -674,9 +402,5 @@ exten => s-CANCEL,3,Congestion(20) -exten => _s-.,1,GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport) -exten => _s-.,n,DeadAGI(${OUTFAIL_${ARG1}}) -exten => _s-.,n(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks) - -exten => disabletrunk,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk) +exten => _s-.,1,NoOp(Dial failed due to ${DIALSTATUS} - failing through to other trunks) exten => h,1,Macro(hangupcall) @@ -993,5 +717,5 @@ exten => s,n(report),Noop(TTL: ${TTL} ARG1: ${ARG1}) exten => s,n,GotoIf($[ "${ARG1}" = "SKIPTTL" ]?continue) -exten => s,n(report2),Set(__TTL=${IF($["foo${TTL}" = "foo"]?64:$[ ${TTL} - 1 ])}) +exten => s,n(report2),Set(_TTL=${IF($["foo${TTL}" = "foo"]?64:$[ ${TTL} - 1 ])}) exten => s,n,GotoIf($[ ${TTL} > 0 ]?continue) exten => s,n,Wait(${RINGTIMER}) ; wait for a while, to give it a chance to be picked up by voicemail @@ -1110,5 +834,4 @@ include => from-internal-additional include => ext-local-confirm -include => findmefollow-ringallv2 ; This causes grief with '#' transfers, commenting out for the moment. ; include => bad-number @@ -1158,16 +881,4 @@ exten => fax,1,Goto(ext-fax,in_fax,1) -;------------------------------------------------------------------------ -; [macro-setmusic] -;------------------------------------------------------------------------ -; CONTEXT: macro-setmusic -; PURPOSE: to turn off moh on routes where it is not desired -; -;------------------------------------------------------------------------ -[macro-setmusic] -exten => s,1,NoOp(Setting Outbound Route MoH To: ${ARG1}) -exten => s,2,SetMusicOnHold(${ARG1}) -;------------------------------------------------------------------------ - ; ########################################## ; ## Ring Groups with Confirmation macros ## @@ -1332,42 +1043,4 @@ exten => h,1,Noop(Hangup Extension in macro-confirm) exten => h,n,Macro(hangupcall) - -;------------------------------------------------------------------------ - -;------------------------------------------------------------------------ -; [findmefollow-ringallv2] -;------------------------------------------------------------------------ -; This context, to be included in from-internal, implements the PreRing part of findmefollow -; as well as the GroupRing part. It also communicates between the two so that if DND is set -; on the primary extension, and mastermode is enabled, then the other extensions will not ring -; -;------------------------------------------------------------------------ -[findmefollow-ringallv2] -exten => _FMPR-.,1,Noop(In FMPR ${FMGRP} with ${EXTEN:5}) -exten => _FMPR-.,n,Set(RingGroupMethod=) -exten => _FMPR-.,n,Set(USE_CONFIRMATION=) -exten => _FMPR-.,n,Set(RINGGROUP_INDEX=) -exten => _FMPR-.,n,Macro(simple-dial,${EXTEN:5},${FMREALPRERING}) -exten => _FMPR-.,n,GotoIf($["${DIALSTATUS}" != "BUSY"]?nodnd) -exten => _FMPR-.,n,Set(DB(FM/DND/${FMGRP}/${FMUNIQUE})=DND) -exten => _FMPR-.,n(nodnd),Noop(Ending FMPR ${FMGRP} with ${EXTEN:5} and dialstatus ${DIALSTATUS}) -exten => _FMPR-.,n,Hangup() - -exten => _FMGL-.,1,Noop(In FMGL ${FMGRP} with ${EXTEN:5}) -exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) -exten => _FMGL-.,n,Wait(1) -exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) -exten => _FMGL-.,n,Wait(1) -exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) -exten => _FMGL-.,n,Wait(${FMPRERING}) -exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) -exten => _FMGL-.,n,DBDel(FM/DND/${FMGRP}/${FMUNIQUE}) -exten => _FMGL-.,n(dodial),Macro(dial,${FMGRPTIME},${DIAL_OPTIONS},${EXTEN:5}) -exten => _FMGL-.,n,Noop(Ending FMGL ${FMGRP} with ${EXTEN:5} and dialstatus ${DIALSTATUS}) -exten => _FMGL-.,n,Hangup() -exten => _FMGL-.,n+10(dodnd),DBDel(FM/DND/${FMGRP}/${FMUNIQUE}) -exten => _FMGL-.,n,GotoIf($["${FMPRIME}" = "FALSE"]?dodial) -exten => _FMGL-.,n,Noop(Got DND in FMGL ${FMGRP} with ${EXTEN:5} in ${RingGroupMethod} mode, aborting) -exten => _FMGL-.,n,Hangup() ;------------------------------------------------------------------------