look at the perl examples they should translate to php as all the objects and methods are the same.<br><br>Does anyone who uses ESL + scripting have any time to toss up some wiki pages?<br><br><br><div class="gmail_quote">
2009/6/15 Christian Löschenkohl <span dir="ltr">&lt;<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
i tried to<br>
i think i tried everthing and looked closely to everything in libs/esl/php (of<br>
course i build it and included the ESL.php file)<br>
<br>
but i do not get the idea in complete, does i work in a client-server way or<br>
in inbound mode like i want to (that is exactly my point)<br>
<br>
no examples are there (i would put them in the wiki if i had one)<br>
some simple code i would expect wot work, but i doesn&#39;t<br>
<br>
&lt;?php<br>
<br>
require_once(&quot;ESL.php&quot;);<br>
$esl = new eslConnection(&#39;127.0.0.1&#39;, &#39;8021&#39;, &#39;asgag243tsa&#39;);<br>
<br>
$esl-&gt;execute(&quot;setVariable&quot;, &quot;codec_string=PCMA&quot;);<br>
$esl-&gt;execute(&quot;answer&quot;);<br>
$esl-&gt;execute(&quot;sleep&quot;, &quot;2&quot;);<br>
$esl-&gt;execute(&quot;streamFile&quot;, &quot;/opt/freeswitch/sounds/en/us/callie/voicemail/8000/vm-hello&quot;);<br>
$esl-&gt;execute(&quot;hangup&quot;, &quot;16&quot;);<br>
<br>
?&gt;<br>
<br>
can you please help me, what do i get wrong?<br>
<br>
br<br>
<div class="im"><br>
<br>
On 2009-06-15 15:59, Anthony Minessale wrote:<br>
&gt; Did you actually use ESL with the php wrapper when you tried?<br>
&gt; You can do all those things from outbound event socket fairly easily.<br>
&gt;<br>
&gt; That mod_php you saw, never worked it was just a stub and it didn&#39;t<br>
&gt; actually ever work<br>
&gt; when the guy who added it totally disappeared, I removed it from tree.<br>
&gt;<br>
&gt; And you can still do event socket over localhost on the same box if you<br>
&gt; so choose.<br>
&gt;<br>
&gt; If you really want a mod_php it&#39;s entirely possible but it would<br>
&gt; probably cost you upwards<br>
&gt; of 5k in development costs.<br>
&gt;<br>
&gt;<br>
&gt; 2009/6/15 Christian Löschenkohl &lt;<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
</div>&gt; &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;&gt;<br>
<div><div></div><div class="h5">&gt;<br>
&gt;     hi<br>
&gt;<br>
&gt;     thank you very much for your input<br>
&gt;     i can say for me that i realy tried hard to use the event socket<br>
&gt;     library,<br>
&gt;     but untill now i can&#39;t use it like i used all the agi scripts or<br>
&gt;     even mod_perl now.<br>
&gt;<br>
&gt;     what i do most - in examples, if the server get&#39;s an incomming call<br>
&gt;<br>
&gt;     - find the right user for the number (not that easy because of did<br>
&gt;     in austria),<br>
&gt;        from database or file<br>
&gt;     - build the right dial string for the bridge application (here i<br>
&gt;     miss all the php<br>
&gt;        string functions most)<br>
&gt;     - unsing mod_php functions like setVariable, getVariable, answer,<br>
&gt;     transfer, sleep<br>
&gt;        (i don&#39;t see how to do this with the php esl)<br>
&gt;     - or i check if the number is part of a conferencing product and<br>
&gt;     build the right<br>
&gt;        conference setup<br>
&gt;<br>
&gt;     i think this would also be possible with lua and luasql, but i<br>
&gt;     developed years with<br>
&gt;     phpagi und i&#39;m very used to php in every kind of scripting or<br>
&gt;     how-to-get-a-solution<br>
&gt;     situation (since over 10 years now).<br>
&gt;<br>
&gt;     for me in our setup it&#39;s also the highest goal to get the servers<br>
&gt;     mostly independent<br>
&gt;     of each other. i think nobody of our costumers should be unreachable<br>
&gt;     because a central<br>
&gt;     scripting/event server or also database server has gone away (as<br>
&gt;     developers this happens<br>
&gt;     more often as we would like it to :-))<br>
&gt;<br>
&gt;     do not get me wrong, freeswitch is very powerfull and in the near<br>
&gt;     future it will replace<br>
&gt;     nearly all of our asterisk servers.<br>
&gt;<br>
&gt;     in combination with php the freeswitch plattform would be heaven for me<br>
&gt;<br>
&gt;     i also thought Brian Fertig has some source written (as posted on<br>
&gt;     <a href="http://wiki.freeswitch.org/wiki/Mod_php" target="_blank">http://wiki.freeswitch.org/wiki/Mod_php</a>),<br>
&gt;     in combination of the mod_python rewrite (page was last modified in<br>
&gt;     june 2007).<br>
&gt;<br>
&gt;     br<br>
&gt;<br>
&gt;<br>
&gt;     On 2009-06-14 01:15, Nik Middleton wrote:<br>
&gt;      &gt; I couldn’t agree more.  We’re working with a group that are<br>
&gt;     developing a<br>
&gt;      &gt; massive PHP based music application.  They are experts in PHP and<br>
&gt;     MySQL<br>
&gt;      &gt; but not in VOIP/Telephony.  By tuning an abstraction layer that<br>
&gt;     uses PHP<br>
&gt;      &gt; to communicate with the FS event socket, allows them to work on the<br>
&gt;      &gt; areas they know best and not worry about the telephony side too much.<br>
&gt;      &gt; We went the lua route, and don’t use the dial plan at all.  My<br>
&gt;     view is<br>
&gt;      &gt; to keep all db access and processing out of FS as much as<br>
&gt;     possible. With<br>
&gt;      &gt; the event socket you simply don’t need to embed anything apart<br>
&gt;     from the<br>
&gt;      &gt; essentials.<br>
&gt;      &gt;<br>
&gt;      &gt; We are now processing 100,000+ call setups a day (4 hours) per server<br>
&gt;      &gt; all using php scripts to drive the application.  We may well<br>
&gt;     ultimately<br>
&gt;      &gt; use C++ instead of PHP for the event socket comms, but right now PHP<br>
&gt;      &gt; does just fine.<br>
&gt;      &gt;<br>
&gt;      &gt; Regards<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;     ------------------------------------------------------------------------<br>
&gt;      &gt;<br>
&gt;      &gt; *From:* <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
&gt;     &lt;mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>&gt;<br>
&gt;      &gt; [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
&gt;     &lt;mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>&gt;] *On Behalf Of<br>
&gt;      &gt; *Michael Collins<br>
&gt;      &gt; *Sent:* 13 June 2009 21:57<br>
&gt;      &gt; *To:* <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
</div></div>&gt;     &lt;mailto:<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
<div><div></div><div class="h5">&gt;      &gt; *Subject:* Re: [Freeswitch-users] mod_php needed<br>
&gt;      &gt;<br>
&gt;      &gt; Perhaps you should look at controlling calls via the FreeSWITCH event<br>
&gt;      &gt; socket instead of from the dialplan. The nice thing about the event<br>
&gt;      &gt; socket is that your call control can happen on a separate<br>
&gt;     machine. There<br>
&gt;      &gt; is a PHP module for the ESL (event socket library) and it would be<br>
&gt;      &gt; relatively easy for you to get going. Here are some links to get you<br>
&gt;      &gt; started:<br>
&gt;      &gt;<br>
&gt;      &gt; <a href="http://wiki.freeswitch.org/wiki/PHP_Event_Socket" target="_blank">http://wiki.freeswitch.org/wiki/PHP_Event_Socket</a><br>
&gt;      &gt; <a href="http://wiki.freeswitch.org/wiki/Event_Socket" target="_blank">http://wiki.freeswitch.org/wiki/Event_Socket</a><br>
&gt;      &gt;<br>
&gt;      &gt; If you absolutely MUST have call control with scripts inside of the<br>
&gt;      &gt; dialplan then there simply is no better choice than Lua. You can<br>
&gt;     learn<br>
&gt;      &gt; Lua in a few hours, but getting mod_php finished and debugged<br>
&gt;     will take<br>
&gt;      &gt; time, money, and other resources that no one seems willing to spend.<br>
&gt;      &gt; Here is some information to consider:<br>
&gt;      &gt;<br>
&gt;      &gt; <a href="http://wiki.freeswitch.org/wiki/Mod_lua" target="_blank">http://wiki.freeswitch.org/wiki/Mod_lua</a><br>
&gt;      &gt;<br>
&gt;      &gt; Come join us on IRC (#freeswitch on <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a><br>
&gt;     &lt;<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>&gt;<br>
&gt;      &gt; &lt;<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>&gt;) if you want to discuss this further.<br>
&gt;      &gt;<br>
&gt;      &gt; -MC (IRC: mercutioviz)<br>
&gt;      &gt;<br>
&gt;      &gt; 2009/6/13 Christian Löschenkohl<br>
&gt;     &lt;<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
&gt;     &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;<br>
</div></div>&gt;      &gt; &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
<div><div></div><div class="h5">&gt;     &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;&gt;&gt;<br>
&gt;      &gt;<br>
&gt;      &gt; hello<br>
&gt;      &gt;<br>
&gt;      &gt; i am working for an austrian voip carrier.<br>
&gt;      &gt; for a few months i work with freeswitch and it is simply great.<br>
&gt;      &gt; it solves our needs in many places (high volume, flexible, stable).<br>
&gt;      &gt; the only thing i really miss is the avalibilty of php as a call<br>
&gt;     control<br>
&gt;      &gt; language.<br>
&gt;      &gt; mod_php or mod_freehp are not compiling anymore and my c++<br>
&gt;     knowledge isn&#39;t<br>
&gt;      &gt; that good (or even there :-) ).<br>
&gt;      &gt; i know there is perl, i also implemented some applications<br>
&gt;     (conference<br>
&gt;      &gt; system with provisioning,<br>
&gt;      &gt; inbound call routing to our application servers, some tests as<br>
&gt;     pbx), but<br>
&gt;      &gt; what should i say -<br>
&gt;      &gt; perl and me aren&#39;t compatible in the end.<br>
&gt;      &gt;<br>
&gt;      &gt; the greatest thing for us would be that mod_php comes alive again<br>
&gt;     with<br>
&gt;      &gt; the functional state<br>
&gt;      &gt; of mod_perl<br>
&gt;      &gt; (<a href="http://wiki.freeswitch.org/wiki/Mod_perl_functions_and_classes" target="_blank">http://wiki.freeswitch.org/wiki/Mod_perl_functions_and_classes</a>).<br>
&gt;      &gt; there is also a bounty entry about mod_php, to pay for this would<br>
&gt;     also<br>
&gt;      &gt; be an option and<br>
&gt;      &gt; could be discussed.<br>
&gt;      &gt;<br>
&gt;      &gt; keep on with the excellent work and greetings from austria<br>
&gt;      &gt;<br>
&gt;      &gt; --<br>
&gt;      &gt; Ing. Christian Löschenkohl<br>
&gt;      &gt; Technische Leitung, Forschung&amp; Entwicklung VoIP<br>
&gt;      &gt;<br>
&gt;      &gt; xpirio<br>
&gt;      &gt; Telekommunikation&amp; Service GmbH<br>
&gt;      &gt; Lakeside B04<br>
&gt;      &gt; 9020 Klagenfurt<br>
&gt;      &gt; Austria<br>
&gt;      &gt;<br>
&gt;      &gt; T +43 (0) 5 77 11 - 1000<br>
&gt;      &gt; F +43 (0) 5 77 11 - 1002<br>
&gt;      &gt; E <a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
&gt;     &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;<br>
</div></div>&gt;      &gt; &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
<div><div></div><div class="h5">&gt;     &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;&gt;<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt; _______________________________________________<br>
&gt;      &gt; Freeswitch-users mailing list<br>
&gt;      &gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt;      &gt; &lt;mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>&gt;&gt;<br>
&gt;      &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;      &gt;<br>
&gt;     UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;      &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;     ------------------------------------------------------------------------<br>
&gt;      &gt;<br>
&gt;      &gt; _______________________________________________<br>
&gt;      &gt; Freeswitch-users mailing list<br>
&gt;      &gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt;      &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;      &gt;<br>
&gt;     UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;      &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;     --<br>
&gt;     Ing. Christian Löschenkohl<br>
&gt;     Technische Leitung, Forschung &amp; Entwicklung VoIP<br>
&gt;<br>
&gt;     xpirio<br>
&gt;     Telekommunikation &amp; Service GmbH<br>
&gt;     Lakeside B04<br>
&gt;     9020 Klagenfurt<br>
&gt;     Austria<br>
&gt;<br>
&gt;     T  +43 (0) 5 77 11 - 1000<br>
&gt;     F  +43 (0) 5 77 11 - 1002<br>
&gt;     E <a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
&gt;     &lt;mailto:<a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a>&gt;<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     Freeswitch-users mailing list<br>
&gt;     <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt;     <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;     UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;     <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
</div></div><div class="im">&gt; Anthony Minessale II<br>
&gt;<br>
&gt; FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt;<br>
&gt; AIM: anthm<br>
&gt; <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
</div>&gt; &lt;mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>&gt;<br>
<div class="im">&gt; GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
</div>&gt; &lt;mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a>&gt;<br>
&gt; IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> &lt;<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>&gt; #freeswitch<br>
<div class="im">&gt;<br>
&gt; FreeSWITCH Developer Conference<br>
&gt; <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
</div>&gt; &lt;mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a>&gt;<br>
<div class="im">&gt; <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
</div>&gt; &lt;<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>&gt;<br>
<div class="im">&gt; <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
</div>&gt; &lt;mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>&gt;<br>
&gt; pstn:213-799-1400<br>
&gt;<br>
&gt;<br>
<div><div></div><div class="h5">&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
--<br>
Ing. Christian Löschenkohl<br>
Technische Leitung, Forschung &amp; Entwicklung VoIP<br>
<br>
xpirio<br>
Telekommunikation &amp; Service GmbH<br>
Lakeside B04<br>
9020 Klagenfurt<br>
Austria<br>
<br>
T  +43 (0) 5 77 11 - 1000<br>
F  +43 (0) 5 77 11 - 1002<br>
E  <a href="mailto:christian.loeschenkohl@xpirio.com">christian.loeschenkohl@xpirio.com</a><br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <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>
<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="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>