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