]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add session.hangupCause()
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 17 Sep 2009 23:30:17 +0000 (23:30 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 17 Sep 2009 23:30:17 +0000 (23:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14913 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_cpp.cpp

index c83d2ece8b50019a501980bc9acd5b25d595a84f..2e0613afb31fe48ea1d9e28d792a25edbbf09b3c 100644 (file)
@@ -487,6 +487,7 @@ SWITCH_DECLARE_CONSTRUCTOR CoreSession::CoreSession(char *nuuid, CoreSession *a_
                channel = switch_core_session_get_channel(session);
                allocated = 1;
     } else {
+               cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
                if (switch_ivr_originate(a_leg ? a_leg->session : NULL, &session, &cause, nuuid, 60, NULL, NULL, NULL, NULL, NULL, SOF_NONE) 
                        == SWITCH_STATUS_SUCCESS) {
                        channel = switch_core_session_get_channel(session);
@@ -933,6 +934,7 @@ SWITCH_DECLARE(void) CoreSession::destroy(void)
 
 SWITCH_DECLARE(const char *) CoreSession::hangupCause()
 {
+       this_check(NULL);
        return switch_channel_cause2str(cause);
 }