Changeset 10711 for modules/branches/2.9/core
- Timestamp:
- 12/18/10 14:39:47 (2 years ago)
- Files:
-
- modules/branches/2.9/core/etc/extensions.conf (modified) (3 diffs)
- modules/branches/2.9/core/functions.inc.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/core/etc/extensions.conf
r10179 r10711 485 485 [macro-setmusic] 486 486 exten => s,1,NoOp(Setting Outbound Route MoH To: ${ARG1}) 487 exten => s,2,Set MusicOnHold(${ARG1})487 exten => s,2,Set(CHANNEL(musicclass)=${ARG1}) ; this won't work in 1.2 anymore, could fix in auto-generate if we wanted... 488 488 ;------------------------------------------------------------------------ 489 489 … … 528 528 exten => s,n,Set(USE_CONFIRMATION=TRUE) 529 529 exten => s,n,Set(RINGGROUP_INDEX=${ARG4}) 530 exten => s,n,Set(FORCE_CONFIRM=) ; remove option if set so it is not duplicated in outbound route 530 531 exten => s,n,Set(ARG4=) ; otherwise it gets passed to dialparties.agi which processes it (prob bug) 531 532 … … 534 535 ; delete the variable, if we are here, we are done trying to dial and it may have been left around 535 536 ; 536 exten => s,n, DBDel(RG/${RINGGROUP_INDEX}/${CHANNEL})537 exten => s,n,Noop(DELETE KEY: RG/${RINGGROUP_INDEX}/${CHANNEL}: ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})}) 537 538 exten => s,n,Set(USE_CONFIRMATION=) 538 539 exten => s,n,Set(RINGGROUP_INDEX=) modules/branches/2.9/core/functions.inc.php
r10710 r10711 1902 1902 1903 1903 $exten = '1'; 1904 $ext->add($context, $exten, '', new ext_gotoif('$["${FORCE_CONFIRM}" = "ENABLED"]', 'skip')); 1904 1905 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]', 'toolate,1')); 1905 1906 $ext->add($context, $exten, '', new ext_dbdel('RG/${ARG3}/${UNIQCHAN}')); 1906 1907 $ext->add($context, $exten, '', new ext_dbdel('${BLKVM_OVERRIDE}')); 1907 $ext->add($context, $exten, '', new ext_setvar('__MACRO_RESULT','')); 1908 $ext->add($context, $exten, 'skip', new ext_setvar('__MACRO_RESULT','')); 1909 $ext->add($context, $exten, '', new ext_execif('$[("${MOHCLASS}"!="default") & ("${MOHCLASS}"!="")]', 'Set', 'CHANNEL(musicclass)=${MOHCLASS}')); 1908 1910 $ext->add($context, $exten, 'exitopt1', new ext_macroexit()); 1909 1911 … … 1913 1915 $exten = '3'; 1914 1916 $ext->add($context, $exten, '', new ext_saydigits('${CALLCONFIRMCID}')); 1915 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]', 'toolate,1','s,start'));1917 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" & "${FORCE_CONFIRM}"!="ENABLED"]', 'toolate,1','s,start')); 1916 1918 1917 1919 $exten = 't'; 1918 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]', 'toolate,1'));1920 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" & "${FORCE_CONFIRM}"!="ENABLED"]', 'toolate,1')); 1919 1921 $ext->add($context, $exten, '', new ext_setvar('LOOPCOUNT','$[ ${LOOPCOUNT} + 1 ]')); 1920 1922 $ext->add($context, $exten, '', new ext_gotoif('$[ ${LOOPCOUNT} < 5 ]', 's,start','noanswer,1')); … … 1926 1928 $ext->add($context, $exten, '', new ext_background('invalid,m,${LANGUAGE},macro-confirm')); 1927 1929 } 1928 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]', 'toolate,1'));1930 $ext->add($context, $exten, '', new ext_gotoif('$["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" & "${FORCE_CONFIRM}"!="ENABLED"]', 'toolate,1')); 1929 1931 $ext->add($context, $exten, '', new ext_setvar('LOOPCOUNT','$[ ${LOOPCOUNT} + 1 ]')); 1930 1932 $ext->add($context, $exten, '', new ext_gotoif('$[ ${LOOPCOUNT} < 5 ]', 's,start','noanswer,1')); … … 2040 2042 // Back to normal processing, whether intracompany or not. 2041 2043 // But add the macro-setmusic if we don't want music on this outbound call 2042 $ext->add($context, $exten, '', new ext_execif('$[$["${MOHCLASS}" != "default"] & $["${MOHCLASS}" != ""]]', 'Set', 'DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}')); 2044 // if FORCE_CONFIRM then that macro will set any necessary MOHCLASS, and we will also call the confirm macro 2045 $ext->add($context, $exten, '', new ext_execif('$["${MOHCLASS}"!="default" & "${MOHCLASS}"!="" & "${FORCE_CONFIRM}"!="ENABLED" ]', 'Set', 'DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}')); 2046 $ext->add($context, $exten, '', new ext_execif('$["${FORCE_CONFIRM}"="ENABLED" ]', 'Set', 'DIAL_TRUNK_OPTIONS=M(confirm)${DIAL_TRUNK_OPTIONS}')); 2043 2047 2044 2048 // This macro call will always be blank and is provided as a hook for customization required prior to making a call … … 2172 2176 // Back to normal processing, whether intracompany or not. 2173 2177 // But add the macro-setmusic if we don't want music on this outbound call 2174 $ext->add($context, $exten, '', new ext_execif('$[$["${MOHCLASS}" != "default"] & $["${MOHCLASS}" != ""]]', 'Set', 'DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}')); 2178 $ext->add($context, $exten, '', new ext_execif('$["${MOHCLASS}"!="default" & "${MOHCLASS}"!="" & "${FORCE_CONFIRM}"!="ENABLED" ]', 'Set', 'DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}')); 2179 $ext->add($context, $exten, '', new ext_execif('$["${FORCE_CONFIRM}"="ENABLED" ]', 'Set', 'DIAL_TRUNK_OPTIONS=M(confirm)${DIAL_TRUNK_OPTIONS}')); 2175 2180 2176 2181 // This macro call will always be blank and is provided as a hook for customization required prior to making a call … … 2330 2335 2331 2336 $ext->add($context, $exten, '', new ext_gosubif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]','sub-pincheck,s,1')); 2332 $ext->add($context, $exten, '', new ext_macro('outbound-callerid', '${ARG1}')); 2337 $ext->add($context, $exten, '', new ext_gotoif('$["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]', 'disabletrunk,1')); 2338 $ext->add($context, $exten, '', new ext_set('DIAL_TRUNK_OPTIONS', '${DIAL_OPTIONS}')); // will be reset to TRUNK_OPTIONS if not intra-company 2333 2339 $ext->add($context, $exten, '', new ext_set('OUTBOUND_GROUP', 'OUT_${ARG1}')); 2334 2340 $ext->add($context, $exten, '', new ext_gotoif('$["${OUTMAXCHANS_${ARG1}}foo" = "foo"]', 'nomax')); … … 2336 2342 $ext->add($context, $exten, 'nomax', new ext_set('DIAL_NUMBER', '${ARG2}')); 2337 2343 $ext->add($context, $exten, '', new ext_set('DIAL_TRUNK', '${ARG1}')); 2338 $ext->add($context, $exten, '', new ext_gosubif('$["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]','sub-flp-${DIAL_TRUNK},s,1')); // manimpulate DIAL_NUMBER 2344 $ext->add($context, $exten, '', new ext_gotoif('$["${INTRACOMPANYROUTE}" = "YES"]', 'skipoutcid')); // Set to YES if treated like internal 2345 $ext->add($context, $exten, '', new ext_set('DIAL_TRUNK_OPTIONS', '${TRUNK_OPTIONS}')); 2346 $ext->add($context, $exten, '', new ext_macro('outbound-callerid', '${DIAL_TRUNK}')); 2347 $ext->add($context, $exten, 'skipoutcid', new ext_gosubif('$["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]','sub-flp-${DIAL_TRUNK},s,1')); // manimpulate DIAL_NUMBER 2339 2348 // Replacement for asterisk's ENUMLOOKUP function 2340 2349 $ext->add($context, $exten, '', new ext_agi('enumlookup.agi')); … … 2342 2351 // Loop through them trying them in order. 2343 2352 $ext->add($context, $exten, 'dialloop', new ext_gotoif('$["foo${DIALARR}"="foo"]', 's-${DIALSTATUS},1')); 2353 $ext->add($context, $exten, '', new ext_execif('$["${MOHCLASS}"!="default" & "${MOHCLASS}"!="" & "${FORCE_CONFIRM}"!="ENABLED" ]', 'Set', 'DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}')); 2354 $ext->add($context, $exten, '', new ext_execif('$["${FORCE_CONFIRM}"="ENABLED" ]', 'Set', 'DIAL_TRUNK_OPTIONS=M(confirm)${DIAL_TRUNK_OPTIONS}')); 2344 2355 $ext->add($context, $exten, '', new ext_set('TRYDIAL', '${CUT(DIALARR,%,1)}')); 2345 2356 $ext->add($context, $exten, '', new ext_set('DIALARR', '${CUT(DIALARR,%,2-)}')); 2346 $ext->add($context, $exten, '', new ext_dial('${TRYDIAL}', ' '));2357 $ext->add($context, $exten, '', new ext_dial('${TRYDIAL}', '${DIAL_TRUNK_OPTIONS}')); 2347 2358 // Now, if we're still here, that means the Dial failed for some reason. 2348 2359 // If it's CONGESTION or CHANUNAVAIL we want to try again on a different
