[OpenSIPS-Devel] Patch for auth_aaa module

Авдиенко Михаил whitearchey at gmail.com
Mon Nov 9 11:46:43 CET 2009


Yes, it will be nice. I'm not sure if I can implement this but I will try

On Mon, 09 Nov 2009 18:46:48 +0800, Alex Massover <alex at jajah.com> wrote:

> Hi!
>
> Maybe it's better to enrich auth_aaa functions aaa_www_authorize(realm)  
> and aaa_proxy_authorize(realm [, uri_user]) to take optional sets from  
> aaa_radius?
> Like this:
> aaa_www_authorize(realm [,set]), aaa_proxy_authorize(realm [,  
> uri_user][, set])
>
> It will be more generic and anyone could pass whatever he needs.
>
> --
> Best Regards,
> Alex Massover
> VoIP R&D TL
> Jajah Inc.
>> -----Original Message-----
>> From: devel-bounces at lists.opensips.org [mailto:devel-
>> bounces at lists.opensips.org] On Behalf Of WhiteWind
>> Sent: Monday, November 09, 2009 2:15 AM
>> To: OpenSIPS devel mailling list
>> Subject: Re: [OpenSIPS-Devel] Patch for auth_aaa module
>>
>> Then I should append Digest attributes to request by myself using
>> modparam("aaa_radius","sets", ...)
>>
>> On Mon, 09 Nov 2009 02:48:54 +0800, Bogdan-Andrei Iancu
>> <bogdan at voice-system.ro> wrote:
>>
>> > Hi,
>> >
>> > Couldn't you obtain this functionality by using a custom set (see
>> >
>> http://www.opensips.org/html/docs/modules/devel/aaa_radius.html#id22723
>> 1)
>> > to push extra information that you need.
>> >
>> > If there is something different, please let me know.
>> >
>> > Regards,
>> > Bogdan
>> >
>> > WhiteWind wrote:
>> >> I needed proper auth of INVITE requests and I implemented it.
>> >> I wish to see this patch in the mainstream and I'm ready to correct
>> this
>> >> patch if it doesn't fit some standards or contains bugs
>> >>
>> >> Index: modules/auth_aaa/authaaa_mod.c
>> >> ===================================================================
>> >> --- modules/auth_aaa/authaaa_mod.c      (revision 6274)
>> >> +++ modules/auth_aaa/authaaa_mod.c      (working copy)
>> >> @@ -119,6 +119,8 @@
>> >>
>> >>          memset(attrs, 0, sizeof(attrs));
>> >>          memset(vals, 0, sizeof(vals));
>> >> +       attrs[A_CALLED_STATION_ID].name                 =
>> >> "Called-Station-Id";
>> >> +       attrs[A_CALLING_STATION_ID].name                =
>> >> "Calling-Station-Id";
>> >>          attrs[A_SERVICE_TYPE].name                      =
>> >> "Service-Type";
>> >>          attrs[A_SIP_URI_USER].name                      =
>> >> "Sip-URI-User";
>> >>          attrs[A_DIGEST_RESPONSE].name           = "Digest-
>> Response";
>> >> Index: modules/auth_aaa/sterman.c
>> >> ===================================================================
>> >> --- modules/auth_aaa/sterman.c  (revision 6274)
>> >> +++ modules/auth_aaa/sterman.c  (working copy)
>> >> @@ -231,6 +231,21 @@
>> >>                  goto err;
>> >>          }
>> >>
>> >> +       if (method.len == 6 && !strncmp(method.s, "INVITE", 6)) {
>> >> +            struct sip_uri *uri = parse_to_uri(_msg);
>> >> +            if (uri && uri->user.s)
>> >> +                if (proto.avp_add(conn, send,
>> >> &attrs[A_CALLED_STATION_ID], uri->user.s,
>> >> +                                  uri->user.len, 0)) {
>> >> +                        LM_ERR("unable to add Called-Station-Id
>> >> attribute\n");
>> >> +                        goto err;
>> >> +                }
>> >> +
>> >> +            if (proto.avp_add(conn, send,
>> &attrs[A_CALLING_STATION_ID],
>> >> user.s,user.len,0)) {
>> >> +                    LM_ERR("unable to add Calling-Station-Id
>> >> attribute\n");
>> >> +                    goto err;
>> >> +            }
>> >> +        }
>> >> +
>> >>          /* Add CALL-ID in Acct-Session-Id Attribute */
>> >>          if ( _msg->callid==NULL &&
>> >>                  (parse_headers(_msg, HDR_CALLID_F, 0)==-1 ||
>> >> _msg->callid==NULL)  ) {
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > Devel mailing list
>> > Devel at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>>
>> --
>> Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>> This mail was received via Mail-SeCure System.
>
> This mail was sent via Mail-SeCure System.
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel




More information about the Devel mailing list