Changeset 10374 for modules/branches/2.9/core
- Timestamp:
- 10/07/10 20:06:13 (3 years ago)
- Files:
-
- modules/branches/2.9/core/agi-bin/dialparties.agi (modified) (1 diff)
- modules/branches/2.9/core/functions.inc.php (modified) (5 diffs)
- modules/branches/2.9/core/module.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/core/agi-bin/dialparties.agi
r10283 r10374 302 302 } else { 303 303 $ext[$count] = $cf.'#'; 304 // This only really needs to be set if we are setting Diversion Headers, but it's not worth the hassle of 305 // checking the amportal.conf settings here and there is no harm done in setting it other than minor overhead 306 // 307 $AGI->set_variable('__DIVERSION_REASON','unconditional'); 304 308 debug("Extension $k has call forward set to $cf", 1); 305 309 } modules/branches/2.9/core/functions.inc.php
r10367 r10374 1764 1764 $ext->add($context, $exten, '', new ext_noop(sprintf(_('Calling Out Route: %s'),$route['name']))); 1765 1765 1766 // Conditionally Add Divesion Header if the call was diverted 1767 if ($amp_conf['DIVERSIONHEADER']) { 1768 $ext->add($context, $exten, '', new ext_gosubif('$[${LEN(${FROM_DID})}>0 & "${FROM_DID}"!="s"','sub-diversion-header,s,1')); 1769 } 1770 1766 1771 if ($route['emergency_route'] != '') { 1767 1772 $ext->add($context, $exten, '', new ext_set("EMERGENCYROUTE",$route['emergency_route'])); … … 1971 1976 $ext->add($context, $exten, '', new ext_return('')); 1972 1977 1978 // Subroutine to add diversion header with reason code "no-answer" unless provided differently elsewhere in the dialplan to indicate 1979 // the reason for the diversion (e.g. CFB could set it to busy) 1980 // 1981 if ($amp_conf['DIVERSIONHEADER']) { 1982 $context = 'sub-diversion-header'; 1983 $exten = 's'; 1984 $ext->add($context, $exten, '', new ext_set('DIVERSION_REASON', '${IF($[${LEN(${DIVERSION_REASON})}=0]?no-answer:${DIVERSION_REASON})}')); 1985 $ext->add($context, $exten, '', new ext_sipaddheader('Diversion', '<tel:+${FROM_DID}>\;reason=${DIVERSION_REASON}\;screen=no\;privacy=off')); 1986 $ext->add($context, $exten, '', new ext_return('')); 1987 } 1973 1988 1974 1989 /* … … 2916 2931 $exten = 'docfu'; 2917 2932 $ext->add($mcontext,$exten,'docfu', new ext_set("RTCFU", '${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")}')); 2933 if ($amp_conf['DIVERSIONHEADER']) $ext->add($mcontext,$exten,'', new ext_set('__DIVERSION_REASON', 'unavailable')); 2918 2934 $ext->add($mcontext,$exten,'', new ext_dial('Local/${CFUEXT}@from-internal/n', '${RTCFU},${DIAL_OPTIONS}')); 2935 if ($amp_conf['DIVERSIONHEADER']) $ext->add($mcontext,$exten,'', new ext_set('__DIVERSION_REASON', '')); 2919 2936 $ext->add($mcontext,$exten,'', new ext_return('')); 2920 2937 2921 2938 $exten = 'docfb'; 2922 2939 $ext->add($mcontext,$exten,'docfb', new ext_set("RTCFB", '${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")}')); 2940 if ($amp_conf['DIVERSIONHEADER']) $ext->add($mcontext,$exten,'', new ext_set('__DIVERSION_REASON', 'user-busy')); 2923 2941 $ext->add($mcontext,$exten,'', new ext_dial('Local/${CFBEXT}@from-internal/n', '${RTCFB},${DIAL_OPTIONS}')); 2942 if ($amp_conf['DIVERSIONHEADER']) $ext->add($mcontext,$exten,'', new ext_set('__DIVERSION_REASON', '')); 2924 2943 $ext->add($mcontext,$exten,'', new ext_return('')); 2925 2944 … … 3111 3130 $ext->add($mcontext,$exten,'', new ext_execif('$["${DB(CF/${DEXTEN})}"="${CFAMPUSER}" | "${DB(CF/${DEXTEN})}"="${REALCALLERIDNUM}" | "${CUT(CUT(BLINDTRANSFER,-,1),/,1)}" = "${DB(CF/${DEXTEN})}" | "${DEXTEN}"="${DB(CF/${DEXTEN})}"]', 'Return')); 3112 3131 $ext->add($mcontext,$exten,'', new ext_set('DEXTEN', '${IF($["${CFIGNORE}"=""]?"${DB(CF/${DEXTEN})}#":"")}')); 3132 if ($amp_conf['DIVERSIONHEADER']) $ext->add($mcontext,$exten,'', new ext_set('__DIVERSION_REASON', '${IF($["${DEXTEN}"!=""]?"unconditional":"")}')); 3113 3133 $ext->add($mcontext,$exten,'', new ext_execif('$["${DEXTEN}"!=""]', 'Return')); 3114 3134 $ext->add($mcontext,$exten,'', new ext_set('DIALSTATUS', 'NOANSWER')); … … 5897 5917 function core_devices_configpageinit($dispnum) { 5898 5918 global $currentcomponent, $amp_conf; 5899 global $amp_conf;5900 5919 5901 5920 if ( $dispnum == 'devices' || $dispnum == 'extensions' ) { modules/branches/2.9/core/module.xml
r10365 r10374 10 10 <canuninstall>no</canuninstall> 11 11 <changelog> 12 *2.9.0alpha1.3* #4580 12 13 *2.9.0alpha1.2* #4401, #4525, #4507, #4499, #4574, #4572, #4575, #4527, #4469 13 14 *2.9.0alpha1.1* #4443, #4444, #4460, #4414
