<html><head><base href="x-msg://593/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span style="color: #2f10fe">var</span> session = ManagedSession.OriginateHandleHangup(s, dialString, ts, (y) => {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #2f10fe">try</span> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>Log.WriteLine(<a href="http://LogLevel.Info">LogLevel.Info</a>, <span style="color: #d320d5">"Hanging UP: "</span>+ y.GetUuid());</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>y.SetAutoHangup(<span style="color: #d320d5">true</span>); </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>y.flushDigits();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>y.flushEvents();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>y.destroy();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>y.Dispose();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>GC.Collect();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span>} <span style="color: #2f10fe">catch</span>( Exception ) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>Log.WriteLine(LogLevel.Critical, <span style="color: #d320d5">"Exception While Trying to handup"</span>);<span class="Apple-tab-span" style="white-space:pre">        </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; ">});</div><div>Changes yield no fix. Neither .Dispose() or .destroy() separately or together destroy the channel. I see in the log the hangup 11da29f3-2d9e-4b74-a439-a96ba60f2db1 but this is what I get from show channels.</div><div>The last log lines of the debug is: </div><div><div>2012-08-31 11:25:52.109393 [DEBUG] switch_core_state_machine.c:407 (sofia/external/XXXXXXXXXX) State Change CS_REPORTING -> CS_DESTROY</div><div>2012-08-31 11:25:52.109393 [DEBUG] switch_core_session.c:1224 Send signal sofia/external/XXXXXXXXXX [BREAK]</div><div>2012-08-31 11:25:52.109393 [DEBUG] switch_core_session.c:1424 Session 1 (sofia/external/XXXXXXXXXX) Locked, Waiting on external entities</div></div><div><br></div><div><br></div><div><div><a href="mailto:freeswitch@fs03.int.colo">freeswitch@fs03.int.colo</a>> show channels</div><div>11da29f3-2d9e-4b74-a439-a96ba60f2db1,outbound,2012-08-31 11:25:24,1346430324,sofia/external/12146635351,CS_SOFT_EXECUTE,Vocalspace,2223334444,,12146635351,,,,default,PCMU,8000,64000,PCMU,8000,64000,,fs03.int.colo,,,ACTIVE,Outbound Call,12146635351,,,,</div><div><br></div><div><a href="mailto:freeswitch@fs03.int.colo">freeswitch@fs03.int.colo</a>> uuid_kill 11da29f3-2d9e-4b74-a439-a96ba60f2db1</div><div><br></div><div>-ERR No Such Channel!</div></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; ">I am calling this from "managed CustomModule.Api"</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; ">Calling GC.Collect() later in the execution does not resolve either.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(72, 168, 2); ">//------------------------------------------------------</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(72, 168, 2); ">// Entrypoint for blocking API execution</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(72, 168, 2); ">//------------------------------------------------------</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span style="color: #2f10fe">public</span> <span style="color: #2f10fe">void</span> Execute (ApiContext context) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(211, 32, 213); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "> context.Arguments, context.Event == <span style="color: #d320d5">null</span> ? <span style="color: #d320d5">"<none>"</span> : context.Event.GetEventType ()));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><span class="Apple-tab-span" style="white-space:pre">        </span>// this contains the above code</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span>Run(ParseArguments(context.Arguments));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span>GC.Collect();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; ">}</div><div><br></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; ">Thanks!</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; ">Suggestions appreciated.</div><div><div>On Aug 30, 2012, at 5:22 PM, Dave R. Kompel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font: normal normal normal 10pt/normal Tahoma, Verdana, sans-serif; "><div>Actually, all the managed objects are derived from IDisposable, so you should use the .Dispose() method, and let the wrapper do it's job.</div><br><blockquote style="border-left-color: rgb(0, 0, 255); border-left-width: 2px; border-left-style: solid; padding-left: 5px; margin-left: 5px; margin-right: 0px; "><hr><b>From:</b><span class="Apple-converted-space"> </span>Anthony Minessale [mailto:anthony.minessale@gmail.com]<br><b>To:</b><span class="Apple-converted-space"> </span>FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Thu, 30 Aug 2012 13:48:07 -0700<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [Freeswitch-users] Problem with originated calls hanging in CS_SOFT_EXEC state<br><br>destroy method should have a log line about (destroy/unlink session from object)<br>try calling your garbage collector, this is common issue with scripts<br>and make sure you are on latest GIT build<br><br><br>On Thu, Aug 30, 2012 at 3:24 PM, Phillip Boles<br><<a href="mailto:freeswitch-users@vocalspace.com">freeswitch-users@vocalspace.com</a>> wrote:<br>> Sorry for the excessive logs. Here is my call to originate.<br>><br>> var session = ManagedSession.OriginateHandleHangup(s, dialString, ts, (y)<br>> => {<br>> try {<br>> Log.WriteLine(<a href="http://LogLevel.Info">LogLevel.Info</a>, "Hanging UP: "+ y.GetUuid());<br>> y.SetAutoHangup(true);<br>> y.destroy();<br>><br>> } catch( Exception ) {<br>> Log.WriteLine(LogLevel.Critical, "Exception While Trying to handup");<span class="Apple-converted-space"> </span><br>> }<br>> });<br>><br>><br>> My hangup callback is getting hit and I am destroying the session<br>><br>> 2012-08-28 10:49:27.296108 [INFO] switch_cpp.cpp:1227 Handing UP:<br>> e315f2e8-1fa8-4fd9-849b-f687dad8aed5<br>><br>> This is the only call on the system as it is a develpment machine and I see<br>> the call state being changed.<br>><br>> 2012-08-28 10:49:27.296108 [DEBUG] switch_core_state_machine.c:79<br>> sofia/external/XXXXXXXXXXX Standard REPORTING, cause: NORMAL_CLEARING<br>> 2012-08-28 10:49:27.296108 [DEBUG] switch_core_state_machine.c:682<br>> (sofia/external/XXXXXXXXXXX) State REPORTING going to sleep<br>> 2012-08-28 10:49:27.296108 [DEBUG] switch_core_state_machine.c:407<br>> (sofia/external/XXXXXXXXXXX) State Change CS_REPORTING -> CS_DESTROY<br>><br>><br>> If I call show channels after the above output it show there is a session<br>> sitting in CS_SOFT_EXEC corresponding to UUID<br>> e315f2e8-1fa8-4fd9-849b-f687dad8aed5.<br>> Is there something else I need to do to release the lock on this session to<br>> let the resources be reclaimed.<br>><br>> Thanks!<br>><br>> Phillip<br>><br>><br>><br>><br>> _________________________________________________________________________<br>> Professional FreeSWITCH Consulting Services:<br>><span class="Apple-converted-space"> </span><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>><span class="Apple-converted-space"> </span><a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>><br>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>><span class="Apple-converted-space"> </span><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>><br>> Official FreeSWITCH Sites<br>><span class="Apple-converted-space"> </span><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>><span class="Apple-converted-space"> </span><a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>><span class="Apple-converted-space"> </span><a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>><br>> FreeSWITCH-users mailing list<br>><span class="Apple-converted-space"> </span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>><span class="Apple-converted-space"> </span><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>><span class="Apple-converted-space"> </span><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>><br><br><br><br>--<span class="Apple-converted-space"> </span><br>Anthony Minessale II<br><br>FreeSWITCH<span class="Apple-converted-space"> </span><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon<span class="Apple-converted-space"> </span><a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>Twitter:<span class="Apple-converted-space"> </span><a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br>MSN:<a href="mailto:anthony_minessale@hotmail.com">anthony_minessale@hotmail.com</a><br>GTALK/JABBER/PAYPAL:<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a><br>IRC:<span class="Apple-converted-space"> </span><a href="http://irc.freenode.net">irc.freenode.net</a><span class="Apple-converted-space"> </span>#freeswitch<br><br>FreeSWITCH Developer Conference<br>sip:<a href="mailto:888@conference.freeswitch.org">888@conference.freeswitch.org</a><br>googletalk:<a href="mailto:conf+888@conference.freeswitch.org">conf+888@conference.freeswitch.org</a><br>pstn:+19193869900<br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">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">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> </div><div> </div>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto: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="mailto: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:http://lists.freeswitch.org/mailman/options/freeswitch-users<br><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></blockquote></div><br></body></html>