add accept-blind-auth

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7780 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-03-04 01:23:55 +00:00
parent 7088c57a25
commit 99c68e8799
3 changed files with 10 additions and 2 deletions

View File

@ -72,6 +72,9 @@
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
<!-- <param name="accept-blind-reg" value="true"/> -->
<!-- accept any authentication without actually checking (not a good feature for most people) -->
<!-- <param name="accept-blind-auth" value="true"/> -->
<!--TTL for nonce in sip auth-->
<param name="nonce-ttl" value="60"/>
<!--Uncomment if you want to force the outbound leg of a bridge to only offer the codec

View File

@ -129,7 +129,8 @@ typedef enum {
PFLAG_SUPRESS_CNG = (1 << 12),
PFLAG_TLS = (1 << 13),
PFLAG_CHECKUSER = (1 << 14),
PFLAG_SECURE = (1 << 15)
PFLAG_SECURE = (1 << 15),
PFLAG_BLIND_AUTH = (1 << 16)
} PFLAGS;
typedef enum {

View File

@ -1099,6 +1099,10 @@ switch_status_t config_sofia(int reload, char *profile_name)
if (switch_true(val)) {
profile->pflags |= PFLAG_BLIND_REG;
}
} else if (!strcasecmp(var, "accept-blind-auth")) {
if (switch_true(val)) {
profile->pflags |= PFLAG_BLIND_AUTH;
}
} else if (!strcasecmp(var, "auth-all-packets")) {
if (switch_true(val)) {
profile->pflags |= PFLAG_AUTH_ALL;
@ -2374,7 +2378,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) my_addrinfo->ai_addr)->sin_addr);
if ((profile->pflags & PFLAG_AUTH_CALLS) || sip->sip_proxy_authorization || sip->sip_authorization) {
if ((profile->pflags & PFLAG_AUTH_CALLS) || (!(profile->pflags & PFLAG_BLIND_AUTH) && (sip->sip_proxy_authorization || sip->sip_authorization))) {
if (strcmp(network_ip, profile->sipip)) {
if (sofia_reg_handle_register(nua, profile, nh, sip, REG_INVITE, key, sizeof(key), &v_event)) {
if (v_event) {