Changeset 6855
- Timestamp:
- 09/26/08 22:15:37 (5 years ago)
- Files:
-
- modules/branches/2.5/core/functions.inc.php (modified) (4 diffs)
- modules/branches/2.5/pinsets/functions.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/core/functions.inc.php
r6845 r6855 1426 1426 $ext->add($context, $exten, '', new ext_setvar('__MACRO_RESULT','')); 1427 1427 $ext->add($context, $exten, '', new ext_dbdel('${BLKVM_OVERRIDE}')); 1428 1429 /* 1430 ;------------------------------------------------------------------------ 1431 ; [sub-pincheck] 1432 ;------------------------------------------------------------------------ 1433 ; This subroutine checks the pincode and then resets the CDR from that point 1434 ; if the pincode passes. This way the billsec and duration fields are set 1435 ; properly for pin dialing. 1436 ; 1437 ; ${ARG3} is the pincode if this was called, used by dialout-trunk, dialout-enum 1438 ; and dialout-dundi 1439 ; 1440 ;------------------------------------------------------------------------ 1441 */ 1442 $context = 'sub-pincheck'; 1443 $exten = 's'; 1444 $ext->add($context, $exten, '', new ext_authenticate('${ARG3}')); 1445 $ext->add($context, $exten, '', new ext_resetcdr('')); 1446 $ext->add($context, $exten, '', new ext_return('')); 1447 1428 1448 1429 1449 /* … … 1436 1456 * screen of AMP 1437 1457 */ 1438 1458 1439 1459 $context = 'macro-dialout-trunk'; 1440 1460 $exten = 's'; 1441 1461 1442 1462 $ext->add($context, $exten, '', new ext_set('DIAL_TRUNK', '${ARG1}')); 1443 $ext->add($context, $exten, '', new ext_ execif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]', 'Authenticate', '${ARG3}'));1463 $ext->add($context, $exten, '', new ext_gosubif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]','sub-pincheck,s,1')); 1444 1464 $ext->add($context, $exten, '', new ext_gotoif('$["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]', 'disabletrunk,1')); 1445 1465 $ext->add($context, $exten, '', new ext_set('DIAL_NUMBER', '${ARG2}')); // fixlocalprefix depends on this … … 1519 1539 */ 1520 1540 $ext->add($context, $exten, '', new ext_set('DIAL_TRUNK', '${ARG1}')); 1521 $ext->add($context, $exten, '', new ext_ execif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]', 'Authenticate', '${ARG3}'));1541 $ext->add($context, $exten, '', new ext_gosubif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]','sub-pincheck,s,1')); 1522 1542 $ext->add($context, $exten, '', new ext_gotoif('$["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]', 'disabletrunk,1')); 1523 1543 $ext->add($context, $exten, '', new ext_set('DIAL_NUMBER', '${ARG2}')); // fixlocalprefix depends on this … … 1628 1648 $exten = 's'; 1629 1649 1630 $ext->add($context, $exten, '', new ext_ execif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]', 'Authenticate', '${ARG3}'));1650 $ext->add($context, $exten, '', new ext_gosubif('$[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]','sub-pincheck,s,1')); 1631 1651 $ext->add($context, $exten, '', new ext_macro('outbound-callerid', '${ARG1}')); 1632 1652 $ext->add($context, $exten, '', new ext_set('OUTBOUND_GROUP', 'OUT_${ARG1}')); modules/branches/2.5/pinsets/functions.inc.php
r5307 r6855 51 51 $ext->add('macro-pinsets', 's', '', new ext_gotoif('${ARG2} = 1','cdr,1')); 52 52 $ext->add('macro-pinsets', 's', '', new ext_execif('$["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]', 'Authenticate',$asterisk_conf['astetcdir'].'/pinset_${ARG1}')); 53 $ext->add('macro-pinsets', 's', '', new ext_execif('$["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]', 'ResetCDR')); 53 54 // authenticate with the CDR option (a) 54 55 $ext->add('macro-pinsets', 'cdr', '', new ext_execif('$["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]', 'Authenticate',$asterisk_conf['astetcdir'].'/pinset_${ARG1},a')); 56 $ext->add('macro-pinsets', 'cdr', '', new ext_execif('$["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]', 'ResetCDR')); 55 57 } 56 58 break;
