[mod_sofia] Include isup-oli parameter on outbound invite when we have value in caller profile

This commit is contained in:
Ken 2020-04-28 16:23:07 -05:00 committed by Andrey Volk
parent 885c05f01b
commit 53807da088

View File

@ -1203,9 +1203,14 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
sipip = invite_domain;
}
format = strchr(sipip, ':') ? "\"%s\" <sip:%s%s[%s]>" : "\"%s\" <sip:%s%s%s>";
tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, format, cid_name, use_cid_num, !zstr(cid_num) ? "@" : "", sipip);
if (zstr(tech_pvt->caller_profile->aniii)){
format = strchr(sipip, ':') ? "\"%s\" <sip:%s%s[%s]>" : "\"%s\" <sip:%s%s%s>";
tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, format, cid_name, use_cid_num, !zstr(cid_num) ? "@" : "", sipip);
} else {
format = strchr(sipip, ':') ? "\"%s\" <sip:%s%s[%s];isup-oli=%s>" : "\"%s\" <sip:%s%s%s;isup-oli=%s>";
tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, format, cid_name, use_cid_num, !zstr(cid_num) ? "@" : "",
sipip, tech_pvt->caller_profile->aniii);
}
}
if (from_var) {