285.1.4
by Adam Zammit
Replaced short tags with long ones |
1 |
<?php
|
2
by azammitdcarf
Import from DCARF SVN |
2 |
/**
|
38
by azammitdcarf
Updated description |
3 |
* Record calls using Asterisk (if enabled)
|
2
by azammitdcarf
Import from DCARF SVN |
4 |
*
|
5 |
*
|
|
6 |
* This file is part of queXS
|
|
7 |
*
|
|
8 |
* queXS is free software; you can redistribute it and/or modify
|
|
9 |
* it under the terms of the GNU General Public License as published by
|
|
10 |
* the Free Software Foundation; either version 2 of the License, or
|
|
11 |
* (at your option) any later version.
|
|
12 |
*
|
|
13 |
* queXS is distributed in the hope that it will be useful,
|
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 |
* GNU General Public License for more details.
|
|
17 |
*
|
|
18 |
* You should have received a copy of the GNU General Public License
|
|
19 |
* along with queXS; if not, write to the Free Software
|
|
20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21 |
*
|
|
22 |
*
|
|
23 |
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
|
24 |
* @copyright Deakin University 2007,2008
|
|
25 |
* @package queXS
|
|
26 |
* @subpackage user
|
|
27 |
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
|
28 |
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
|
29 |
*
|
|
30 |
*/
|
|
31 |
||
32 |
/**
|
|
33 |
* Configuration file
|
|
34 |
*/
|
|
35 |
include ("config.inc.php"); |
|
36 |
||
37 |
/**
|
|
38 |
* XHTML functions
|
|
39 |
*/
|
|
40 |
include ("functions/functions.xhtml.php"); |
|
41 |
||
42 |
/**
|
|
43 |
* Operator functions
|
|
44 |
*/
|
|
45 |
include("functions/functions.operator.php"); |
|
46 |
||
47 |
||
48 |
$operator_id = get_operator_id(); |
|
49 |
$case_id = get_case_id($operator_id); |
|
50 |
||
51 |
if (is_on_call($operator_id) == 3) |
|
52 |
{
|
|
53 |
if (isset($_GET['start'])) |
|
54 |
{
|
|
55 |
$newtext = T_("Stop REC"); |
|
56 |
xhtml_head(T_("Record"),true,array("css/call.css"),array("js/window.js"),"onload='toggleRec(\"$newtext\",\"record.php?stop=stop\",\"online\")'"); |
|
96
by azammitdcarf
VoIP is done on an operator by operator basis |
57 |
if (is_voip_enabled($operator_id)) |
2
by azammitdcarf
Import from DCARF SVN |
58 |
{
|
59 |
$call_id = get_call($operator_id); |
|
51
by azammitdcarf
will only display record if on a call |
60 |
if ($call_id) |
61 |
{
|
|
62 |
include("functions/functions.voip.php"); |
|
63 |
$v = new voip(); |
|
64 |
$v->connect(VOIP_SERVER); |
|
65 |
$v->beginRecord(get_extension($operator_id),"$case_id-$call_id-$operator_id-" . get_operator_time($operator_id,$format = "%Y-%m-%d-%H-%i-%S")); |
|
66 |
print "<p>" . T_("Beginning recording...") . "</p>"; |
|
67 |
}
|
|
68 |
else
|
|
69 |
print "<p>" . T_("Not on a call, so not beginning a recording") . "</p>"; |
|
2
by azammitdcarf
Import from DCARF SVN |
70 |
}
|
71 |
else
|
|
72 |
{
|
|
73 |
print "<p>" . T_("Begin the manual recording now...") . "</p>"; |
|
74 |
}
|
|
75 |
}
|
|
76 |
else if (isset($_GET['stop'])) |
|
77 |
{
|
|
78 |
$newtext = T_("Start REC"); |
|
79 |
xhtml_head(T_("Record"),true,array("css/call.css"),array("js/window.js"),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\")'"); |
|
96
by azammitdcarf
VoIP is done on an operator by operator basis |
80 |
if (is_voip_enabled($operator_id)) |
2
by azammitdcarf
Import from DCARF SVN |
81 |
{
|
82 |
include("functions/functions.voip.php"); |
|
83 |
$v = new voip(); |
|
84 |
$v->connect(VOIP_SERVER); |
|
85 |
$v->endRecord(get_extension($operator_id)); |
|
86 |
print "<p>" . T_("Stopping recording...") . "</p>"; |
|
87 |
}
|
|
88 |
else
|
|
89 |
{
|
|
90 |
print "<p>" . T_("Stop the manual recording now...") . "</p>"; |
|
91 |
}
|
|
92 |
}
|
|
93 |
}
|
|
94 |
else
|
|
95 |
{
|
|
96 |
xhtml_head(T_("Record"),true,array("css/call.css")); |
|
97 |
print "<p>" . T_("Not on a call, so not beginning a recording") . "</p>"; |
|
98 |
}
|
|
99 |
||
100 |
xhtml_foot(); |
|
101 |
||
102 |
||
103 |
||
104 |
||
105 |
?>
|