Changeset 2582

Show
Ignore:
Timestamp:
09/19/06 17:21:21 (7 years ago)
Author:
webrainstorm
Message:

Committed #1129 - System recordings can be used as destinations

Files:

Legend:

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

    r2410 r2582  
    1212  $modulename = "recordings"; 
    1313  $appcontext = "app-recordings"; 
     14  $contextname = 'ext-recordings'; 
    1415   
    1516  switch($engine) { 
     
    6970        $ext->add($appcontext, 'h', '', new ext_hangup('')); 
    7071        */ 
    71          
     72 
     73        /* Create a context for recordings as destinations */ 
     74        $recordings =  recordings_list(); 
     75        if (is_array($recordings)) { 
     76          foreach ($recordings as $r) { 
     77            $ext->add($contextname, 'recording-'.$r[0], '', new ext_answer()); 
     78            $ext->add($contextname, 'recording-'.$r[0], '', new ext_playback($r[2])); 
     79            $ext->add($contextname, 'recording-'.$r[0], '', new ext_hangup()); 
     80          } 
     81        } 
    7282      } 
    7383    break; 
     
    255265   
    256266 
     267 
     268// returns a associative arrays with keys 'destination' and 'description' 
     269// it allows system recording to be chosen as destinations 
     270function recordings_destinations() { 
     271  $recordings =  recordings_list(); 
     272  if (is_array($recordings)) { 
     273    foreach ($recordings as $r) { 
     274      $extens[] = array('destination' => 'ext-recordings,recording-'.$r[0].',1', 'description' => $r[1]); 
     275    } 
     276  } 
     277 
     278  return $extens; 
     279} 
     280 
    257281?> 
  • modules/branches/2.2/recordings/module.xml

    r2475 r2582  
    22  <rawname>recordings</rawname> 
    33  <name>Recordings</name> 
    4   <version>3.0.1</version> 
     4  <version>3.1.0</version> 
    55  <type>setup</type> 
    66  <category>Module</category>