Changeset 5864
- Timestamp:
- 07/01/08 21:32:39 (2 months ago)
- Files:
-
- modules/branches/2.5/findmefollow/functions.inc.php (modified) (3 diffs)
- modules/branches/2.5/findmefollow/install.php (modified) (1 diff)
- modules/branches/2.5/findmefollow/module.xml (modified) (1 diff)
- modules/branches/2.5/findmefollow/sounds/followme.sln (added)
- modules/branches/2.5/findmefollow/sounds/incoming-call-1-accept-2-decline.sln (modified) (previous)
- modules/branches/2.5/findmefollow/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/findmefollow/functions.inc.php
r5279 r5864 6 6 function findmefollow_get_config($engine) { 7 7 global $ext; // is this the best way to pass this? 8 global $amp_conf; 8 9 switch($engine) { 9 10 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 10 20 $ext->addInclude('from-internal-additional','ext-findmefollow'); 11 21 $ext->addInclude('from-internal-additional','fmgrps'); … … 39 49 } 40 50 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 } 41 57 42 58 // Direct target to Follow-Me come here bypassing the followme/ddial conditional check 43 59 // 44 $ext->add($contextname, 'FM'.$grpnum, '', new ext_goto(" $grpnum,FM$grpnum"));60 $ext->add($contextname, 'FM'.$grpnum, '', new ext_goto("FM$grpnum","$grpnum")); 45 61 46 62 // … … 387 403 } 388 404 405 function 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 389 438 ?> modules/branches/2.5/findmefollow/install.php
r4767 r5864 2 2 3 3 global $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(); 11 unset($fcc); 4 12 5 13 // Adding support for a pre_ring before follow-me group modules/branches/2.5/findmefollow/module.xml
r5797 r5864 2 2 <rawname>findmefollow</rawname> 3 3 <name>Follow Me</name> 4 <version>2. 4.14.2</version>4 <version>2.5.0</version> 5 5 <changelog> 6 *2.5.0* Add enable/disable featurecode with blf support, new confirmation sound file announces cid availability 6 7 *2.4.14.2* #2604, #2843 fix mal-formed html tags, Russian Translation 7 8 *2.4.14.1* added depends on 2.4.0 modules/branches/2.5/findmefollow/uninstall.php
r3763 r5864 15 15 global $amp_conf; 16 16 17 $fcc = new featurecode('findmefollow', 'fmf_toggle'); 18 $fcc->delete(); 19 unset($fcc); 20 17 21 $sql = "SELECT * FROM users"; 18 22 $userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
