on outbound you would use myevents.  See confluence on mod_event_socket.

On Thu, Jul 23, 2015 at 5:12 AM, jaflong jaflong <jaflong@yandex.com> wrote:
 


On a inbound connection connecting with user name and password, (the code example below - top) according to the tcpdump the command $conn->events("plain", "ALL"); sends
"event plain ALL"
and is accepted and works.

However using the same command on outbound (the code example below - bottom) the response is error

Why does the same command work on esl inbound but not esl outbound?



INBOUND

<?php

require_once('ESL.php');

$conn = new ESLconnection('127.0.0.1', '8021', 'ClueCon');

while ($conn->connected() == 1) {
    
    $conn->events("plain", "ALL");
    
    $e = $conn->recvEvent();
    
    if ($e) {

    } else {

    }
    
}
?>

tcpdump

Content-Type: auth/request
auth ClueCon
Content-Type: command/reply
Reply-Text: +OK accepted
event plain ALL
Content-Type: command/reply
Reply-Text: +OK event listener enabled plain


----------------------------------------------------------------

OUTBOUND

<?php

require_once('ESL.php');

$conn = new ESLconnection(0);

while ($conn->connected() == 1) {
    
    $conn->events("plain", "ALL");
    
    $e = $conn->recvEvent();
    
    if ($e) {

    } else {

    }    
}
?>


tcpdump

event plain ALL
Content-Type: command/reply
Reply-Text: -ERR command not found

 
 
23.07.2015, 05:06, "Brian West" <brian@freeswitch.org>:
try 'events all plain;

On Wed, Jul 22, 2015 at 10:17 AM, jaflong jaflong <jaflong@yandex.com> wrote:
 
 
I am usingoutbount event socket but cannot get it to work

-----------------------------------

require_once('ESL.php');

$audio_location = "/usr/local/freeswitch/sounds/";
$music = $audio_location . "demo.wav";

$conn = new ESLconnection(0);

$conn->execute("answer");

$conn->events("plain","all");


while ($conn->connected() == 1) {

    $e = $conn->recvEvent();
    if ($e) {
        $arrEvent = eventParse($e);

    } else {


    }
    
}

-----------------------------------

This does not work, give response

event plain all

Content-Type: command/reply
Reply-Text: -ERR command not found

 
22.07.2015, 18:00, "Brian West" <brian@freeswitch.org>:
You may wish to try using outbound event socket if thats what you're wising to accomplish.

On Wed, Jul 22, 2015 at 9:55 AM, jaflong jaflong <jaflong@yandex.com> wrote:
I have a php script run by ivrd, is it possible to subscribe to
events on this outbound eslconnection

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


 
--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest

,

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


 
--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest

,

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest