]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm_outbound_npi is actually useful.
authorBrian West <brian@freeswitch.org>
Mon, 17 Sep 2012 15:14:27 +0000 (10:14 -0500)
committerBrian West <brian@freeswitch.org>
Mon, 17 Sep 2012 15:14:32 +0000 (10:14 -0500)
libs/freetdm/mod_freetdm/mod_freetdm.c

index 7a8e10593e677d452c4946650a608047b7ad0ed5..a0b54b88340b506ada7481857f443562f3dc1971 100755 (executable)
@@ -1629,6 +1629,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                caller_data.dnis.type = outbound_profile->destination_number_ton;
        }
 
+       if ((var = channel_get_variable(session, var_event, "freetdm_outbound_npi"))) {
+               ftdm_set_npi(var, &caller_data.dnis.plan);
+       } else {
+               caller_data.dnis.plan = outbound_profile->destination_number_numplan;
+       }
+
        if ((var = channel_get_variable(session, var_event, "freetdm_calling_party_category"))) {
                ftdm_set_calling_party_category(var, (uint8_t *)&caller_data.cpc);
        }