final changes for raising and lowering of individual participant volume levels in vicidial meetme rooms
Affects: vicidial.php, manager_send.php, AST_send_action_child.pl git-svn-id: svn://192.168.202.10@329 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 356 B |
Binary file not shown.
|
After Width: | Height: | Size: 377 B |
@@ -332,20 +332,6 @@ if (length($action)>1)
|
||||
$cmd_line_j =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
|
||||
$cmd_line_k =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
|
||||
|
||||
$originate_command = '';
|
||||
$originate_command .= "Action: $action\n";
|
||||
if (length($cmd_line_b)>3) {$originate_command .= "$cmd_line_b\n";}
|
||||
if (length($cmd_line_c)>3) {$originate_command .= "$cmd_line_c\n";}
|
||||
if (length($cmd_line_d)>3) {$originate_command .= "$cmd_line_d\n";}
|
||||
if (length($cmd_line_e)>3) {$originate_command .= "$cmd_line_e\n";}
|
||||
if (length($cmd_line_f)>3) {$originate_command .= "$cmd_line_f\n";}
|
||||
if (length($cmd_line_g)>3) {$originate_command .= "$cmd_line_g\n";}
|
||||
if (length($cmd_line_h)>3) {$originate_command .= "$cmd_line_h\n";}
|
||||
if (length($cmd_line_i)>3) {$originate_command .= "$cmd_line_i\n";}
|
||||
if (length($cmd_line_j)>3) {$originate_command .= "$cmd_line_j\n";}
|
||||
if (length($cmd_line_k)>3) {$originate_command .= "$cmd_line_k\n";}
|
||||
$originate_command .= "\n";
|
||||
|
||||
if ($DB) {print " SYSLOG: $SYSLOG\n";}
|
||||
if ($DB) {print " PATHlogs: $PATHlogs\n";}
|
||||
if ($DB) {print " telnet_host: $telnet_host\n";}
|
||||
@@ -365,13 +351,6 @@ if (length($action)>1)
|
||||
if ($DB) {print " cmd_line_j: $cmd_line_j\n";}
|
||||
if ($DB) {print " cmd_line_k: $cmd_line_k\n";}
|
||||
|
||||
|
||||
print "$now_date|$SYSLOG|\n$originate_command";
|
||||
$event_string = "0|$SYSLOG|";
|
||||
$event_string .= "\n$originate_command";
|
||||
if ( ($FULL_LOG) && ($SYSLOG) )
|
||||
{&full_event_logger;}
|
||||
|
||||
use Net::Telnet ();
|
||||
|
||||
if (!$telnet_port) {$telnet_port = '5038';}
|
||||
@@ -391,6 +370,57 @@ if (length($action)>1)
|
||||
|
||||
$tn->buffer_empty;
|
||||
|
||||
if ($cmd_line_b =~ /XXYYXXYYXXYYXX/)
|
||||
{
|
||||
# Action: Command
|
||||
# Command: meetme list 8600051
|
||||
#
|
||||
# Response: Follows
|
||||
# Privilege: Command
|
||||
# User #: 03 261 261iax Channel: IAX2/261iax-13 (unmonitored)
|
||||
# 1 users in that conference.
|
||||
# --END COMMAND--
|
||||
$meetme_command = "Action: Command\nCommand: meetme list $cmd_line_k\n\n";
|
||||
print "$now_date|$SYSLOG|\n$meetme_command";
|
||||
|
||||
@list_meetme = $tn->cmd(String => "$meetme_command", Prompt => '/--END COMMAND-.*/');
|
||||
foreach(@list_meetme)
|
||||
{
|
||||
if ($list_meetme[$m] =~ /$cmd_line_j /i)
|
||||
{
|
||||
$list_meetme[$m] =~ s/User \#: //gi;
|
||||
@participants = split(/ /, $list_meetme[$m]);
|
||||
$participant = ($participants[0] + 0);
|
||||
}
|
||||
# print "$m|$participant|$cmd_line_j|$list_meetme[$m]";
|
||||
$m++;
|
||||
}
|
||||
if ($participant > 0) {$cmd_line_b =~ s/XXYYXXYYXXYYXX/$participant/gi;}
|
||||
$cmd_line_j = '';
|
||||
$cmd_line_k = '';
|
||||
}
|
||||
|
||||
$originate_command = '';
|
||||
$originate_command .= "Action: $action\n";
|
||||
if (length($cmd_line_b)>3) {$originate_command .= "$cmd_line_b\n";}
|
||||
if (length($cmd_line_c)>3) {$originate_command .= "$cmd_line_c\n";}
|
||||
if (length($cmd_line_d)>3) {$originate_command .= "$cmd_line_d\n";}
|
||||
if (length($cmd_line_e)>3) {$originate_command .= "$cmd_line_e\n";}
|
||||
if (length($cmd_line_f)>3) {$originate_command .= "$cmd_line_f\n";}
|
||||
if (length($cmd_line_g)>3) {$originate_command .= "$cmd_line_g\n";}
|
||||
if (length($cmd_line_h)>3) {$originate_command .= "$cmd_line_h\n";}
|
||||
if (length($cmd_line_i)>3) {$originate_command .= "$cmd_line_i\n";}
|
||||
if (length($cmd_line_j)>3) {$originate_command .= "$cmd_line_j\n";}
|
||||
if (length($cmd_line_k)>3) {$originate_command .= "$cmd_line_k\n";}
|
||||
$originate_command .= "\n";
|
||||
|
||||
|
||||
print "$now_date|$SYSLOG|\n$originate_command";
|
||||
$event_string = "0|$SYSLOG|";
|
||||
$event_string .= "\n$originate_command";
|
||||
if ( ($FULL_LOG) && ($SYSLOG) )
|
||||
{&full_event_logger;}
|
||||
|
||||
@list_channels = $tn->cmd(String => "$originate_command", Prompt => '/.*/');
|
||||
|
||||
sleep(3);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 356 B |
Binary file not shown.
|
After Width: | Height: | Size: 377 B |
@@ -12,7 +12,7 @@
|
||||
# - $user
|
||||
# - $pass
|
||||
# optional variables:
|
||||
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
|
||||
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl')
|
||||
# - $queryCID - ('CN012345678901234567',...)
|
||||
# - $format - ('text','debug')
|
||||
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
|
||||
@@ -32,6 +32,7 @@
|
||||
# - $agent_log_id - ('123456',...)
|
||||
# - $call_server_ip - ('10.10.10.15',...)
|
||||
# - $CalLCID - ('VD01234567890123456',...)
|
||||
# - $stage - ('UP','DOWN')
|
||||
#
|
||||
|
||||
# changes
|
||||
@@ -117,6 +118,8 @@ if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
|
||||
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
|
||||
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
|
||||
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
|
||||
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
|
||||
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
|
||||
|
||||
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
|
||||
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
|
||||
@@ -1000,6 +1003,35 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
|
||||
|
||||
|
||||
######################
|
||||
# ACTION=VolumeControl - raise or lower the volume of a meetme participant
|
||||
######################
|
||||
if ($ACTION=="VolumeControl")
|
||||
{
|
||||
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) )
|
||||
{
|
||||
echo "Conference $exten, Stage $stage is not valid or queryCID $queryCID is not valid, Originate command not inserted\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$participant_number='XXYYXXYYXXYYXX';
|
||||
if (eregi('DOWN',$stage)) {$vol_prefix='3';}
|
||||
else {$vol_prefix='4';}
|
||||
$local_DEF = 'Local/';
|
||||
$local_AMP = '@';
|
||||
$volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context";
|
||||
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $volume_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
echo "Volume command sent for Conference $exten, Stage $stage Channel $channel on $server_ip\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+47
-2
@@ -1493,6 +1493,51 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
}
|
||||
|
||||
// ################################################################################
|
||||
// Send volume control command for meetme participant
|
||||
function volume_control(taskdirection,taskvolchannel)
|
||||
{
|
||||
var xmlhttp=false;
|
||||
/*@cc_on @*/
|
||||
/*@if (@_jscript_version >= 5)
|
||||
// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
// and security blocked creation of the objects.
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (E) {
|
||||
xmlhttp = false;
|
||||
}
|
||||
}
|
||||
@end @*/
|
||||
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||
{
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
var queryCID = "VCagcW" + epoch_sec + user_abb;
|
||||
var volchanvalue = taskvolchannel;
|
||||
livevolume_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=VolumeControl&format=text&channel=" + volchanvalue + "&stage=" + taskdirection + "&exten=" + session_id + "&ext_context=" + ext_context + "&queryCID=" + queryCID;
|
||||
xmlhttp.open('POST', 'manager_send.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(livevolume_query);
|
||||
xmlhttp.onreadystatechange = function()
|
||||
{
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
{
|
||||
Nactiveext = null;
|
||||
Nactiveext = xmlhttp.responseText;
|
||||
alert(xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// park customer and place 3way call
|
||||
function xfer_park_dial()
|
||||
@@ -1801,7 +1846,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var LMAcontent_match=0;
|
||||
var conv_start=-1;
|
||||
// var live_conf_HTML = "<font face=\"Arial,Helvetica\"><B>LIVE CALLS IN THIS CONFERENCE:</B></font><BR><TABLE WIDTH=500><TR BGCOLOR=#E6E6E6><TD><font class=\"log_title\">#</TD><TD><font class=\"log_title\">REMOTE CHANNEL</TD><TD><font class=\"log_title\">HANGUP</TD><TD><font class=\"log_title\">XFER</TD></TR>";
|
||||
var live_conf_HTML = "<font face=\"Arial,Helvetica\"><B>LIVE CALLS IN YOUR SESSION:</B></font><BR><TABLE WIDTH=500><TR BGCOLOR=#E6E6E6><TD><font class=\"log_title\">#</TD><TD><font class=\"log_title\">REMOTE CHANNEL</TD><TD><font class=\"log_title\">HANGUP</TD></TR>";
|
||||
var live_conf_HTML = "<font face=\"Arial,Helvetica\"><B>LIVE CALLS IN YOUR SESSION:</B></font><BR><TABLE WIDTH=500><TR BGCOLOR=#E6E6E6><TD><font class=\"log_title\">#</TD><TD><font class=\"log_title\">REMOTE CHANNEL</TD><TD><font class=\"log_title\">HANGUP</TD><TD><font class=\"log_title\">VOLUME</TD></TR>";
|
||||
if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0))
|
||||
{
|
||||
LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]='';
|
||||
@@ -1818,7 +1863,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var conv_ct = (loop_ct + conv_start);
|
||||
var channelfieldA = conf_chan_array[conv_ct];
|
||||
// live_conf_HTML = live_conf_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + channelfieldA + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldA + "');return false;\">Hangup</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + channelfieldA + "');return false;\">XFER</td></tr>";
|
||||
live_conf_HTML = live_conf_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + channelfieldA + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldA + "');return false;\">HANGUP</td></tr>";
|
||||
live_conf_HTML = live_conf_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + channelfieldA + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldA + "');return false;\">HANGUP</a></td><td><a href=\"#\" onclick=\"volume_control('UP','" + channelfieldA + "');return false;\"><IMG SRC=\"./images/vdc_volume_up.gif\" BORDER=0></a> <a href=\"#\" onclick=\"volume_control('DOWN','" + channelfieldA + "');return false;\"><IMG SRC=\"./images/vdc_volume_down.gif\" BORDER=0></a></td></tr>";
|
||||
|
||||
// var debugspan = document.getElementById("debugbottomspan").innerHTML;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user