From 53807da088d10c474c75663f4a86c450fe0c2e44 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 28 Apr 2020 16:23:07 -0500 Subject: [PATCH] [mod_sofia] Include isup-oli parameter on outbound invite when we have value in caller profile --- src/mod/endpoints/mod_sofia/sofia_glue.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index c00c439600..074e233aee 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -1202,10 +1202,15 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) if (!zstr(invite_domain)) { sipip = invite_domain; } - - format = strchr(sipip, ':') ? "\"%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\" " : "\"%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\" " : "\"%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) {