Changeset 6855

Show
Ignore:
Timestamp:
09/26/08 22:15:37 (5 years ago)
Author:
p_lindheimer
Message:

fixes #3240 reset cdr after authenticating pins on outbound calls so that the CDR reflects the proper billsec and disposition of the real call

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/core/functions.inc.php

    r6845 r6855  
    14261426      $ext->add($context, $exten, '', new ext_setvar('__MACRO_RESULT','')); 
    14271427      $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 
    14281448       
    14291449      /* 
     
    14361456       * screen of AMP 
    14371457       */ 
    1438  
     1458        
    14391459      $context = 'macro-dialout-trunk'; 
    14401460      $exten = 's'; 
    14411461 
    14421462      $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')); 
    14441464      $ext->add($context, $exten, '', new ext_gotoif('$["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]', 'disabletrunk,1')); 
    14451465      $ext->add($context, $exten, '', new ext_set('DIAL_NUMBER', '${ARG2}')); // fixlocalprefix depends on this 
     
    15191539       */ 
    15201540      $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')); 
    15221542      $ext->add($context, $exten, '', new ext_gotoif('$["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]', 'disabletrunk,1')); 
    15231543      $ext->add($context, $exten, '', new ext_set('DIAL_NUMBER', '${ARG2}')); // fixlocalprefix depends on this 
     
    16281648      $exten = 's'; 
    16291649   
    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')); 
    16311651      $ext->add($context, $exten, '', new ext_macro('outbound-callerid', '${ARG1}')); 
    16321652      $ext->add($context, $exten, '', new ext_set('OUTBOUND_GROUP', 'OUT_${ARG1}')); 
  • modules/branches/2.5/pinsets/functions.inc.php

    r5307 r6855  
    5151        $ext->add('macro-pinsets', 's', '', new ext_gotoif('${ARG2} = 1','cdr,1')); 
    5252        $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')); 
    5354        // authenticate with the CDR option (a) 
    5455        $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')); 
    5557      } 
    5658    break;