<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, does anyone have an example of a simple PHP socket script that will listen and spawn of a process that handles the incoming call?<div><br></div><div>I understand the inbound socket and code such as this </div><div><a href="http://wiki.freeswitch.org/wiki/PHP_Event_Socket">http://wiki.freeswitch.org/wiki/PHP_Event_Socket</a> </div><div>that will let me initiate operations. It's the constantly running php socket program that I can't get my head around, and how it will spawn another php script that will be able to do things like answer the session, get dtmf, etc.<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">--</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Greg</font></p></div></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On Aug 2, 2009, at 6:35 PM, Michael Collins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Sun, Aug 2, 2009 at 12:38 PM, Nik Middleton <span dir="ltr"><<a href="mailto:nik.middleton@noblesolutions.co.uk">nik.middleton@noblesolutions.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div link="blue" vlink="purple" lang="EN-US"> <div><p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Hi Guys,</span></font></p><div><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font><br class="webkit-block-placeholder"></div><p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">I’m using an outbound socket to control calls, and it works a charm. However, what I’d like to do is send a custom event regarding the call on hang-up. The way I see things happening at the moment, and I could be wrong, is that the socket is closed when a hang-up occurs, so am I taking a chance trying to send the event then? (try to sneak out the event before socket closure happens) The other option is of course to open an inbound socket and send the event, but I’d rather not do that if possible.</span></font></p></div></div></blockquote><div>Nik,<br><br>Perhaps the "linger" event socket command will do what you need? Check out this commit:<br><a href="http://lists.freeswitch.org/pipermail/freeswitch-svn/2009-January/009391.html">http://lists.freeswitch.org/pipermail/freeswitch-svn/2009-January/009391.html</a><br> <br>Let me know if it works for you and I'll be sure to get it documented properly. If you get it working I'd love to see a code snippet so we can wikify this knowledge. :)<br><br>Thanks,<br>MC<br></div></div><input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"> </div> _______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>