| 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 | } |
|---|
| | 267 | |
|---|
| | 268 | // returns a associative arrays with keys 'destination' and 'description' |
|---|
| | 269 | // it allows system recording to be chosen as destinations |
|---|
| | 270 | function 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 | |
|---|