[OpenSIPS-Users] Problem with aaa_proxy_authorize

Tiberiu Breana tiberiu.breana at gmail.com
Tue Jun 28 17:10:26 CEST 2011


Hello.
I'm having some trouble with aaa_proxy_authorize. It doesn't send the
username properly. From my freeRADIUS log:

rad_recv: Access-Request packet from host 127.0.0.1 port 60717, id=100,
length=313
    User-Name = "@141.85.xxx.xxx"
    [...]
    Sip-URI-User = "root"
    [...]

Notice that the username and domain are separated. I tried with
aaa_www_authorize, but the behaviour is the same. What's the deal?
Here's my config:

if (!(method=="REGISTER") && !is_method("PUBLISH|SUBSCRIBE")) /*no
multidomain version*/
    {
        if(from_uri==myself) {                 #if from local domain,
process request on local AAA server
            if (!aaa_www_authorize(""))
            {  www_challenge("", "1");
                exit;
            }
            if (!db_check_from())
            {   sl_send_reply("403","Forbidden auth ID");
                exit;
            }
            consume_credentials();
            # caller authenticated
        }

        else  {                                          #if from foreign
domain, proxy request to foreign AAA server
            if (!aaa_proxy_authorize(""))   #eventually give another
parameter as SIP-Uri-User
            {   proxy_challenge("", "1");
                exit;
            }
            if (!db_check_from())
            {   sl_send_reply("403","Forbidden auth ID");
                exit;
            }
            consume_credentials();
            # caller authenticated
        }

    }

Also, is there any way to change the "User-Name" that's being sent? I
noticed that $fu isn't modifiable.
I'd like to send my domain name in the request (User-Name = "me at mydomain"),
but it seems the only way I can do this is send it through the "From display
name" $fd. How can I manage to place this in the User-Name?

Advice is welcome, thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110628/8118f0e8/attachment-0001.htm>


More information about the Users mailing list