[Freeswitch-users] PHP ESL Custom Events Event-Name sent twice
Anthony Minessale
anthony.minessale at gmail.com
Tue Jan 17 20:10:40 MSK 2012
you cannot do *all* custom events with /event plain custom
that command is expecting also a subclass param
/event plain custom CONFIG::AGENT_LIST
you have made a mistake if you think this unlocks heartbeat etc, probably
you did events plain all and forgot.
When I do it from perl I do not see what you reported,
perl test.pl
[DEBUG] esl.c:1183 esl_recv_event() RECV HEADER [Content-Type] =
[auth/request]
[DEBUG] esl.c:1353 esl_recv_event() RECV MESSAGE
Event-Name: SOCKET_DATA
Content-Type: auth/request
[DEBUG] esl.c:1381 esl_send() SEND
auth ClueCon
[DEBUG] esl.c:1183 esl_recv_event() RECV HEADER [Content-Type] =
[command/reply]
[DEBUG] esl.c:1183 esl_recv_event() RECV HEADER [Reply-Text] = [+OK
accepted]
[DEBUG] esl.c:1353 esl_recv_event() RECV MESSAGE
Event-Name: SOCKET_DATA
Content-Type: command/reply
Reply-Text: +OK accepted
[DEBUG] esl.c:502 esl_sendevent() SEND EVENT
Event-Name: CUSTOM
Event-Subclass: CONFIG::AGENT_LIST
[DEBUG] esl.c:1183 esl_recv_event() RECV HEADER [Content-Type] =
[command/reply]
[DEBUG] esl.c:1183 esl_recv_event() RECV HEADER [Reply-Text] = [+OK]
[DEBUG] esl.c:1353 esl_recv_event() RECV MESSAGE
Event-Name: SOCKET_DATA
Content-Type: command/reply
Reply-Text: +OK
+OK log level [7]
freeswitch at internal> /event plain custom CONFIG::AGENT_LIST
+OK event listener enabled plain
RECV EVENT
Event-Subclass: CONFIG::AGENT_LIST
Core-UUID: 23c2fe9b-f686-45e6-b43b-a3431d32d3e2
FreeSWITCH-Hostname: deathstar.freeswitch.org
FreeSWITCH-Switchname: DeathSTAR
FreeSWITCH-IPv4: 8.19.97.170
FreeSWITCH-IPv6: ::1
Event-Date-Local: 2012-01-17 11:33:51
Event-Date-GMT: Tue, 17 Jan 2012 17:33:51 GMT
Event-Date-Timestamp: 1326821631120687
Event-Calling-File: mod_event_socket.c
Event-Calling-Function: read_packet
Event-Calling-Line-Number: 1188
Command: sendevent CUSTOM
Event-Name: CUSTOM
freeswitch at internal>
cat test.pl
require ESL;
ESL::eslSetLogLevel(7);
my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
$e = new ESL::ESLevent("CUSTOM","CONFIG::AGENT_LIST");
$con->sendEvent($e);
On Tue, Jan 17, 2012 at 10:37 AM, Michael Collins <msc at freeswitch.org>wrote:
>
>
> On Tue, Jan 17, 2012 at 12:17 AM, Gerald Weber <gerald.weber at besharp.at>wrote:
>
>> Hi,****
>>
>> thanks for your answers****
>>
>> ** **
>>
>> @Anthony:****
>>
>> I did a “make current” mins ago, fs starts with version****
>>
>> FreeSWITCH Version 1.0.head (git-ef097a1 2012-01-16 17-26-35 -0600)****
>>
>> ** **
>>
>> @MC****
>>
>> I connect using ./fs_cli –H 192.168.20.73 –P 8021****
>>
>> /log 0****
>>
>> /event plain custom****
>>
>> ** **
>>
>> (additionally I connect to fs using telnet 192.168.20.73 8021 on another
>> terminal and issued “event plain all”)****
>>
>> ** **
>>
>> Starting my php script, fs_cli shows nothing, telnet shows the event:***
>> *
>>
>> ** **
>>
>> Content-Length: 583****
>>
>> Content-Type: text/event-plain****
>>
>> ** **
>>
>> Event-Subclass: CONFIG%3A%3AAGENT_LIST****
>>
>> Event-Name: SOCKET_DATA****
>>
>> …****
>>
>> Event-Date-Timestamp: 1326785361276007****
>>
>> …****
>>
>> Event-Name: CUSTOM****
>>
>> Agents: 2022****
>>
>> ZMQ-Msg-Cnt: 244****
>>
>> ** **
>>
>> /event plain CUSTOM in fs_cli and restart php script -> no output.****
>>
>> (first event subscription except all doesn’t work ?)****
>>
>> /event plain all in fs_cli and restart php script shows:****
>>
>>
> Hmm, I guess it does not work. You can do a filter:
>
> /event plain all
> /filter Event-Name CUSTOM
>
> In any case I'll have to defer to Tony as to why you're seeing two
> different header's named "Event-Name"
>
> -MC
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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
>
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120117/7e0f2f51/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list