From cb495d05e169cd35d53f1c33dfb573b02b6f3290 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Tue, 6 Apr 2010 13:39:03 -0400 Subject: [PATCH] Fix for TON and NPI not passed through to channel variables on incoming calls --- libs/freetdm/mod_freetdm/mod_freetdm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c index 3268e55926..4b4c11926d 100644 --- a/libs/freetdm/mod_freetdm/mod_freetdm.c +++ b/libs/freetdm/mod_freetdm/mod_freetdm.c @@ -1382,6 +1382,15 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session switch_set_flag(tech_pvt->caller_profile, SWITCH_CPF_SCREEN); } + tech_pvt->caller_profile->caller_ton = sigmsg->channel->caller_data.cid_num.type; + tech_pvt->caller_profile->caller_numplan = sigmsg->channel->caller_data.cid_num.plan; + tech_pvt->caller_profile->ani_ton = sigmsg->channel->caller_data.ani.type; + tech_pvt->caller_profile->ani_numplan = sigmsg->channel->caller_data.ani.plan; + tech_pvt->caller_profile->destination_number_ton = sigmsg->channel->caller_data.dnis.type; + tech_pvt->caller_profile->destination_number_numplan = sigmsg->channel->caller_data.dnis.plan; + tech_pvt->caller_profile->rdnis_ton = sigmsg->channel->caller_data.rdnis.type; + tech_pvt->caller_profile->rdnis_numplan = sigmsg->channel->caller_data.rdnis.plan; + if (sigmsg->channel->caller_data.pres) { switch_set_flag(tech_pvt->caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER); }