bug fix for agi-VDAD_ALL_inbound.agi for fewest calls
bug fixes for manual dial transfers to closer git-svn-id: svn://192.168.202.10@821 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
# 80109-2348 - added option to trigger a system process when the call is sent to an agent
|
||||
# 80227-0335 - added queue priority functionality
|
||||
# 80302-0232 - added drop_action and transfer to in-group
|
||||
# 80402-0142 - added code for manual dial transfer duplicate check
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -304,9 +305,32 @@ $VDADphone_code='';
|
||||
|
||||
if ($channel =~ /Local/i)
|
||||
{
|
||||
if ($inbound_number =~ /CXFER/)
|
||||
if ( ($inbound_number =~ /CXFER/) || ($call_handle_method =~ /^CLOSER/) )
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "+++++ VDAD START LOCAL CHANNEL: CXFER OVERRIDE- $priority"; &agi_output;}
|
||||
if ($call_handle_method =~ /^CLOSER/)
|
||||
{
|
||||
sleep(1);
|
||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where lead_id='$CIDlead_id' and call_type='IN' and campaign_id='$channel_group' and channel NOT LIKE \"Local%\";";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$Pseudo_duplicate_count = "$aryA[0]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($Pseudo_duplicate_count > 0)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "+++++ INBOUND LOCAL DUPLICATE: EXITING- $priority"; &agi_output;}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -728,9 +752,9 @@ if ($channel_status < 1)
|
||||
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';}
|
||||
if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';}
|
||||
if ($CAMP_callorder =~ /campaign_rank/i) {$agent_call_order = 'order by campaign_weight desc,last_call_finish';}
|
||||
if ($CAMP_callorder =~ /fewest_calls_campaign/i) {$agent_call_order = 'order by calls_today,last_call_finish';}
|
||||
if ($CAMP_callorder =~ /fewest_calls_campaign/i) {$agent_call_order = 'order by vicidial_live_agents.calls_today,vicidial_live_agents.last_call_finish';}
|
||||
if ($CAMP_callorder =~ /inbound_group_rank/i) {$aco_sub=1; $agent_call_order = 'order by group_weight desc';}
|
||||
if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by calls_today';}
|
||||
if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by vicidial_live_inbound_agents.calls_today,vicidial_live_inbound_agents.last_call_finish';}
|
||||
|
||||
|
||||
$vci=0;
|
||||
|
||||
@@ -194,6 +194,12 @@ package(as of this writing it is 2.0.4.1)
|
||||
wget http://internap.dl.sourceforge.net/sourceforge/astguiclient/astguiclient_2.0.4.1.zip
|
||||
unzip astguiclient_2.0.4.1.zip
|
||||
perl install.pl
|
||||
- for SVN 2.0.4 branch:
|
||||
mkdir /usr/src/astguiclient
|
||||
cd /usr/src/astguiclient
|
||||
svn checkout svn://svn.eflo.net:43690/agc_2-X/branches/agc_2.0.4
|
||||
cd agc_2.0.4
|
||||
perl install.pl
|
||||
- for SVN 2.0 trunk:
|
||||
mkdir /usr/src/astguiclient
|
||||
cd /usr/src/astguiclient
|
||||
@@ -237,13 +243,13 @@ musiconhold audio files to be converted to native formats like GSM, ULAW and ALA
|
||||
mv -f *.mp3 ../orig-mp3/
|
||||
mkdir ../quiet-mp3
|
||||
cd ../quiet-mp3
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.25 fpm-sunshine.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 fpm-sunshine.wav vol 0.25
|
||||
sox fpm-sunshine.wav -t gsm -r 8000 -b -c 1 fpm-sunshine.gsm
|
||||
sox fpm-sunshine.wav -t ul -r 8000 -b -c 1 fpm-sunshine.pcm
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.25 fpm-calm-river.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 fpm-calm-river.wav vol 0.25
|
||||
sox fpm-calm-river.wav -t gsm -r 8000 -b -c 1 fpm-calm-river.gsm
|
||||
sox fpm-calm-river.wav -t ul -r 8000 -b -c 1 fpm-calm-river.pcm
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.25 fpm-world-mix.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 fpm-world-mix.wav vol 0.25
|
||||
sox fpm-world-mix.wav -t gsm -r 8000 -b -c 1 fpm-world-mix.gsm
|
||||
sox fpm-world-mix.wav -t ul -r 8000 -b -c 1 fpm-world-mix.pcm
|
||||
rm -f ../mohmp3/*.raw
|
||||
|
||||
@@ -1048,13 +1048,13 @@ musiconhold audio files to be converted to native formats like GSM, ULAW and ALA
|
||||
mv -f *.mp3 ../orig-mp3/
|
||||
mkdir ../quiet-mp3
|
||||
cd ../quiet-mp3
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.25 fpm-sunshine.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 fpm-sunshine.wav vol 0.25
|
||||
sox fpm-sunshine.wav -t gsm -r 8000 -b -c 1 fpm-sunshine.gsm
|
||||
sox fpm-sunshine.wav -t ul -r 8000 -b -c 1 fpm-sunshine.pcm
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.25 fpm-calm-river.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 fpm-calm-river.wav vol 0.25
|
||||
sox fpm-calm-river.wav -t gsm -r 8000 -b -c 1 fpm-calm-river.gsm
|
||||
sox fpm-calm-river.wav -t ul -r 8000 -b -c 1 fpm-calm-river.pcm
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.25 fpm-world-mix.wav
|
||||
sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 fpm-world-mix.wav vol 0.25
|
||||
sox fpm-world-mix.wav -t gsm -r 8000 -b -c 1 fpm-world-mix.gsm
|
||||
sox fpm-world-mix.wav -t ul -r 8000 -b -c 1 fpm-world-mix.pcm
|
||||
rm -f ../mohmp3/*.raw
|
||||
|
||||
+51
-25
@@ -32,8 +32,8 @@
|
||||
# - $agent_log_id - ('123456',...)
|
||||
# - $call_server_ip - ('10.10.10.15',...)
|
||||
# - $CalLCID - ('VD01234567890123456',...)
|
||||
# - $stage - ('UP','DOWN')
|
||||
#
|
||||
# - $stage - ('UP','DOWN','2NDXfeR')
|
||||
# - $session_id - ('8600051')
|
||||
|
||||
# CHANGELOG:
|
||||
# 50401-1002 - First build of script, Hangup function only
|
||||
@@ -68,6 +68,8 @@
|
||||
# 70226-1251 - Added Mute/UnMute to conference volume control
|
||||
# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging
|
||||
# 70322-1636 - Added sipsak display ability
|
||||
# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls
|
||||
# 80402-0121 - Fixes for manual dial transfers on some systems
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -137,6 +139,8 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e
|
||||
elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];}
|
||||
if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];}
|
||||
elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];}
|
||||
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
|
||||
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
|
||||
|
||||
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
|
||||
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
|
||||
@@ -147,8 +151,8 @@ if (!isset($ACTION)) {$ACTION="Originate";}
|
||||
if (!isset($format)) {$format="alert";}
|
||||
if (!isset($ext_priority)) {$ext_priority="1";}
|
||||
|
||||
$version = '2.0.29';
|
||||
$build = '70320-1502';
|
||||
$version = '2.0.5-30';
|
||||
$build = '80402-0121';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -459,29 +463,28 @@ if ($ACTION=="RedirectVD")
|
||||
else
|
||||
{
|
||||
if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;}
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';";
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
|
||||
}
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
$ACTION="Redirect";
|
||||
}
|
||||
}
|
||||
@@ -878,6 +881,29 @@ if ($ACTION=="RedirectXtra")
|
||||
|
||||
if ($ACTION=="Redirect")
|
||||
{
|
||||
### for manual dial VICIDIAL calls send the second attempt to transfer the call
|
||||
if ($stage=="2NDXfeR")
|
||||
{
|
||||
$local_DEF = 'Local/';
|
||||
$local_AMP = '@';
|
||||
$hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context";
|
||||
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row > 0)
|
||||
{
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
$channel=$rowx[0];
|
||||
$channel = eregi_replace("1$","2",$channel);
|
||||
$queryCID = eregi_replace("^.","Q",$queryCID);
|
||||
}
|
||||
}
|
||||
|
||||
$row=''; $rowx='';
|
||||
$channel_live=1;
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
|
||||
@@ -145,10 +145,11 @@
|
||||
# 80116-1032 - added user_closer_log logging in regCLOSER
|
||||
# 80125-1213 - fixed vicidial_log bug when call is from closer
|
||||
# 80317-2051 - Added in-group recording settings
|
||||
# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag
|
||||
#
|
||||
|
||||
$version = '2.0.5-70';
|
||||
$build = '80317-2051';
|
||||
$version = '2.0.5-71';
|
||||
$build = '80402-0121';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
@@ -737,7 +738,8 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$local_AMP = '@';
|
||||
$Local_out_prefix = '9';
|
||||
$Local_dial_timeout = '60';
|
||||
$Local_persist = '/n';
|
||||
# $Local_persist = '/n';
|
||||
$Local_persist = '';
|
||||
if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;}
|
||||
$Local_dial_timeout = ($Local_dial_timeout * 1000);
|
||||
if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";}
|
||||
|
||||
+67
-11
@@ -176,10 +176,12 @@
|
||||
# 80109-1510 - added gender select list
|
||||
# 80116-1032 - added option on CLOSER-type campaigns to change in-groups when paused
|
||||
# 80317-2106 - added recording override options for inbound group calls
|
||||
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
|
||||
# 80402-0121 - Fixes for manual dial transfers on some systems
|
||||
#
|
||||
|
||||
$version = '2.0.5-147';
|
||||
$build = '80317-2106';
|
||||
$version = '2.0.5-149';
|
||||
$build = '80402-0121';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
@@ -1832,6 +1834,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var DispO3wayCalLxfernumber = '';
|
||||
var DispO3wayCalLcamptail = '';
|
||||
var PausENotifYCounTer = 0;
|
||||
var RedirecTxFEr = 0;
|
||||
var phone_ip = '<? echo $phone_ip ?>';
|
||||
var enable_sipsak_messages = '<? echo $enable_sipsak_messages ?>';
|
||||
var allow_sipsak_messages = '<? echo $allow_sipsak_messages ?>';
|
||||
@@ -2583,6 +2586,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
// Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL
|
||||
function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote)
|
||||
{
|
||||
if (auto_dial_level == 0) {RedirecTxFEr = 1;}
|
||||
var xmlhttp=false;
|
||||
/*@cc_on @*/
|
||||
/*@if (@_jscript_version >= 5)
|
||||
@@ -2655,7 +2659,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id;
|
||||
}
|
||||
}
|
||||
if (taskvar == 'XfeRINTERNAL')
|
||||
@@ -2674,25 +2678,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
// "90009*$group**$lead_id**$phone_number*$user*";
|
||||
var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
|
||||
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id;
|
||||
}
|
||||
if (taskvar == 'XfeR')
|
||||
{
|
||||
var queryCID = "LRvdcW" + epoch_sec + user_abb;
|
||||
var redirectdestination = document.vicidial_form.extension_xfer.value;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1";
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
||||
}
|
||||
if (taskvar == 'VMAIL')
|
||||
{
|
||||
var queryCID = "LVvdcW" + epoch_sec + user_abb;
|
||||
var redirectdestination = document.vicidial_form.extension_xfer.value;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1";
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
||||
}
|
||||
if (taskvar == 'ENTRY')
|
||||
{
|
||||
var queryCID = "LEvdcW" + epoch_sec + user_abb;
|
||||
var redirectdestination = document.vicidial_form.extension_xfer_entry.value;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1";
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
||||
}
|
||||
if (taskvar == '3WAY')
|
||||
{
|
||||
@@ -2714,7 +2718,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value;
|
||||
DispO3wayCalLcamptail = '';
|
||||
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=" + XfeRSelecT.value;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=" + XfeRSelecT.value + "&session_id=" + session_id;
|
||||
|
||||
if (taskdebugnote == 'FIRST')
|
||||
{
|
||||
@@ -2727,7 +2731,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var redirectdestination = taskxferconf;
|
||||
var redirectdestserverip = taskserverip;
|
||||
var parkedby = protocol + "/" + extension;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby;
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id;
|
||||
|
||||
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('FROMParK','" + redirectdestination + "','" + redirectdestserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_grabparkedcall.gif\" border=0 alt=\"Grab Parked Call\"></a>";
|
||||
customerparked=1;
|
||||
@@ -2748,7 +2752,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{var dest_dialstring = session_id;}
|
||||
}
|
||||
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1";
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
||||
|
||||
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + redirectdestination + "','" + redirectdestserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_parkcall.gif\" border=0 alt=\"Park Call\"></a>";
|
||||
customerparked=0;
|
||||
@@ -2769,11 +2773,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
|
||||
// used to send second Redirect for manual dial calls
|
||||
if (auto_dial_level == 0)
|
||||
{
|
||||
RedirecTxFEr = 1;
|
||||
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)
|
||||
{
|
||||
xmlhttp.open('POST', 'manager_send.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(xferredirect_query + "&stage=2NDXfeR");
|
||||
xmlhttp.onreadystatechange = function()
|
||||
{
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
{
|
||||
Nactiveext = null;
|
||||
Nactiveext = xmlhttp.responseText;
|
||||
// alert(RedirecTxFEr + "|" + xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
}
|
||||
|
||||
if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') )
|
||||
{
|
||||
if (auto_dial_level == 0) {RedirecTxFEr = 1;}
|
||||
document.vicidial_form.callchannel.value = '';
|
||||
document.vicidial_form.callserverip.value = '';
|
||||
if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;}
|
||||
// alert(RedirecTxFEr + "|" + auto_dial_level);
|
||||
dialedcall_send_hangup();
|
||||
}
|
||||
|
||||
@@ -2884,6 +2932,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
RedirecTxFEr=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4323,7 +4372,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
AgainCalLSecondS = VD_live_call_secondS;
|
||||
AgaiNCalLCID = CalLCID;
|
||||
var process_post_hangup=0;
|
||||
if (MD_channel_look==1)
|
||||
if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) )
|
||||
{
|
||||
MD_channel_look=0;
|
||||
DialTimeHangup();
|
||||
@@ -4364,6 +4413,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{
|
||||
Nactiveext = null;
|
||||
Nactiveext = xmlhttp.responseText;
|
||||
|
||||
// alert(xmlhttp.responseText);
|
||||
// var HU_debug = xmlhttp.responseText;
|
||||
// var HU_debug_array=HU_debug.split(" ");
|
||||
@@ -4520,6 +4570,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
ShoWTransferMain('OFF');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4608,6 +4659,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
// Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect
|
||||
function DialTimeHangup()
|
||||
{
|
||||
if (RedirecTxFEr < 1)
|
||||
{
|
||||
// alert("RedirecTxFEr|" + RedirecTxFEr);
|
||||
MD_channel_look=0;
|
||||
var xmlhttp=false;
|
||||
/*@cc_on @*/
|
||||
@@ -4646,6 +4700,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4945,6 +5000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user