]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add type of num var for pri
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 12 Jan 2009 18:05:22 +0000 (18:05 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 12 Jan 2009 18:05:22 +0000 (18:05 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@624 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/mod_openzap/mod_openzap.c

index ce0d5042d707f1aa931fc688d70cb30105776d27..5639cf8b82ee3c955cedbb59226b644ae3e9a36f 100644 (file)
@@ -901,8 +901,6 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
        char *argv[3];
        int argc = 0;
        const char *var;
-       switch_channel_t *channel = NULL;
-
 
 
        if (!outbound_profile) {
@@ -971,18 +969,17 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                zap_set_string(caller_data.ani.digits, dest);
        }
        
-       channel = switch_core_session_get_channel(*new_session);
-
-       if ((var = switch_event_get_header(var_event, "openzap_outbound_ton")) || (var = switch_channel_get_variable(channel, "openzap_outbound_ton"))) {
+       if ((var = switch_event_get_header(var_event, "openzap_outbound_ton")) || (var = switch_core_get_variable("openzap_outbound_ton"))) {
                if (!strcasecmp(var, "national")) {
                        caller_data.ani.type = Q931_TON_NATIONAL;
                }
        } else {
                caller_data.ani.type = outbound_profile->destination_number_ton;
        }
-
+       
        caller_data.ani.plan = outbound_profile->destination_number_numplan;
 
+
 #if 0
        if (!switch_strlen_zero(outbound_profile->rdnis)) {
                zap_set_string(caller_data.rdnis.digits, outbound_profile->rdnis);
@@ -1016,7 +1013,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
        if ((*new_session = switch_core_session_request(openzap_endpoint_interface, pool)) != 0) {
                private_t *tech_pvt;
                switch_caller_profile_t *caller_profile;
-
+               switch_channel_t *channel = switch_core_session_get_channel(*new_session);
+               
                switch_core_session_add_stream(*new_session, NULL);
                if ((tech_pvt = (private_t *) switch_core_session_alloc(*new_session, sizeof(private_t))) != 0) {
                        tech_init(tech_pvt, *new_session, zchan);