its a race,<br><br>sometimes the socket connection ends before the channel<br><br>the linger socket command was added to tell FS to wait for the last channel event before<br>ending the connection<br><br>just send the command<br>
<br>linger<br><br><br><br><div class="gmail_quote">On Wed, Apr 1, 2009 at 3:19 PM, Victor Toofic <span dir="ltr">&lt;<a href="mailto:toofics@gmail.com">toofics@gmail.com</a>&gt;</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;">
Hi all!!<br>
<br>
I&#39;m stuck trying to use mod_event_socket in outbound mode. The problem<br>
that I&#39;m facing is that while in a incoming call, using &quot;myevents&quot; to<br>
monitor for the channel&#39;s events.. the event CHANNEL_HANGUP sometimes<br>
arrives and sometimes doesn&#39;t. I can&#39;t figure it out why.<br>
<br>
The dialplan is:<br>
<br>
&lt;extension name=&quot;9999&quot;&gt;<br>
  &lt;condition field=&quot;destination_number&quot; expression=&quot;^9999$&quot;&gt;<br>
    &lt;action application=&quot;verbose_events&quot; data=&quot;true&quot;/&gt;<br>
    &lt;action application=&quot;socket&quot; data=&quot;<a href="http://192.168.251.1:8384" target="_blank">192.168.251.1:8384</a> async full&quot;/&gt;<br>
  &lt;/condition&gt;<br>
&lt;/extension&gt;<br>
<br>
The process that handles the connection does:<br>
<br>
  1. connect<br>
  2. myevents<br>
     (received: Reply-Text: +OK Events Enabled)<br>
  3. sendmsg\n call-command: execute\n execute-app-name: answer<br>
     (received: Reply-Text: +OK)<br>
<br>
after this it waits for events and/or for the other party to hangup the<br>
call. (The DTMFs are for testing propourses).<br>
<br>
Sometimes the events that the process receives are:<br>
<br>
  &lt;&lt;&quot;CHANNEL_PARK&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE_COMPLETE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_ANSWER&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE_COMPLETE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;DTMF&quot;&gt;&gt;<br>
  &lt;&lt;&quot;DTMF&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_HANGUP&quot;&gt;&gt;<br>
<br>
(then it receives the &quot;text/disconnect-notice&quot; and the socket gets<br>
closed)<br>
<br>
and sometimes are:<br>
<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE_COMPLETE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_ANSWER&quot;&gt;&gt;<br>
  &lt;&lt;&quot;CHANNEL_EXECUTE_COMPLETE&quot;&gt;&gt;<br>
  &lt;&lt;&quot;DTMF&quot;&gt;&gt;<br>
  &lt;&lt;&quot;DTMF&quot;&gt;&gt;<br>
<br>
(then it receives the &quot;text/disconnect-notice&quot; and the socket gets<br>
closed)<br>
<br>
As you can see, even sometimes the first CHANNEL_PARK event doesn&#39;t<br>
arrive. I&#39;m very concerned about the missing CHANNEL_HANGUP event.<br>
<br>
In the other hand I was watching the events in a inbound connection to<br>
mod_event_socket with &quot;event text all&quot; and in this case there was no<br>
problem, all the events arrived as expected.<br>
<br>
Why in outbound mode some events get lost??<br>
I&#39;m missing something??<br>
<br>
I&#39;ve tried it in two different machines and the results are the same.<br>
I&#39;m using FreeSWITCH Version 1.0.3 (exported) on linux.<br>
<br>
Thnks!!<br>
<br>
--<br>
Regards..<br>
Victor Toofic<br>
<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>
</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>