Changeset 4092

Show
Ignore:
Timestamp:
06/20/07 18:17:44 (6 years ago)
Author:
p_lindheimer
Message:

Changed chained CID prefixes to be handled the same as ringgroup and followme, also fixed #1965

Files:

Legend:

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

    r3998 r4092  
    3434          $exten = $item[0]; 
    3535          $q = queues_get($exten); 
     36 
     37          $grppre = (isset($q['prefix'])?$q['prefix']:''); 
    3638           
     39          $ext->add('ext-queues', $exten, '', new ext_macro('user-callerid')); 
    3740          $ext->add('ext-queues', $exten, '', new ext_answer('')); 
    3841 
     
    4952          $ext->add('ext-queues', $exten, '', new ext_setvar('__NODEST', '${EXTEN}')); 
    5053 
    51           $ext->add('ext-queues', $exten, '', new ext_gotoif('$["${CONTEXT}"="from-internal"]','USERCID','SETCID')); 
    52           $ext->add('ext-queues', $exten, 'USERCID', new ext_macro('user-callerid')); 
    53           $ext->add('ext-queues', $exten, 'SETCID', new ext_setcidname($q['prefix'].'${CALLERID(name)}')); 
     54          // deal with group CID prefix 
     55          // Use the same variable as ringgroups/followme so that we can manage chaines of calls 
     56          // 
     57          $ext->add('ext-queues', $exten, '', new ext_gotoif('$["foo${RGPREFIX}" = "foo"]', 'REPCID')); 
     58          $ext->add('ext-queues', $exten, '', new ext_gotoif('$["${RGPREFIX}" != "${CALLERID(name):0:${LEN(${RGPREFIX})}}"]', 'REPCID')); 
     59          $ext->add('ext-queues', $exten, '', new ext_noop('Current RGPREFIX is ${RGPREFIX}....stripping from Caller ID')); 
     60          $ext->add('ext-queues', $exten, '', new ext_setvar('CALLERID(name)', '${CALLERID(name):${LEN(${RGPREFIX})}}')); 
     61          $ext->add('ext-queues', $exten, '', new ext_setvar('_RGPREFIX', '')); 
     62          $ext->add('ext-queues', $exten, 'REPCID', new ext_noop('CALLERID(name) is ${CALLERID(name)}')); 
     63          if ($grppre != '') { 
     64            $ext->add('ext-queues', $exten, '', new ext_setvar('_RGPREFIX', $grppre)); 
     65            $ext->add('ext-queues', $exten, '', new ext_setvar('CALLERID(name)','${RGPREFIX}${CALLERID(name)}')); 
     66          } 
     67 
     68 
    5469          $ext->add('ext-queues', $exten, '', new ext_setvar('MONITOR_FILENAME','/var/spool/asterisk/monitor/q${EXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID}')); 
    5570          $joinannounce = (isset($q['joinannounce'])?$q['joinannounce']:''); 
  • modules/branches/2.2/queues/module.xml

    r4000 r4092  
    22  <rawname>queues</rawname> 
    33  <name>Queues</name> 
    4   <version>2.2.9</version> 
     4  <version>2.2.10</version> 
    55  <type>setup</type> 
    66  <category>Inbound Call Control</category> 
     
    99  </description> 
    1010  <changelog> 
     11    *2.2.10* Changed chained CID prefixes to be handled the same as ringgroup and followme, also fixed #1965 
    1112    *2.2.9* Replaced deprecated CALLERIDNAME and TIMSTAMP variables with the current and future supported versions 
    1213    *2.2.8.1* Updated tootip to warn about agents.conf (unsupported and know issues) and warn about penalties (broken in asterisk)