[Freeswitch-users] I have a php script run by ivrd, is it possible to subscribe to events on this outbound eslconnection
Brian West
brian at freeswitch.org
Thu Jul 23 19:09:40 MSD 2015
on outbound you would use myevents. See confluence on mod_event_socket.
On Thu, Jul 23, 2015 at 5:12 AM, jaflong jaflong <jaflong at 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 at freeswitch.org>:
>
> try 'event*s* all plain;
>
> On Wed, Jul 22, 2015 at 10:17 AM, jaflong jaflong <jaflong at 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 at 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 at 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 at 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 at 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 at freeswitch.org
>
>
> *Twitter: @FreeSWITCH , @briankwest*
> http://www.freeswitchbook.com
> http://www.freeswitchcookbook.com
>
> Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit:
> /r/freeswitch <https://www.reddit.com/r/freeswitch>
>
> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
> *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
> ,
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at 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 at 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 at 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 at 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 at freeswitch.org
>
>
> *Twitter: @FreeSWITCH , @briankwest*
> http://www.freeswitchbook.com
> http://www.freeswitchcookbook.com
>
> Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit:
> /r/freeswitch <https://www.reddit.com/r/freeswitch>
>
> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
> *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
> ,
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at 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 at 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 at 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 at 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 at freeswitch.org
*Twitter: @FreeSWITCH , @briankwest*
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit:
/r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
*iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150723/1c809ad6/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list