I am using outbound to ivrd. My Call gets answered however why do I not get events with $conn->events("plain", "ALL");
<include> <extension name="demo"> <condition field="destination_number" expression="^(\d+)$"> <action application="set" data="ivr_path=/usr/local/freeswitch/scripts/ivr_test.php"/> <action application="socket" data="127.0.0.1:8004" async full/> </condition> </extension> </include> ivr_test.php -------------- #!/usr/bin/php <?php require_once('ESL.php'); $conn = new ESLconnection(0); $music = "/usr/local/freeswitch/sounds/demo.wav"; $conn->execute("answer"); $conn->execute("playback", $music); while ($conn->connected() == 1) { $conn->events("plain", "ALL"); $e = $conn->recvEvent(); if ($e) { $name = $e->getHeader('event-name'); //echo "Got event $name\n"; $out = fopen('php://stderr', 'w+'); fwrite($out, "Got event $name\n"); } else { //echo "Event empty\n"; $out = fopen('php://stderr', 'w+'); fwrite($out, "Event empty\n"); } } I am using outbound to ivrd. My Call gets answered however why do I not get events with $conn->events("plain", "ALL");
participants (1)
-
jaflong jaflong