Some changes to ss7 variables to be more consistent

This commit is contained in:
David Yat Sin 2012-05-30 13:10:04 -04:00
parent 91dfa062bf
commit e05bd3fae8
2 changed files with 11 additions and 7 deletions

View File

@ -1554,6 +1554,10 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
if (sipvar) {
ftdm_usrmsg_add_var(&usrmsg, "ss7_ocn_pres", sipvar);
}
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-IAM-FWD-IND-HEX");
if (sipvar) {
ftdm_usrmsg_add_var(&usrmsg, "ss7_iam_fwd_ind_hex", sipvar);
}
}
if (switch_test_flag(outbound_profile, SWITCH_CPF_SCREEN)) {
@ -1594,11 +1598,6 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
ftdm_set_calling_party_category(var, (uint8_t *)&caller_data.cpc);
}
if ((var = channel_get_variable(session, var_event, "iam_fwd_ind_HEX"))) {
ftdm_usrmsg_add_var(&usrmsg, "iam_fwd_ind_HEX", var);
}
if (!zstr(dest)) {
ftdm_set_string(caller_data.dnis.digits, dest);
}

View File

@ -993,7 +993,7 @@ ftdm_status_t copy_fwdCallInd_to_sngss7(ftdm_channel_t *ftdmchan, SiFwdCallInd *
fwdCallInd->sccpMethInd.pres = PRSNT_NODEF;
fwdCallInd->sccpMethInd.val = SCCPMTH_NOIND;
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "iam_fwd_ind_HEX");
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_iam_fwd_ind_hex");
if (!ftdm_strlen_zero(val)) {
uint16_t val_hex = 0;
if (four_char_to_hex (val, &val_hex) == FTDM_FAIL) {
@ -1028,7 +1028,12 @@ ftdm_status_t copy_fwdCallInd_to_sngss7(ftdm_channel_t *ftdmchan, SiFwdCallInd *
fwdCallInd->isdnUsrPrtInd.val = ISUP_USED;
fwdCallInd->isdnUsrPrtPrfInd.val = PREF_PREFAW;
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_iam_fwd_ind_isdn_access_ind");
if (ftdm_strlen_zero(val)) {
/* Kept for backward compatibility */
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "iam_fwd_ind_isdn_access_ind");
}
if (!ftdm_strlen_zero(val)) {
acc_val = (int)atoi(val);
}