changed kick-all-calls on logout option to first hangup agent in all cases in vdc_db_query.php
moved ugrade_2.0.5 to old and created new upgrade_2.0.5 file git-svn-id: svn://192.168.202.10@757 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1932,6 +1932,20 @@ else
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$wcs_delete = mysql_affected_rows($link);
|
||||
|
||||
##### Hangup the client phone
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($rslt)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$agent_channel = "$row[0]";
|
||||
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
|
||||
if ($LogouTKicKAlL > 0)
|
||||
{
|
||||
$local_DEF = 'Local/5555';
|
||||
@@ -1943,22 +1957,6 @@ else
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
else
|
||||
{
|
||||
##### Hangup the client phone
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($rslt)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$agent_channel = "$row[0]";
|
||||
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
}
|
||||
|
||||
$pause_sec=0;
|
||||
$stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
|
||||
Reference in New Issue
Block a user