Changeset 12317

Show
Ignore:
Timestamp:
07/25/11 03:25:47 (2 years ago)
Author:
mickecarlsson
Message:

Close #5187, add CHANUNAVAIL to macro-dial-one to deal with endpoints offline

Files:

Legend:

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

    r12300 r12317  
    37113711        $ext->add($mcontext,$exten,'', new ext_return('')); 
    37123712 
    3713         /* 
    3714         * There are reported bugs in Asterisk Blind Trasfers that result in Dial() returning and continuing 
    3715         * execution with a status of ANSWER. So we hangup at this point 
    3716         */ 
    3717         $exten = 's-ANSWER'; 
    3718         $ext->add($context, $exten, '', new ext_noop('Call successfully answered - Hanging up now')); 
    3719         $ext->add($context, $exten, '', new ext_macro('hangupcall')); 
    3720  
    3721         $exten = 's-TORTURE'; 
    3722         $ext->add($mcontext,$exten,'', new ext_goto('1','musiconhold','app-blackhole')); 
    3723         $ext->add($mcontext,$exten,'', new ext_macro('hangupcall')); 
    3724  
    3725         $exten = 's-DONTCALL'; 
    3726         $ext->add($mcontext,$exten,'', new ext_answer('')); 
    3727         $ext->add($mcontext,$exten,'', new ext_wait('1')); 
    3728         $ext->add($mcontext,$exten,'', new ext_zapateller('')); 
    3729         $ext->add($mcontext,$exten,'', new ext_playback('ss-noservice')); 
    3730         $ext->add($mcontext,$exten,'', new ext_macro('hangupcall')); 
     3713    /* 
     3714    * There are reported bugs in Asterisk Blind Trasfers that result in Dial() returning and continuing 
     3715    * execution with a status of ANSWER. So we hangup at this point 
     3716    */ 
     3717    $exten = 's-ANSWER'; 
     3718    $ext->add($context, $exten, '', new ext_noop('Call successfully answered - Hanging up now')); 
     3719    $ext->add($context, $exten, '', new ext_macro('hangupcall')); 
     3720 
     3721    $exten = 's-TORTURE'; 
     3722    $ext->add($mcontext,$exten,'', new ext_goto('1','musiconhold','app-blackhole')); 
     3723    $ext->add($mcontext,$exten,'', new ext_macro('hangupcall')); 
     3724 
     3725    $exten = 's-DONTCALL'; 
     3726    $ext->add($mcontext,$exten,'', new ext_answer('')); 
     3727    $ext->add($mcontext,$exten,'', new ext_wait('1')); 
     3728    $ext->add($mcontext,$exten,'', new ext_zapateller('')); 
     3729    $ext->add($mcontext,$exten,'', new ext_playback('ss-noservice')); 
     3730    $ext->add($mcontext,$exten,'', new ext_macro('hangupcall')); 
     3731 
     3732    /*  
     3733    * If an endpoint is offline, app_dial returns with CHANUNAVAIL, we deal with this the same way 
     3734    * as we do with NOANSWER 
     3735    */ 
     3736    $exten = 's-CHANUNAVAIL'; 
     3737    $ext->add($mcontext,$exten,'', new ext_macro('vm','${SCREEN_EXTEN},BUSY,${IVR_RETVM}')); 
     3738    $ext->add($mcontext,$exten,'', new ext_execif('$["${IVR_RETVM}"!="RETURN" | "${IVR_CONTEXT}"=""]','Hangup')); 
     3739    $ext->add($mcontext,$exten,'', new ext_return('')); 
    37313740 
    37323741        /* macro-dial-one */