From 2358a8cf8600f5a5096dcd6376acd6eb8d5ed4b1 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 4 Oct 2006 21:25:54 +0000 Subject: [PATCH] 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 --- LANG_www/agc/images/vdc_volume_down.gif | Bin 0 -> 356 bytes LANG_www/agc/images/vdc_volume_up.gif | Bin 0 -> 377 bytes bin/AST_send_action_child.pl | 72 +++++++++++++++++------- www/agc/images/vdc_volume_down.gif | Bin 0 -> 356 bytes www/agc/images/vdc_volume_up.gif | Bin 0 -> 377 bytes www/agc/manager_send.php | 34 ++++++++++- www/agc/vicidial.php | 49 +++++++++++++++- 7 files changed, 131 insertions(+), 24 deletions(-) create mode 100644 LANG_www/agc/images/vdc_volume_down.gif create mode 100644 LANG_www/agc/images/vdc_volume_up.gif create mode 100644 www/agc/images/vdc_volume_down.gif create mode 100644 www/agc/images/vdc_volume_up.gif diff --git a/LANG_www/agc/images/vdc_volume_down.gif b/LANG_www/agc/images/vdc_volume_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..d1745c6562bac6ed597706c5787cd997cc01fe2f GIT binary patch literal 356 zcmV-q0h|6uNk%w1VH^Mt0K@>mgI5;?LY-|@4yXooaQ&UqG78aP8 znA_Xiy}aJOzP{Ad+lYvWd3kxXw6yH(?C9v|_V)Izt*!3v?yjz`@9*#T_xE&kbOQjl z=jZ3<=H~zZ{{R30A^8LV00000EC2ui02}}h000HyAOUG)X`W~aA&^JCFqO@8?alA( zHCopFzz%0f98NG5#{qb}^n$=5aY9ifltGLWAn1C(00{DoH2+r z9v^c>Gf-Qc831x}02T;&hzSD^1Xvb(J_3Uq0uu*^h-MBR1qv1&k52<{aRv+%5}1h# zsSy*PkUxTP034_q1Oy3r2^Rf>792oG zPe1?wLQ+E*$^#NnS}hju@D^k9^cf2r81G{l5eN+x00UOIK(HV|fDtYXEEwTI2mm`& CYKtWR literal 0 HcmV?d00001 diff --git a/LANG_www/agc/images/vdc_volume_up.gif b/LANG_www/agc/images/vdc_volume_up.gif new file mode 100644 index 0000000000000000000000000000000000000000..8aa17f195edf9fda7dc19f79af61b7427d9f5f07 GIT binary patch literal 377 zcmV-<0fzoZNk%w1VH^Mt0K@88 zcH_6Vx3{;<%*@l%)9C2vq@<)478dU9?Yq0XX=!P*v$K19d++b>va+)G_xF5!eAfT~ z=H}+-=jZ?b{{R30A^8LV00000EC2ui02}}h000H{Ab?n8X=!Mho*GMP6yjxcZQt~q zUD@nSnha;iSu8l6q%!%qKpYtefN{B0f0J0t!HE0fQS{4-x>2oDqot4FCiHjY4jgaG9H& zb_O045EK}sK?{PY2Lqa{t(pt~6SNYQsBc^f2?-I45wjY>!5A6?Th-P9149ygb_4_r z2@@0olSJlT4^7-0vl9XUR)FS6UP%`OeGdc_00tS-9wZ1HIH!t1gKRRm@g$ZUN XnyEmsB1JO{DqvtRK_deJApih702q*} literal 0 HcmV?d00001 diff --git a/bin/AST_send_action_child.pl b/bin/AST_send_action_child.pl index eb3b9a8f..3f7aead9 100644 --- a/bin/AST_send_action_child.pl +++ b/bin/AST_send_action_child.pl @@ -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); diff --git a/www/agc/images/vdc_volume_down.gif b/www/agc/images/vdc_volume_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..d1745c6562bac6ed597706c5787cd997cc01fe2f GIT binary patch literal 356 zcmV-q0h|6uNk%w1VH^Mt0K@>mgI5;?LY-|@4yXooaQ&UqG78aP8 znA_Xiy}aJOzP{Ad+lYvWd3kxXw6yH(?C9v|_V)Izt*!3v?yjz`@9*#T_xE&kbOQjl z=jZ3<=H~zZ{{R30A^8LV00000EC2ui02}}h000HyAOUG)X`W~aA&^JCFqO@8?alA( zHCopFzz%0f98NG5#{qb}^n$=5aY9ifltGLWAn1C(00{DoH2+r z9v^c>Gf-Qc831x}02T;&hzSD^1Xvb(J_3Uq0uu*^h-MBR1qv1&k52<{aRv+%5}1h# zsSy*PkUxTP034_q1Oy3r2^Rf>792oG zPe1?wLQ+E*$^#NnS}hju@D^k9^cf2r81G{l5eN+x00UOIK(HV|fDtYXEEwTI2mm`& CYKtWR literal 0 HcmV?d00001 diff --git a/www/agc/images/vdc_volume_up.gif b/www/agc/images/vdc_volume_up.gif new file mode 100644 index 0000000000000000000000000000000000000000..8aa17f195edf9fda7dc19f79af61b7427d9f5f07 GIT binary patch literal 377 zcmV-<0fzoZNk%w1VH^Mt0K@88 zcH_6Vx3{;<%*@l%)9C2vq@<)478dU9?Yq0XX=!P*v$K19d++b>va+)G_xF5!eAfT~ z=H}+-=jZ?b{{R30A^8LV00000EC2ui02}}h000H{Ab?n8X=!Mho*GMP6yjxcZQt~q zUD@nSnha;iSu8l6q%!%qKpYtefN{B0f0J0t!HE0fQS{4-x>2oDqot4FCiHjY4jgaG9H& zb_O045EK}sK?{PY2Lqa{t(pt~6SNYQsBc^f2?-I45wjY>!5A6?Th-P9149ygb_4_r z2@@0olSJlT4^7-0vl9XUR)FS6UP%`OeGdc_00tS-9wZ1HIH!t1gKRRm@g$ZUN XnyEmsB1JO{DqvtRK_deJApih702q*} literal 0 HcmV?d00001 diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php index 5bfe93f1..d8acee9f 100644 --- a/www/agc/manager_send.php +++ b/www/agc/manager_send.php @@ -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";} + $rslt=mysql_query($stmt, $link); + echo "Volume command sent for Conference $exten, Stage $stage Channel $channel on $server_ip\n"; + } +} + + + + + diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 28f938bb..e9af0cd0 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -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 = "LIVE CALLS IN THIS CONFERENCE:
"; - var live_conf_HTML = "LIVE CALLS IN YOUR SESSION:
#REMOTE CHANNELHANGUPXFER
"; + var live_conf_HTML = "LIVE CALLS IN YOUR SESSION:
#REMOTE CHANNELHANGUP
"; 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 + ""; - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; // var debugspan = document.getElementById("debugbottomspan").innerHTML;
#REMOTE CHANNELHANGUPVOLUME
" + loop_ct + "" + channelfieldA + "HangupXFER
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP