]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix buglet
authorBrian West <brian@freeswitch.org>
Fri, 25 Apr 2008 23:20:23 +0000 (23:20 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 25 Apr 2008 23:20:23 +0000 (23:20 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8200 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_cpp.h
src/switch_cpp.cpp

index 9536b45e9a265ef14f86774de66b0d312422839f..588cffc61c443ddaf35051f2ed7ba56a619a1b98 100644 (file)
@@ -148,7 +148,7 @@ class CoreSession {
 
        int answer();
        int preAnswer();
-       virtual void hangup(char *cause);
+       virtual void hangup(char *cause = "normal_clearing");
        void setVariable(char *var, char *val);
        const char *getVariable(char *var);
 
index 1ab5e21198090a41e8a2e7f30fe67204a6261489..39bdd6b481ce3d5013276170613dfdee813211e3 100644 (file)
@@ -185,12 +185,13 @@ CoreSession::CoreSession(char *nuuid)
        memset(&caller_profile, 0, sizeof(caller_profile));     
        init_vars();
        if (session = switch_core_session_locate(nuuid)) {
-               channel = switch_core_session_get_channel(session);
                uuid = strdup(nuuid);
+               channel = switch_core_session_get_channel(session);
                allocated = 1;
     } else {
                switch_call_cause_t cause;
                if (switch_ivr_originate(NULL, &session, &cause, nuuid, 60, NULL, NULL, NULL, NULL, SOF_NONE) == SWITCH_STATUS_SUCCESS) {
+                       channel = switch_core_session_get_channel(session);
                        allocated = 1;
                        switch_set_flag(this, S_HUP);
                        uuid = strdup(switch_core_session_get_uuid(session));
@@ -494,6 +495,7 @@ int CoreSession::originate(CoreSession *a_leg_session,
        }
 
     if (a_leg_session) a_leg_session->end_allow_threads();
+       channel = switch_core_session_get_channel(session);
        allocated = 1;
        switch_channel_set_state(switch_core_session_get_channel(session), CS_TRANSMIT);