SCA tweaks

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16271 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West committed 2010-01-13 01:40:11 +00:00
1 parent ec892d4ad6
commit b24c018c45
12 files changed
+139 -69

No files matched your search

+10 -8
View File
@@ -768,14 +768,23 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
authorization = sip->sip_authorization;
contact = sip->sip_contact;
to = sip->sip_to;
from = sip->sip_from;
if (from) {
from_user = from->a_url->url_user;
from_host = from->a_url->url_host;
}
if (to) {
to_user = to->a_url->url_user;
to_host = to->a_url->url_host;
}
if (!to_user) to_user = from_user;
if (!to_host) to_host = from_host;
if (!to_user || !to_host) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can not do authorization without a complete from header\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can not do authorization without a complete header\n");
nua_respond(nh, SIP_401_UNAUTHORIZED, NUTAG_WITH_THIS(nua), TAG_END());
switch_goto_int(r, 1, end);
}
@@ -784,13 +793,6 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
reg_host = to_host;
}
from = sip->sip_from;
if (from) {
from_user = from->a_url->url_user;
from_host = from->a_url->url_host;
}
if (contact->m_url) {
const char *port = contact->m_url->url_port;
char new_port[25] = "";