MODSOFIA-17
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14251 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
28f51bdd61
commit
6136965cd5
|
@ -4856,13 +4856,16 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
if (strchr(url, '>')) {
|
const char *brackets = NULL;
|
||||||
tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;transport=%s", url,
|
const char *proto = NULL;
|
||||||
sofia_glue_transport2str(transport));
|
|
||||||
} else {
|
brackets = strchr(url, '>');
|
||||||
tech_pvt->reply_contact = switch_core_session_sprintf(session, "<%s;transport=%s>", url,
|
proto = switch_stristr("transport=", url);
|
||||||
sofia_glue_transport2str(transport));
|
tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s%s%s%s%s",
|
||||||
}
|
brackets ? "" : "<", url,
|
||||||
|
proto ? "" : ";transport=",
|
||||||
|
proto ? "" : sofia_glue_transport2str(transport),
|
||||||
|
brackets ? "" : ">");
|
||||||
} else {
|
} else {
|
||||||
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||||
}
|
}
|
||||||
|
@ -4876,13 +4879,16 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
if (strchr(url, '>')) {
|
const char *brackets = NULL;
|
||||||
tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;transport=%s", url,
|
const char *proto = NULL;
|
||||||
sofia_glue_transport2str(transport));
|
|
||||||
} else {
|
brackets = strchr(url, '>');
|
||||||
tech_pvt->reply_contact = switch_core_session_sprintf(session, "<%s;transport=%s>", url,
|
proto = switch_stristr("transport=", url);
|
||||||
sofia_glue_transport2str(transport));
|
tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s%s%s%s%s",
|
||||||
}
|
brackets ? "" : "<", url,
|
||||||
|
proto ? "" : ";transport=",
|
||||||
|
proto ? "" : sofia_glue_transport2str(transport),
|
||||||
|
brackets ? "" : ">");
|
||||||
} else {
|
} else {
|
||||||
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue