If sip_invite_domain is used lets use it for rpid_domain no matter what because I know best if I set it
This commit is contained in:
parent
0d0b4b4383
commit
8726104aa3
|
@ -1658,7 +1658,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||
sofia_private_t *sofia_private;
|
||||
char *invite_contact = NULL, *to_str, *use_from_str, *from_str;
|
||||
const char *t_var;
|
||||
char *rpid_domain = "cluecon.com", *p;
|
||||
char *rpid_domain = NULL, *p;
|
||||
const char *priv = "off";
|
||||
const char *screen = "no";
|
||||
const char *invite_params = switch_channel_get_variable(tech_pvt->channel, "sip_invite_params");
|
||||
|
@ -1670,6 +1670,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||
const char *from_var = switch_channel_get_variable(tech_pvt->channel, "sip_from_uri");
|
||||
const char *from_display = switch_channel_get_variable(tech_pvt->channel, "sip_from_display");
|
||||
const char *invite_req_uri = switch_channel_get_variable(tech_pvt->channel, "sip_invite_req_uri");
|
||||
const char *invite_domain = switch_channel_get_variable(tech_pvt->channel, "sip_invite_domain");
|
||||
const char *use_name, *use_number;
|
||||
|
||||
if (zstr(tech_pvt->dest)) {
|
||||
|
@ -1688,7 +1689,6 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||
if (!tech_pvt->from_str) {
|
||||
const char *sipip;
|
||||
const char *format;
|
||||
const char *alt = NULL;
|
||||
|
||||
sipip = tech_pvt->profile->sipip;
|
||||
|
||||
|
@ -1698,8 +1698,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||
|
||||
format = strchr(sipip, ':') ? "\"%s\" <sip:%s%s[%s]>" : "\"%s\" <sip:%s%s%s>";
|
||||
|
||||
if ((alt = switch_channel_get_variable(channel, "sip_invite_domain"))) {
|
||||
sipip = alt;
|
||||
if (!zstr(invite_domain)) {
|
||||
sipip = invite_domain;
|
||||
}
|
||||
|
||||
tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, format, cid_name, cid_num, !zstr(cid_num) ? "@" : "", sipip);
|
||||
|
@ -1739,6 +1739,10 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||
}
|
||||
}
|
||||
|
||||
if (!zstr(invite_domain)) {
|
||||
rpid_domain = (char *)invite_domain;
|
||||
}
|
||||
|
||||
if (zstr(rpid_domain)) {
|
||||
rpid_domain = "cluecon.com";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue