I am not seeing that, perhaps you are on an older version?<br><br><div class="gmail_quote">On Mon, Jan 16, 2012 at 9:39 AM, Gerald Weber <span dir="ltr"><<a href="mailto:gerald.weber@besharp.at">gerald.weber@besharp.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE-AT" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">i’m trying to send custom events using PHP ESL Library.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">(running FreeSWITCH Version 1.0.head (git-c37c029 2012-01-11 21-35-19 -0600))<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">My PHP Code:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><?php<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US"> require_once('ESL.php');<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> $sock = new ESLconnection('192.168.20.73', '8021', 'ClueCon');<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> $e = new ESLevent("CUSTOM","CONFIG::AGENT_LIST");<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US"> </span>$e->addHeader("Agents","2022");<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"> $sock->sendEvent($e);<u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US">?><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">When I connect to fs using telnet and run the php script from another xterm, I can see the following output:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Content-Length: 657<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Content-Type: text/event-json<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">{<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "Event-Subclass": "CONFIG::AGENT_LIST",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "Event-Name": "SOCKET_DATA",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "Core-UUID": "b3ac8858-4019-11e1-910a-9b04baf8e5ea",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "FreeSWITCH-Hostname": "freeswitch.local",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "FreeSWITCH-Switchname": "freeswitch.local",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "FreeSWITCH-IPv4": "192.168.20.73",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "FreeSWITCH-IPv6": "::1",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "Event-Date-Local": "<a href="tel:2012-01-16%2015" value="+12012011615" target="_blank">2012-01-16 15</a>:20:23",<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US"> "Event-Date-GMT": "Mon, 16 Jan 2012 14:20:23 GMT",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "Event-Date-Timestamp": "1326723623776184",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "Event-Calling-File": "mod_event_socket.c",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "Event-Calling-Function": "read_packet",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "Event-Calling-Line-Number": "1188",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "Command": "sendevent CUSTOM",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "Event-Name": "CUSTOM",<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> "Agents": "2022",<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "ZMQ-Msg-Cnt": "3508"<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">}<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Looks ok, but i don’t get why “Event-Name” is sent twice.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Shouldn’t there be an Event-Name: CUSTOM only ?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there a way to avoid this or am i missing something ?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">thx & regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">gw<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>