0 like 0 dislike
64 views
As in ViciDial there is an auto call disposition feature but we need auto resume feature too when agent is in paused state and code is dcmx so how do we achieve this?
asked Jun 7 in Education & Reference by Krish (880 points) | 64 views
    

1 Answer

0 like 0 dislike

Vicidial index.php

setInterval(function() {
recheckVDAI_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ACTION=VDADREcheckINCOMING" + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
 var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
      if(this.responseText==1){
      AutoDial_ReSume_PauSe('VDADready');
      }
    }
  };
  xhttp.open("GET", "auto_ready.php?"+recheckVDAI_query, true);
  xhttp.send();
}, 30000);

auto_ready.php

$servername = "localhost";
$username = "cron";
$password = "1234";
$dbname = "asterisk";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

$sql = "select * from vicidial_live_agents where status='PAUSED' and pause_code='DCMX' and user='".$_GET['user']."'";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
   $result = $conn->query($sql); $resultu = $conn->query("update vicidial_live_agents set status='READY' where user='".$_GET['user']."' and status='PAUSED' and pause_code='DCMX'");
        echo "1";

} else {
    echo "0 results";
}
$conn->close();
answered Jun 7 by Sam (1,420 points)
edited Jun 13 by Sam

Related questions

1 like 0 dislike
1 answer
asked Jul 16, 2014 in Education & Reference by Simmi (530 points) | 50 views
0 like 0 dislike
3 answers
asked Jan 20, 2014 in Education & Reference by Sam (1,420 points) | 170 views
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

Mathe Forum Schule und Studenten
1,161 questions
1,297 answers
271 comments
1,558 users