Set stick flag on state handler so signal_bridge won't nuke it

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15357 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Giagnocavo 2009-11-04 21:23:33 +00:00
parent 4a2e4ffc0e
commit a8b1226467
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ namespace FreeSWITCH.Native
bleg.originate_table = new switch_state_handler_table();
bleg.originate_table.on_hangup = WrapStateHandlerDelegate(bleg.originate_onhangup_delegate);
bleg.originate_table.on_destroy = WrapStateHandlerDelegate(bleg.originate_ondestroy_delegate);
bleg.originate_table.flags = (int)switch_state_handler_flag_t.SSH_FLAG_STICKY;
var res = 0 == bleg.originate(aLegSession, destination, (int)timeout.TotalSeconds, bleg.originate_table);
bleg.originate_keepalive_handle = GCHandle.Alloc(bleg, GCHandleType.Normal); // Prevent GC from eating the bleg
if (res) {