add register-proxy option to gateways so you can send outbound reg to your local proxy dest for the outside

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5713 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-09-19 15:28:16 +00:00
parent 40c29a107c
commit 1f3eabd15c
5 changed files with 24 additions and 8 deletions
+4 -1
View File
@@ -73,6 +73,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
case REG_STATE_UNREGISTER:
nua_unregister(gateway_ptr->nh,
NUTAG_URL(gateway_ptr->register_url),
SIPTAG_FROM_STR(gateway_ptr->register_from),
SIPTAG_CONTACT_STR(gateway_ptr->register_contact),
SIPTAG_EXPIRES_STR(gateway_ptr->expires_str),
@@ -97,6 +98,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
if (now) {
nua_register(gateway_ptr->nh,
NUTAG_URL(gateway_ptr->register_url),
SIPTAG_FROM_STR(gateway_ptr->register_from),
SIPTAG_CONTACT_STR(gateway_ptr->register_contact),
SIPTAG_EXPIRES_STR(gateway_ptr->expires_str),
@@ -105,6 +107,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
gateway_ptr->retry = now + gateway_ptr->retry_seconds;
} else {
nua_unregister(gateway_ptr->nh,
NUTAG_URL(gateway_ptr->register_url),
SIPTAG_FROM_STR(gateway_ptr->register_from),
SIPTAG_CONTACT_STR(gateway_ptr->register_contact),
SIPTAG_EXPIRES_STR(gateway_ptr->expires_str),
@@ -700,7 +703,7 @@ void sofia_reg_handle_sip_r_challenge(int status,
goto cancel;
}
}
snprintf(authentication, sizeof(authentication), "%s:%s:%s:%s", scheme, realm, gateway->register_username, gateway->register_password);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Authenticating '%s' with '%s'.\n", profile->username, authentication);