From 977b546f9a420a7cc4699cabb12223744ffc93b4 Mon Sep 17 00:00:00 2001 From: James Zhang Date: Thu, 26 Jan 2012 18:52:27 -0500 Subject: [PATCH] FreeTDM: reuse sip_h_X-FreeTDM-LOC = NULL to indicate disable LOC --- libs/freetdm/mod_freetdm/mod_freetdm.c | 3 --- .../ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c | 9 ++------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c index cdcb8ca1e0..9d15ad8eec 100755 --- a/libs/freetdm/mod_freetdm/mod_freetdm.c +++ b/libs/freetdm/mod_freetdm/mod_freetdm.c @@ -1527,9 +1527,6 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi ftdm_usrmsg_add_var(&usrmsg, "iam_fwd_ind_isdn_access_ind", var); } - if ((var = channel_get_variable(session, var_event, "freetdm_iam_loc_pres"))) { - ftdm_usrmsg_add_var(&usrmsg, "iam_loc_pres", var); - } if ((var = channel_get_variable(session, var_event, "freetdm_bearer_capability"))) { caller_data.bearer_capability = (uint8_t)atoi(var); } diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c index c25597cd40..fde1278b15 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c @@ -248,15 +248,10 @@ ftdm_status_t copy_locPtyNum_to_sngss7(ftdm_channel_t *ftdmchan, SiCgPtyNum *loc sngss7_chan_data_t *sngss7_info = ftdmchan->call_data; ftdm_caller_data_t *caller_data = &ftdmchan->caller_data; - - val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "iam_loc_pres"); - if (!ftdm_strlen_zero(val)) { - if (!strcasecmp(val, "false")) { - pres_val = NOTPRSNT; - } + if (!strcasecmp(caller_data->loc.digits, "NULL")) { + pres_val = NOTPRSNT; } - locPtyNum->eh.pres = pres_val; locPtyNum->natAddrInd.pres = pres_val; locPtyNum->natAddrInd.val = g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].loc_nadi;