Changeset 11659 for modules/branches/2.9/fax
- Timestamp:
- 03/03/11 16:52:05 (2 years ago)
- Files:
-
- modules/branches/2.9/fax/functions.inc.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/fax/functions.inc.php
r11284 r11659 113 113 } 114 114 115 //prosses rec ived arguments115 //prosses received arguments 116 116 function fax_configprocess() { 117 117 $action = isset($_REQUEST['action']) ?$_REQUEST['action']:null; … … 170 170 171 171 $fax=null; 172 $appfax = $rec ivefax = false;//return false by default in case asterisk isnt reachable172 $appfax = $receivefax = false;//return false by default in case asterisk isnt reachable 173 173 if ($amp_conf['AMPENGINE'] == 'asterisk' && isset($astman) && $astman->connected()) { 174 174 //check for fax modules … … 178 178 $fax['module']='res_fax'; 179 179 } else { 180 $rec ive = $astman->send_request('Command', array('Command' => $module_show_command.'app_fax'));181 if (preg_match('/[1-9] modules loaded/', $rec ive['data'])){$fax['module']='app_fax';}180 $receive = $astman->send_request('Command', array('Command' => $module_show_command.'app_fax')); 181 if (preg_match('/[1-9] modules loaded/', $receive['data'])){$fax['module']='app_fax';} 182 182 } 183 183 if (!isset($fax['module'])) { … … 256 256 switch ($fax['module']) { 257 257 case 'app_rxfax': 258 $ext->add($context, $exten, '', new ext_rxfax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); //rec ive fax, then email it on258 $ext->add($context, $exten, '', new ext_rxfax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); //receive fax, then email it on 259 259 break; 260 260 case 'app_fax': … … 262 262 // ReceiveFAX in that case since it will fail anyhow. 263 263 if ($fax['receivefax'] == 'rxfax') { 264 $ext->add($context, $exten, '', new ext_rxfax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); //rec ive fax, then email it on264 $ext->add($context, $exten, '', new ext_rxfax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); //receive fax, then email it on 265 265 } elseif ($fax['receivefax'] == 'receivefax') { 266 $ext->add($context, $exten, '', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif'.$t38_fb)); //rec ive fax, then email it on266 $ext->add($context, $exten, '', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif'.$t38_fb)); //receive fax, then email it on 267 267 } else { 268 268 $ext->add($context, $exten, '', new ext_noop('ERROR: NO Receive FAX application detected, putting in dialplan for ReceiveFAX as default')); 269 $ext->add($context, $exten, '', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif'.$t38_fb)); //rec ive fax, then email it on269 $ext->add($context, $exten, '', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif'.$t38_fb)); //receive fax, then email it on 270 270 $ext->add($context, $exten, '', new ext_execif('$["${FAXSTATUS}" = ""]','Set','FAXSTATUS=${IF($["${FAXOPT(error)}" = ""]?"FAILED LICENSE EXCEEDED":"FAILED FAXOPT: error: ${FAXOPT(error)} status: ${FAXOPT(status)} statusstr: ${FAXOPT(statusstr)}")}')); 271 271 } 272 272 break; 273 273 case 'res_fax': 274 $ext->add($context, $exten, '', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif'.$t38_fb)); //rec ive fax, then email it on274 $ext->add($context, $exten, '', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif'.$t38_fb)); //receive fax, then email it on 275 275 // Some versions or settings appear to have successful completions continue, so check status and goto hangup code 276 276 $ext->add($context, $exten, '', new ext_execif('$["${FAXOPT(error)}"=""]','Set','FAXSTATUS=FAILED LICENSE EXCEEDED'));
