Changeset 3168

Show
Ignore:
Timestamp:
11/22/06 22:04:17 (7 years ago)
Author:
p_lindheimer
Message:

add NODEST to queues, ringgroups and findmefollow, this allows ringgroups and queues to tell its children not to go to voicemail or other destination-if-no-answer which is often voicemail or other undesirable places. Ringgroups can be both a parent and a child of such

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.2/findmefollow/functions.inc.php

    r3156 r3168  
    5858          $ext->add($contextname, $grpnum, '', new ext_macro('user-callerid')); 
    5959 
     60          // Remember if NODEST was set later, but clear it in case the call is answered so that subsequent 
     61          // transfers work. 
     62          // 
     63          $ext->add($contextname, $grpnum, '', new ext_setvar('RRNODEST', '${NODEST}')); 
     64          $ext->add($contextname, $grpnum, '', new ext_setvar('NODEST', '')); 
     65 
    6066          // deal with group CID prefix 
    6167          $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RGPREFIX}" = "foo"]', 'REPCID')); 
     
    113119          $ext->add($contextname, $grpnum, 'nextstep', new ext_setvar('RingGroupMethod','')); 
    114120 
     121          // Did the call come from a queue or ringgroup, if so, don't go to the destination, just end and let 
     122          // the queue or ringgroup decide what to do next 
     123          // 
     124          $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RRNODEST}" != "foo"]', 'nodest')); 
     125 
    115126          // where next? 
    116127          if ((isset($postdest) ? $postdest : '') != '') { 
     
    119130            $ext->add($contextname, $grpnum, '', new ext_hangup('')); 
    120131          } 
     132          $ext->add($contextname, $grpnum, 'nodest', new ext_noop('SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST}')); 
    121133        } 
    122134      } 
  • modules/branches/2.2/findmefollow/module.xml

    r3158 r3168  
    44  <version>2.4.3</version> 
    55  <changelog> 
     6    *2.4.4* Add NODEST so that destination (often vm) is not taken if called from queue or ringgroup 
    67    *2.4.3* Sanity check for prefing that if not set or there, it won't ring the extension forever (should not happen) 
    78    *2.4.2* Modified flyover help - since moh works with confirmation now 
  • modules/branches/2.2/queues/functions.inc.php

    r2508 r3168  
    3636           
    3737          $ext->add('ext-queues', $exten, '', new ext_answer('')); 
     38 
     39          // Inform all the children NOT to send calls to destinations or voicemail 
     40          // 
     41          $ext->add('ext-queues', $exten, '', new ext_setvar('_NODEST', '${EXTEN}')); 
     42 
    3843          $ext->add('ext-queues', $exten, '', new ext_gotoif('$["${CONTEXT}"="from-internal"]','USERCID','SETCID')); 
    3944          $ext->add('ext-queues', $exten, 'USERCID', new ext_macro('user-callerid')); 
     
    4954          $agentannounce = (isset($q['agentannounce'])?$q['agentannounce']:''); 
    5055          $ext->add('ext-queues', $exten, '', new ext_queue($exten,$options,'',$agentannounce,$q['maxwait'])); 
     56  
     57          // If we are here, disable the NODEST as we want things to resume as normal 
     58          // 
     59          $ext->add('ext-queues', $exten, '', new ext_setvar('_NODEST', '')); 
    5160   
    5261          // destination field in 'incoming' database is backwards from what ext_goto expects 
  • modules/branches/2.2/queues/module.xml

    r2944 r3168  
    88    Creates a queue where calls are placed on hold and answered on a first-in, first-out basis. Many options are available, including ring strategy for agents, caller announcements, max wait times, etc.  
    99  </description> 
    10   <changelog>*2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog> 
     10  <changelog> 
     11    *2.2.1* Add NODEST to tell children NOT to go to destinations (like voicemail or other) - helps with followme in a queue 
     12    *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog> 
    1113  <menuitems> 
    1214    <queues>Queues</queues> 
  • modules/branches/2.2/ringgroups/functions.inc.php

    r2596 r3168  
    5858 
    5959          $ext->add($contextname, $grpnum, '', new ext_macro('user-callerid')); 
     60 
     61          // Remember if we should go to our own destination (in case we are a child) and then tell all our 
     62          // children not to go to their destinations 
     63          // 
     64          $ext->add($contextname, $grpnum, '', new ext_setvar('RRNODEST', '${NODEST}')); 
     65          $ext->add($contextname, $grpnum, '', new ext_setvar('NODEST', '${EXTEN}')); 
    6066           
    6167          // deal with group CID prefix 
     
    96102          $ext->add($contextname, $grpnum, '', new ext_setvar('RingGroupMethod','')); 
    97103 
     104 
     105          // Now if we were told to skip the destination, do so now. Otherwise reset NODEST and proceed to our destination. 
     106          // 
     107          $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RRNODEST}" != "foo"]', 'nodest')); 
     108          $ext->add($contextname, $grpnum, '', new ext_setvar('_NODEST', '')); 
     109 
    98110          // where next? 
    99111          if ((isset($postdest) ? $postdest : '') != '') { 
     
    102114            $ext->add($contextname, $grpnum, '', new ext_hangup('')); 
    103115          } 
     116          $ext->add($contextname, $grpnum, 'nodest', new ext_noop('SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST}')); 
    104117        } 
    105118      } 
  • modules/branches/2.2/ringgroups/module.xml

    r3105 r3168  
    99  </description> 
    1010  <changelog> 
    11 *2.2.5* Modified flyover help - since moh works with confirmation now 
    12 *2.2.4* Added sound files for default confirmation messages 
    13 *2.2.3* Clarification on help message if you want to ring follow-me and other non-extension numbers 
    14 *2.2.2* Forgot to add default starting RG number as 600 
    15 *2.2.1* Cleanup of the UI, remove workaround of formatting bugs with previous UI 
    16 *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog> 
     11    *2.2.6* Add NODEST so that destination (often vm) is not taken if called from queue or ringgroup and such is honored for childeren 
     12    *2.2.5* Modified flyover help - since moh works with confirmation now 
     13    *2.2.4* Added sound files for default confirmation messages 
     14    *2.2.3* Clarification on help message if you want to ring follow-me and other non-extension numbers 
     15    *2.2.2* Forgot to add default starting RG number as 600 
     16    *2.2.1* Cleanup of the UI, remove workaround of formatting bugs with previous UI 
     17    *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog> 
    1718  <menuitems> 
    1819    <ringgroups>Ring Groups</ringgroups>