What is the call_info object? Best way to get help is to provide a simple working (or not working in this case) example of your code. Then I can compile/test and figure it out for ya.<div><br></div><div>It seems like last_event is NULL in this case...</div>
<div><br></div><div>Regards,<br clear="all">Joćo Mesquita<br><br>
<br><br><div class="gmail_quote">On Tue, Oct 18, 2011 at 8:06 PM, adam harris <span dir="ltr">&lt;<a href="mailto:admharris@gmx.com">admharris@gmx.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I am trying to check if event received was CHANNEL_HANUP<br>
<br>
<br>
I am doing somthing like this<br>
<br>
 const char *last_event = esl_event_get_header(call_info-&gt;global_handle-&gt;last_event,&quot;Event-Name&quot;);<br>
<br>
 if (strcmp(last_event,&quot;CHANNEL_HANGUP&quot;)) {<br>
 exit(0);<br>
 }<br>
<br>
However an error occurs<br>
<br>
src/esl_event.c:244: esl_event_get_header_ptr: Assertion `event&#39; failed.<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></div>