[SR-Users] Authorization selects

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 16 22:57:49 CET 2015


Hello,

you have to replace the string with realm value of the auth header you
want to access its attributes.

Like:

@authorization["mydomain.com"].username

With www-digest auth, there can be many auth headers, each with
different realm. In sip is very likely to be only one.

Cheers,
Daniel

On 16/11/15 15:26, Alexandru Covalschi wrote:
> UPD: proxy_auth doesn't work either, however I'm sure I have WWW-Auth,
> not Proxy-Auth :)
>
> 2015-11-16 16:23 GMT+02:00 Alexandru Covalschi <568691 at gmail.com
> <mailto:568691 at gmail.com>>:
>
>     Hello everyone!
>
>     I need to extract values from authentication header, but
>     408. @authorization["string"]
>     409. @authorization["string"].username
>     410. @authorization["string"].username.user
>     411. @authorization["string"].username.domain
>     412. @authorization["string"].realm
>     413. @authorization["string"].nonce
>     414. @authorization["string"].uri
>     415. @authorization["string"].cnonce
>     416. @authorization["string"].nc
>     417. @authorization["string"].response
>     418. @authorization["string"].opaque
>     419. @authorization["string"].algorithm
>     420. @authorization["string"].qop
>
>     these values doesn't seem to work for me.
>     Used
>     https://github.com/kamailio/kamailio/blob/master/doc/select_list/select_core.txt
>     doc.
>
>                     $var(z) = @authorization["string"].realm;
>                     xlog("Realm $var(z)");
>     Using that simple check I get nothing in $var(z)
>
>     version: kamailio 4.3.3 (x86_64/linux)
>     flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
>     USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
>     SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX,
>     FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
>     USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
>     ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN
>     16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>     poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>     id: unknown
>     compiled with gcc 4.9.2
>
>     Can anyone check that please? Or maybe syntax is wrong and I need
>     newer selects doc?
>     -- 
>     Alexandru Covalschi
>     ABRISS-Solutions
>     VoIP engineer and system administrator
>     phone: +37367398493 <tel:%2B37367398493>
>     web: http://abs-telecom.com/
>
>
>
>
> -- 
> Alexandru Covalschi
> ABRISS-Solutions
> VoIP engineer and system administrator
> phone: +37367398493
> web: http://abs-telecom.com/
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151116/da225ca3/attachment.html>


More information about the sr-users mailing list