Changeset 5864

Show
Ignore:
Timestamp:
07/02/08 00:32:39 (5 years ago)
Author:
p_lindheimer
Message:

Add enable/disable featurecode with blf support, new confirmation sound file announces cid availability

Files:

Legend:

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

    r5279 r5864  
    66function findmefollow_get_config($engine) { 
    77  global $ext;  // is this the best way to pass this? 
     8  global $amp_conf; 
    89  switch($engine) { 
    910    case "asterisk": 
     11 
     12      $fcc = new featurecode('findmefollow', 'fmf_toggle'); 
     13      $fmf_code = $fcc->getCodeActive(); 
     14      unset($fcc); 
     15 
     16      if ($fmf_code != '') { 
     17        findmefollow_fmf_toggle($fmf_code); 
     18      } 
     19 
    1020      $ext->addInclude('from-internal-additional','ext-findmefollow'); 
    1121      $ext->addInclude('from-internal-additional','fmgrps'); 
     
    3949          } 
    4050 
     51          if ($fmf_code != '') { 
     52            $ext->add($contextname, $fmf_code.$grpnum, '', new ext_goto("1",$fmf_code,"app-fmf-toggle")); 
     53            if ($amp_conf['USEDEVSTATE']) { 
     54              $ext->addHint($contextname, $fmf_code.$grpnum, "Custom:FOLLOWME".$grpnum); 
     55            } 
     56          } 
    4157 
    4258          // Direct target to Follow-Me come here bypassing the followme/ddial conditional check 
    4359          // 
    44           $ext->add($contextname, 'FM'.$grpnum, '', new ext_goto("$grpnum,FM$grpnum")); 
     60          $ext->add($contextname, 'FM'.$grpnum, '', new ext_goto("FM$grpnum","$grpnum")); 
    4561 
    4662          // 
     
    387403} 
    388404 
     405function findmefollow_fmf_toggle($c) { 
     406  global $ext; 
     407  global $amp_conf; 
     408 
     409  $id = "app-fmf-toggle"; // The context to be included 
     410  $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal 
     411 
     412  $ext->add($id, $c, '', new ext_goto('start','s',$id)); 
     413  $c = 's'; 
     414 
     415  $ext->add($id, $c, 'start', new ext_answer('')); 
     416  $ext->add($id, $c, '', new ext_wait('1')); 
     417  $ext->add($id, $c, '', new ext_macro('user-callerid')); 
     418 
     419  $ext->add($id, $c, '', new ext_gotoif('$["${DB(AMPUSER/${AMPUSER}/followme/ddial)}" = "EXTENSION"]', 'activate')); 
     420  $ext->add($id, $c, '', new ext_gotoif('$["${DB(AMPUSER/${AMPUSER}/followme/ddial)}" = "DIRECT"]', 'deactivate','end')); 
     421 
     422  $ext->add($id, $c, 'deactivate', new ext_setvar('DB(AMPUSER/${AMPUSER}/followme/ddial)', 'EXTENSION')); 
     423  if ($amp_conf['USEDEVSTATE']) { 
     424    $ext->add($id, $c, '', new ext_setvar('DEVSTATE(Custom:FOLLOWME${AMPUSER})', 'NOT_INUSE')); 
     425  } 
     426  $ext->add($id, $c, 'end', new ext_playback('followme&de-activated')); 
     427  $ext->add($id, $c, '', new ext_macro('hangupcall')); 
     428 
     429  $ext->add($id, $c, 'activate', new ext_setvar('DB(AMPUSER/${AMPUSER}/followme/ddial)', 'DIRECT')); 
     430  if ($amp_conf['USEDEVSTATE']) { 
     431    $ext->add($id, $c, '', new ext_setvar('DEVSTATE(Custom:FOLLOWME${AMPUSER})', 'INUSE')); 
     432  } 
     433  $ext->add($id, $c, '', new ext_playback('followme&activated')); 
     434  $ext->add($id, $c, '', new ext_macro('hangupcall')); 
     435 
     436} 
     437 
    389438?> 
  • modules/branches/2.5/findmefollow/install.php

    r4767 r5864  
    22 
    33global $db; 
     4 
     5//TODO: Also need to create all the states if enabled 
     6 
     7$fcc = new featurecode('findmefollow', 'fmf_toggle'); 
     8$fcc->setDescription('Findme Follow Toggle'); 
     9$fcc->setDefault('*21'); 
     10$fcc->update(); 
     11unset($fcc); 
    412 
    513// Adding support for a pre_ring before follow-me group 
  • modules/branches/2.5/findmefollow/module.xml

    r5797 r5864  
    22  <rawname>findmefollow</rawname> 
    33  <name>Follow Me</name> 
    4   <version>2.4.14.2</version> 
     4  <version>2.5.0</version> 
    55  <changelog> 
     6    *2.5.0* Add enable/disable featurecode with blf support, new confirmation sound file announces cid availability 
    67    *2.4.14.2* #2604, #2843 fix mal-formed html tags, Russian Translation 
    78    *2.4.14.1* added depends on 2.4.0 
  • modules/branches/2.5/findmefollow/uninstall.php

    r3763 r5864  
    1515global $amp_conf; 
    1616 
     17$fcc = new featurecode('findmefollow', 'fmf_toggle'); 
     18$fcc->delete(); 
     19unset($fcc); 
     20 
    1721$sql = "SELECT * FROM users"; 
    1822$userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC);