forked from Mirrors/freeswitch
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:
parent
7088c57a25
commit
99c68e8799
@ -71,6 +71,9 @@
|
||||
<!-- this lets anything register -->
|
||||
<!-- 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"/>
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user