(RADIATOR) multiple reply of the same attribute - SIP-AVP

Hugh Irvine hugh at open.com.au
Tue Dec 26 16:56:19 CST 2006


Hello Rosario -

Probably the simplest thing to do is have a stored procedure in your  
database return a record like this:

	SIP-AVP = ....., SIP-AVP = ......, SIP-AVP = ......

where "....." is each of the values for a particular user.

Then your configuration file would look like this:


<Handler Service-Type=SIP-Callee-AVPs>

         PreAuthHook file:"/etc/radiator/user_domain.pl"

         AuthByPolicy ContinueWhileIgnore

         <AuthBy SQL>
                 DBSource        dbi:mysql:ser:xxx.xxx.xxx.xxx
                 DBUsername      ser
                 DBAuth          ser

                 AuthSelect exec your_sp(....)

                 AuthColumnDef 0, GENERIC, reply
                 NoDefault
         </AuthBy>

         <AuthBy INTERNAL>
                 DefaultResult REJECT
         </AuthBy>

</Handler>


You will need to check your database documentation and the Perl DBD  
documentation for the exact calling syntax in the AuthSelect line.

Alternatively you could use a "PostAuthSelectHook" to accomplish the  
same thing.

See section 5.29.23 in the Radiator 3.16 reference manual ("doc/ 
ref.html").

hope that helps

regards

Hugh


On 27 Dec 2006, at 09:06, Rosario Pingaro wrote:

> We would like to use radiator to exctract from a db the AVPs for  
> our SIP customers.
>
> The problem is that for each username I have multiple AVPs, each  
> AVP is stored in a different records.
> So radiator should reply with a number of reply attributes SIP-AVP  
> equal to the records presnt into the db.
>
> But now I get only one attribute, the first it founds.
>
> this is my handler:
> <Handler Service-Type=SIP-Callee-AVPs>
>
>         PreAuthHook file:"/etc/radiator/user_domain.pl"
>
>         AuthByPolicy ContinueWhileIgnore
>
>         <AuthBy SQL>
>                 DBSource        dbi:mysql:ser:xxx.xxx.xxx.xxx
>                 DBUsername      ser
>                 DBAuth          ser
>                 AuthSelect select value from usr_preferences where  
> username='%{CheckGroup-User}' and domain='voiptest.\
> test.it'
>
>                 AuthColumnDef 0, SIP-AVP, reply
>                 NoDefault
>
>
>         </AuthBy>
>
>         <AuthBy INTERNAL>
>                 DefaultResult REJECT
>         </AuthBy>
>
> </Handle>
>
>
> How to improve my config to get what I need??
>
> Regards
>
> Rosario
>



NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/ 
radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.


--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list