minor adj

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5851 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-10-12 17:12:31 +00:00
parent 96628675b5
commit 0a980a4ff9
6 changed files with 143 additions and 135 deletions
+2
View File
@@ -1924,6 +1924,8 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
from_host = sip->sip_from->a_url->url_host;
channel_name = url_set_chanvars(session, sip->sip_from->a_url, sip_from);
switch_channel_set_variable(channel, "sip_mailbox", from_user);
if (!switch_strlen_zero(from_user)) {
if (*from_user == '+') {
switch_channel_set_variable(channel, "sip_from_user_stripped", (const char *) (from_user + 1));
+7 -1
View File
@@ -747,6 +747,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
const char *passwd = NULL;
const char *a1_hash = NULL;
char *sql;
char *mailbox = NULL;
switch_xml_t domain, xml = NULL, user, param, xparams;
char hexdigest[2 * SU_MD5_DIGEST_SIZE + 1] = "";
char *pbuf = NULL;
@@ -829,7 +830,11 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
ret = AUTH_FORBIDDEN;
goto end;
}
if (!(mailbox = (char *)switch_xml_attr(user, "mailbox"))) {
mailbox = username;
}
for (param = switch_xml_child(xparams, "param"); param; param = param->next) {
const char *var = switch_xml_attr_soft(param, "name");
const char *val = switch_xml_attr_soft(param, "value");
@@ -899,6 +904,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
if (first && ret == AUTH_OK) {
if (v_event && (xparams = switch_xml_child(user, "variables"))) {
if (switch_event_create(v_event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "sip_mailbox", "%s", mailbox);
for (param = switch_xml_child(xparams, "variable"); param; param = param->next) {
const char *var = switch_xml_attr_soft(param, "name");
const char *val = switch_xml_attr_soft(param, "value");