diff options
author | Mark Spencer <markster@digium.com> | 2005-02-14 19:46:45 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-02-14 19:46:45 +0000 |
commit | 90267ab0ead82aa339099e31bca947769eeb7250 (patch) | |
tree | 39f79014c5bbe27dc00da844c0959ad0bc056bc6 | |
parent | 7f5f1139680b919e4919e7e822cbc7eea443da14 (diff) |
Merge OSP udpates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | channels/chan_sip.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9f249a033..cfd96076c 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -164,7 +164,7 @@ static int rpeerobjs = 0; static int apeerobjs = 0; static int regobjs = 0; -static int global_allowguest = 0; /* allow unauthenticated users/peers to connect? */ +static int global_allowguest = 1; /* allow unauthenticated users/peers to connect? */ #define DEFAULT_MWITIME 10 static int global_mwitime = DEFAULT_MWITIME; /* Time between MWI checks for peers */ @@ -5000,6 +5000,7 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, char *randdata if (ast_strlen_zero(secret) && ast_strlen_zero(md5secret) #ifdef OSP_SUPPORT && ast_test_flag(p, SIP_OSPAUTH) + && global_allowguest != 2 #endif ) return 0; @@ -8978,6 +8979,16 @@ static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask ast_set_flag(flags, SIP_PROG_INBAND_NO); else if (ast_true(v->value)) ast_set_flag(flags, SIP_PROG_INBAND_YES); + } else if (!strcasecmp(v->name, "allowguest")) { +#ifdef OSP_SUPPORT + if(!strcasecmp(v->value, "osp")) + global_allowguest = 2; + else +#endif + if (ast_true(v->value)) + global_allowguest = 1; + else + global_allowguest = 0; #ifdef OSP_SUPPORT } else if (!strcasecmp(v->name, "ospauth")) { ast_set_flag(mask, SIP_OSPAUTH); |