Exemple #1
0
 protected int originate(CoreSession a_leg_session, string dest, int timeout, switch_state_handler_table handlers)
 {
     int ret = freeswitchPINVOKE.CoreSession_originate(swigCPtr, CoreSession.getCPtr(a_leg_session), dest, timeout, switch_state_handler_table.getCPtr(handlers));
     return ret;
 }
Exemple #2
0
 internal static HandleRef getCPtr(switch_state_handler_table obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Exemple #3
0
 public static switch_status_t switch_ivr_originate(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_core_session bleg, SWIGTYPE_p_switch_call_cause_t cause, string bridgeto, uint timelimit_sec, switch_state_handler_table table, string cid_name_override, string cid_num_override, switch_caller_profile caller_profile_override, switch_event ovars, uint flags, SWIGTYPE_p_switch_call_cause_t cancel_cause)
 {
     switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_originate(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_core_session.getCPtr(bleg), SWIGTYPE_p_switch_call_cause_t.getCPtr(cause), bridgeto, timelimit_sec, switch_state_handler_table.getCPtr(table), cid_name_override, cid_num_override, switch_caller_profile.getCPtr(caller_profile_override), switch_event.getCPtr(ovars), flags, SWIGTYPE_p_switch_call_cause_t.getCPtr(cancel_cause));
     return ret;
 }
Exemple #4
0
 public static void switch_core_remove_state_handler(switch_state_handler_table state_handler)
 {
     freeswitchPINVOKE.switch_core_remove_state_handler(switch_state_handler_table.getCPtr(state_handler));
 }
Exemple #5
0
 public static int switch_core_add_state_handler(switch_state_handler_table state_handler)
 {
     int ret = freeswitchPINVOKE.switch_core_add_state_handler(switch_state_handler_table.getCPtr(state_handler));
     return ret;
 }
Exemple #6
0
 public static void switch_channel_clear_state_handler(SWIGTYPE_p_switch_channel channel, switch_state_handler_table state_handler)
 {
     freeswitchPINVOKE.switch_channel_clear_state_handler(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_state_handler_table.getCPtr(state_handler));
 }
Exemple #7
0
 public static int switch_channel_add_state_handler(SWIGTYPE_p_switch_channel channel, switch_state_handler_table state_handler)
 {
     int ret = freeswitchPINVOKE.switch_channel_add_state_handler(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_state_handler_table.getCPtr(state_handler));
     return ret;
 }
        GCHandle originate_keepalive_handle; // Make sure the B Leg is not collected and disposed until we run ondestroy

        switch_status_t originate_ondestroy_method(IntPtr channelPtr) {
            // CS_DESTROY lets the bleg be collected
            // and frees originate_table memory
            // Note that this (bleg ManagedSession) is invalid 
            // to touch right now - the unmanaged memory has already been free'd
            if (this.originate_keepalive_handle.IsAllocated) {
                this.originate_keepalive_handle.Free(); // GC can now collect this bleg
            }
            if (this.originate_table != null) {
                this.originate_table.Dispose();
                this.originate_table = null;
            }
            return switch_status_t.SWITCH_STATUS_SUCCESS;
        }