From c6025e41c6a1c0b78b13a2f12b624fc864e4e973 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Tue, 7 Sep 2004 15:18:14 +0000 Subject: [PATCH] bug fixes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3745 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f64d71fd2d..5659b0bceb 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; -- 2.47.2