<HTML>
<HEAD>
<TITLE>Re: [Freeswitch-users] FreeSWITCH Sometimes Doesn't Fire Custom Event</TITLE>
</HEAD>
<BODY>
<FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>You should be opening a ticket on Jira. This is not a ticket, this is the mailing list...<BR>
<BR>
Please see jira.freeswitch.org for opening a bug report and see <a href="http://wiki.freeswitch.org/wiki/Reporting_Bugs">http://wiki.freeswitch.org/wiki/Reporting_Bugs</a> for more info on how to properly do this<BR>
<BR>
<BR>
On 3/6/13 8:21 PM, &quot;Zoltan Medveczky&quot; &lt;<a href="zoltan.medveczky@8x8.com">zoltan.medveczky@8x8.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>Hi,<BR>
<BR>
I'm encountering an issue where FS on occasion doesn't seem to dispatch a custom event from the dial plan.  I would estimate that this occurs on average approximately once in every 15 calls.  <BR>
<BR>
Here is the dial plan extension in question:<BR>
<BR>
    &lt;extension name=&quot;null_fwd2queue19&quot;&gt;                              <BR>
        &lt;condition field=&quot;destination_number&quot; expression=&quot;^(null_fwd2queue19)$&quot;&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;CheckAgent=no&quot; /&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;CheckAgentLoggedIn=no&quot; /&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;CheckLoad=no&quot; /&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;MaxLoad=null&quot; /&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;LongestWaitingTimePermitted=null&quot; /&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;MaxWait=null&quot; /&gt;<BR>
            &lt;action application=&quot;set&quot; data=&quot;QueueName=null&quot; /&gt;<BR>
            &lt;action inline=&quot;true&quot; application=&quot;event&quot; data=&quot;Event-Subclass=Global_Reach::QueueCall,Event-Name=CUSTOM,GR_CallState=CallQueued&quot; /&gt;<BR>
            &lt;action application=&quot;playback&quot; data=&quot;local_stream://moh&quot; /&gt;<BR>
        &lt;/condition&gt;<BR>
    &lt;/extension&gt;<BR>
<BR>
And here is the normal sequence of events received by the client application which is connected to the event socket in inbound mode:<BR>
<BR>
    CHANNEL_ANSWER<BR>
    CUSTOM<BR>
    PLAYBACK_START<BR>
<BR>
When the issue occurs, the sequence is the following:<BR>
<BR>
    CHANNEL_ANSWER<BR>
    PLAYBACK_START<BR>
<BR>
This would seem to imply that the event queue is not getting blocked since the client app does receive all events subsequent to the CUSTOM event.<BR>
<BR>
It's not clear to me at this point if the event is not getting queued at all or if it is simply not being sent out on the event socket.  I've started to debug the issue and have determined that it is at least getting as far as the call to &quot;switch_event::switch_fire_event_detailed()&quot; in &quot;mod_dptools&quot;.<BR>
<BR>
It's probably worth mentioning that the dial plan XML is being loaded dynamically for each call via a Lua script as opposed to a static configuration file. <BR>
<BR>
Here are the details on the environment where I'm able to reproduce the issue:<BR>
<BR>
    FS Version: 1.2.5.3<BR>
    OS:             RHEL 5.8 (Tikanga)<BR>
    Kernel:        2.6.18-308.el5<BR>
    CPU:           x86_64<BR>
<BR>
Please let me know if you require any additional environmental information.  I will amend this ticket as I uncover more data points.<BR>
<BR>
Thanks in advance...<BR>
<BR>
Cheers,<BR>
- Zoltan <BR>
     <BR>
<BR>
    <BR>
<BR>
   <BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_________________________________________________________________________<BR>
Professional FreeSWITCH Consulting Services:<BR>
<a href="consulting@freeswitch.org">consulting@freeswitch.org</a><BR>
<a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><BR>
<BR>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR>
<a href="http://www.cudatel.com">http://www.cudatel.com</a><BR>
<BR>
Official FreeSWITCH Sites<BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
<a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><BR>
<a href="http://www.cluecon.com">http://www.cluecon.com</a><BR>
<BR>
FreeSWITCH-users mailing list<BR>
<a href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
</SPAN></FONT></FONT><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>-- <BR>
Ken<BR>
<FONT COLOR="#0000FF"><U><a href="http://www.FreeSWITCH.org">http://www.FreeSWITCH.org</a><BR>
<a href="http://www.ClueCon.com">http://www.ClueCon.com</a><BR>
<a href="http://www.OSTAG.org">http://www.OSTAG.org</a><BR>
</U></FONT>irc.freenode.net #freeswitch<BR>
</SPAN></FONT>
</BODY>
</HTML>