I found my problem I think. switch_core_session_locate automatically locks the session (which is fine), but I didn&#39;t unlock it. Strange that things still seemed to work quite well.<br><br>Michel<br><br><div class="gmail_quote">
On Mon, Mar 25, 2013 at 9:04 PM, Michel Brabants <span dir="ltr">&lt;<a href="mailto:michel.brabants@gmail.com" target="_blank">michel.brabants@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the info. Is there any way to check what is keeping open the info. I modified the code to send out a notify (using an event). That is all that is different. A 200 OK comes back, but I didn&#39;t know that that would create an open reference .. (possibly)<br>

<br>Thanks,<br><br>Michel<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Mon, Mar 25, 2013 at 6:07 PM, Peter Olsson <span dir="ltr">&lt;<a href="mailto:POlsson@enghouse.com" target="_blank">POlsson@enghouse.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is something still holding a reference to the call, so it can&#39;t be destroyed.<br>
<br>
Are you using any scripts for this call - Lua, Javascript etc? A common misstake is to have a loop inside these scripts that doesn&#39;t exit when it should.<br>
<br>
/Peter<br>
________________________________<br>
Från: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] för Michel Brabants [<a href="mailto:michel.brabants@gmail.com" target="_blank">michel.brabants@gmail.com</a>]<br>


Skickat: den 25 mars 2013 17:40<br>
Till: FreeSWITCH Users Help<br>
Ämne: Re: [Freeswitch-users] show channels/calls shows unexisting(destroyed) sip channels<br>
<div><br>
So,<br>
<br>
it never seems to get to<br>
<br>
<br>
    switch_core_session_rwunlock(session);<br>
<br>
    switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Session %&quot; SWITCH_SIZE_T_FMT &quot; (%s) Ended\n&quot;,<br>
                      session-&gt;id, switch_channel_get_name(session-&gt;channel));<br>
<br>
<br>
Michel<br>
<br>
</div><div>On Mon, Mar 25, 2013 at 5:37 PM, Michel Brabants &lt;<a href="mailto:michel.brabants@gmail.com" target="_blank">michel.brabants@gmail.com</a>&lt;mailto:<a href="mailto:michel.brabants@gmail.com" target="_blank">michel.brabants@gmail.com</a>&gt;&gt; wrote:<br>


The last thing I can see regarding the state change, is the following:<br>
<br>
</div>switch_core_session.c:1518 Session 52 (sofia/sbc-external-2/<a href="mailto:sip%3A10000@172.16.102.187" target="_blank">sip:10000@172.16.102.187</a>&lt;mailto:<a href="mailto:sip%253A10000@172.16.102.187" target="_blank">sip%3A10000@172.16.102.187</a>&gt;) Locked, Waiting on external         entities<br>


<div><br>
After this, I receive a 200 OK, for the BYE that was send before this ...<br>
<br>
Michel<br>
<br>
Nothing really happens after that<br>
<br>
</div><div>On Mon, Mar 25, 2013 at 4:43 PM, Michel Brabants &lt;<a href="mailto:michel.brabants@gmail.com" target="_blank">michel.brabants@gmail.com</a>&lt;mailto:<a href="mailto:michel.brabants@gmail.com" target="_blank">michel.brabants@gmail.com</a>&gt;&gt; wrote:<br>


Hello,<br>
<br>
I was wondering where &quot;show channels&quot; gets its info from. I can see channels that don&#39;t exist anymore (freeswitch v1.2.7). All these channels got reinvites (which were processed ok) en they also seem to have entered the hangup-state (in the logfile, not in the channel-overview).<br>


<br>
So, I was wondering if show channels has a different view on the exisiting channels in comparison to the internal freeswitch memory.<br>
<br>
Thank you and kind regards,<br>
<br>
Michel<br>
<br>
<br>
</div>!DSPAM:51507a3b32761546519956!<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></div></blockquote></div><br>