aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-07 15:18:14 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-07 15:18:14 +0000
commit35829f979ae2fa02b2d9cac8155a0ddb604d79d3 (patch)
tree0a79bd849160e0bd42943cf5db29326119c2d67f /channels
parent0ddea6a5eb4666cb482f1b23dea01a41bba78860 (diff)
bug fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3745 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f64d71fd2..5659b0bce 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4546,6 +4546,7 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, char *randdata
char *respheader = "Proxy-Authenticate";
char *authtoken;
#ifdef OSP_SUPPORT
+ char tmp[80];
char *osptoken;
unsigned int osptimelimit;
#endif
@@ -4574,6 +4575,10 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, char *randdata
/* Validate token */
if (ast_osp_validate(NULL, osptoken, &p->osphandle, &osptimelimit, p->callerid, p->sa.sin_addr, p->exten) < 1)
return -1;
+
+ snprintf(tmp, sizeof(tmp), "%d", p->osphandle);
+ pbx_builtin_setvar_helper(p->owner, "OSPHANDLE", tmp);
+
/* If ospauth is 'exclusive' don't require further authentication */
if ((p->ospauth > 1) || (ast_strlen_zero(secret) && ast_strlen_zero(md5secret)))
return 0;