1

I can't integrate vicidial non agent api in php .

require 'vicidialAgentAPI.php';

try {
    $vicidialAPI = new VicidialAgentAPI("127.0.0.1", "VicidialAPI", "6666", "1234",true);
    $vicidialAPI->version();        
} catch (Exception $e) {
    echo 'Exception: ',  $e->getMessage(), "\n";
}

What's my problem ?

http://127.0.0.1/agc/api.php?source=VicidialAPI&user=6666&pass=1234&function=version http://127.0.0.1/agc/api.php?source=VicidialAPI&user=6666&pass=1234&function=version Exception: cURL The requested URL returned error: 404 Not Found

Adam Kipnis
  • 10,175
  • 10
  • 35
  • 48

2 Answers2

1

Replace 127.0.0.1 with the IP address of your vicidial server. If your server is local, try 'localhost'.

Paul
  • 301
  • 1
  • 2
  • 12
1

You said "NON-agent API" in the title, then "AgentAPI" in the filename. Which are you trying to use?

Vicidial's NonAgent API is at http://SERVER_IP/vicidial/non_agent_api.php not "vicidialAgentAPI.php", unless you've created a copy or made your own. (The Agent API is at /agc/api.php)

You appear to be invoking the API as a class, but it is not. It's just a PHP file that accepts parameters and provides responses based on GET or POST data. If you made your own PHP class, then including the class definition would be a requirement to get help with why it isn't working.

http://vicidial.org/docs/NON-AGENT_API.txt

http://vicidial.org/docs/AGENT_API.txt

TheSatinKnight
  • 696
  • 7
  • 16