Ricardo,
Yes, you're right. I didn't realize that this was a avp_load_radius avp, so
I didn't think about mentioning it. Write the section you feel is necessary
for the README and post it to serdev. All the developers are delighted to
get documentation help :-)
g-)
Ricardo Martinez wrote:
Yes.
I noticed that the variable used by the avp_load_radius("caller") to
store the answer from the RADIUS server is in fact the one i defined
first (var1), but is has a prefix called "caller_" , so the
variable is finally : "caller_var1". Jackpot!.
So i used this in my ser.cfg:
if( !avp_load_radius("caller")) {
xlog("L_INFO", "time [%Tf] FAIL AVP_LOAD_RADIUS!\n");
};
if( !avp_pushto("$ruri", "s:caller_var1/g")) {
xlog("L_INFO", "time [%Tf] FAIL avp_pushto()!\n");
};
Thanks Greg for your help.
Just one more thing. This could be indicated in the module's README,
i think is an important thing that a user should know.
Regards!!.
Ricardo Martinez.-
> -----Mensaje original-----
> De: Greger V. Teigre [mailto:greger@teigre.com]
> Enviado el: Viernes, 27 de Mayo de 2005 3:57
> Para: Ricardo Martinez; serusers(a)lists.iptel.org
> Asunto: Re: [Serusers] avp_radius and avpops
>
>
> Do the debugging dance, so that you can verify what the calls
> to avp_* do...
> g-)
>
> Ricardo Martinez wrote:
>> Hello Greg
>> Thanks for your answer.
>> I made the change but it seems not to do anything....
>> Can someone help me here?
>>
>> Thanks in advance
>>
>> Regards
>> Ricardo.-
>>
>>> -----Mensaje original-----
>>> De: Greger V. Teigre [mailto:greger@teigre.com]
>>> Enviado el: MiƩrcoles, 25 de Mayo de 2005 16:24
>>> Para: Ricardo Martinez; serusers(a)lists.iptel.org
>>> Asunto: Re: [Serusers] avp_radius and avpops
>>>
>>>
>>>> if( !avp_pushto("$RURI", "s:var1/g"))
{
>>> replace with:
>>> "s:$var1/g"
>>> I don't know about the case sensivtivity of destination, I
>>> always use lower
>>> case...
>>> g-)
>>>
>>> Ricardo Martinez wrote:
>>>> Hello List.
>>>> I have a question regarding the use of avp_radius and avpops. I'm
>>>> using avp_radius to obtain an AVP value from my database
> via radius.
>>>> What i what to do is replace this value for the RURI.
>>>> Here i have a couple of questions.
>>>> 1.- The value returned by the avp_radius (the SIP-AVP) where is
>>>> stored ? It suppose that the SIP-AVP returned by radius
>>> has the form
>>>> of "name:value". That "name" refers to the name of
what?.
>>>> For example i'm returning :
>>> "var1:sip:1234567@mydomain.com". What i
>>>> see in the debug is :
>>>>
>>>> avp_load_user: AVP 'var1'='sip:1234567@mydomain.com' has
> been added
>>>>
>>>> This is what i got in my ser.cfg (a snippet).
>>>>
>>>> if (method=="INVITE" || method=="CANCEL") {
>>>> if( !avp_load_radius("caller")) {
>>>> log (1, "AVP_RADIUS: Fail on
> avp_radius\n");
>>>> };
>>>
>>>>
>>>> if( !avp_pushto("$RURI", "s:var1/g"))
{
>>>> log (1, "AVPOPS: Fail on AVPOPS\n");
>>>> };
>>>> };
>>>>
>>>> Again the debug = 9 .
>>>>
>>>> 6(23815) avp_load_user: AVP
>>> 'var1'='sip:1234567@mydomain.com' has been
>>>> added
>>>> 6(23815) qm_free(0x8123400, 0x8166ccc), called from avp_radius.c:
>>>> load_avp_user(344)
>>>> 6(23815) qm_free: freeing frag. 0x8166cb4 alloc'ed from
>>>> avp_radius.c: load_avp_user(330)
>>>> 6(23815) DEBUG:avpops:pushto_avp: no avp found
>>>> 6(23815) AVPOPS: Fail on AVPOPS
>>>>
>>>> What i'm doing wrong?
>>>> Thanks!
>>>>
>>>> Regards
>>>> Ricardo Martinez
>>>>
>>>> _______________________________________________
>>>> Serusers mailing list
>>>> serusers(a)lists.iptel.org
>>>>
http://lists.iptel.org/mailman/listinfo/serusers