]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
hangup handler should run in cs_reporting
authorMichael Giagnocavo <mgg@giagnocavo.net>
Thu, 5 Nov 2009 18:12:01 +0000 (18:12 +0000)
committerMichael Giagnocavo <mgg@giagnocavo.net>
Thu, 5 Nov 2009 18:12:01 +0000 (18:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15375 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_managed/managed/ManagedSession.cs

index 276778d53bcbc99c05481bb685ecc2968c821ecb..26f04b9935852d3ecd8c78e20dccb34267f651b8 100644 (file)
@@ -162,7 +162,7 @@ namespace FreeSWITCH.Native
         switch_state_handler_table originate_table;\r
         GCHandle originate_keepalive_handle; // Make sure the B Leg is not collected and disposed until we run ondestroy\r
 \r
-        switch_status_t originate_onhangup_method(IntPtr channelPtr) {\r
+        switch_status_t originate_ondestroy_method(IntPtr channelPtr) {\r
             // CS_DESTROY lets the bleg be collected\r
             // and frees originate_table memory\r
             // Note that this (bleg ManagedSession) is invalid \r
@@ -179,19 +179,19 @@ namespace FreeSWITCH.Native
 \r
         /// <summary>\r
         /// Performs originate. Returns ManagedSession on success, null on failure.\r
-        /// onHangup is called as a state handler, after the channel is truly hungup.\r
+        /// onHangup is called as a state handler, after the channel is truly hungup (CS_REPORTING).\r
         /// </summary>\r
         public static ManagedSession OriginateHandleHangup(CoreSession aLegSession, string destination, TimeSpan timeout, Action<ManagedSession> onHangup) {\r
             var bleg = new ManagedSession();\r
 \r
-            bleg.originate_ondestroy_delegate = bleg.originate_onhangup_method;\r
+            bleg.originate_ondestroy_delegate = bleg.originate_ondestroy_method;\r
             bleg.originate_onhangup_delegate = CreateStateHandlerDelegate(sess_b => {\r
                 if (onHangup != null) {\r
                     onHangup(sess_b);\r
                 }\r
             });\r
             bleg.originate_table = new switch_state_handler_table();\r
-            bleg.originate_table.on_hangup = WrapStateHandlerDelegate(bleg.originate_onhangup_delegate);\r
+            bleg.originate_table.on_reporting = WrapStateHandlerDelegate(bleg.originate_onhangup_delegate);\r
             bleg.originate_table.on_destroy = WrapStateHandlerDelegate(bleg.originate_ondestroy_delegate);\r
             bleg.originate_table.flags = (int)switch_state_handler_flag_t.SSH_FLAG_STICKY;\r
             var res = 0 == bleg.originate(aLegSession, destination, (int)timeout.TotalSeconds, bleg.originate_table);\r