[Users] AVP usage.

Daniel-Constantin Mierla daniel at voice-system.ro
Mon May 15 23:24:16 CEST 2006



On 05/16/06 00:23, Ricardo Martinez wrote:
> Thanks Daniel,
> 	But, is more quick/efficient if i use integer avp's instead of
> string based avp's?
>   
yes, because finding the avp uses integer comparison instead of string 
comparison. How much faster?!?!, depends on the number of operations, if 
you have a lot, the improvement may be significant. ALso, memory usage 
is less.

Cheers,
Daniel

> 	Thanks!
> Ricardo.-
>
>   
>> -----Mensaje original-----
>> De: Daniel-Constantin Mierla [mailto:daniel at voice-system.ro]
>> Enviado el: Lunes, 15 de Mayo de 2006 17:14
>> Para: Ricardo Martinez
>> CC: 'users at openser.org'
>> Asunto: Re: [Users] AVP usage.
>>
>>
>> Hello,
>>
>> this may help you a bit. There are some examples of using 
>> integer-named 
>> avps.
>> http://openser.org/docs/openser-radius-1.0.x.html
>>
>> Cheers,
>> Daniel
>>
>>
>> On 05/15/06 23:27, Ricardo Martinez wrote:
>>     
>>> Hello.
>>> 	I have a question.  Is there a way to optimize the use of AVP's.
>>> Right now i'm using avp_radius to load client's attributes 
>>>       
>> from my database.
>>     
>>> These attributes are flags with value ON/OFF.  Inside my 
>>>       
>> configuration i'm
>>     
>>> using these values with avp names :  callee_attr1, 
>>>       
>> callee_attr2, etc.  I
>>     
>>> have read somewhere in the list that if i use numeric avp's 
>>>       
>> instead of
>>     
>>> string the processing is more quick.  Is this ok?. If the 
>>>       
>> answer is yes, how
>>     
>>> is the syntax for this?.
>>> For example i'm loading avp attributes like : 
>>>
>>> SIP-AVP="attr1:on"
>>> SIP-AVP="attr2:off"
>>>
>>> then i my configuration : 
>>>         if ( avp_check("callee_attr1", "eq/s:on/g") ) {
>>>                 xlog("L_INFO", "time [$Tf] : Something XXXX\n");
>>>                 route(8);       
>>>                 return;
>>>         };
>>>
>>> Can someone guide me on this point ?
>>> Thanks in advance,
>>>
>>> Regards,
>>>
>>> Ricardo Martinez.-
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>>   
>>>       
>
>   




More information about the sr-users mailing list