[Kamailio-Devel] AVPs

Iñaki Baz Castillo ibc at aliax.net
Fri Dec 12 00:26:23 CET 2008


El Jueves, 11 de Diciembre de 2008, Daniel-Constantin Mierla escribió:
> - avp can have two types of names
>     - integer id, referred as $avp(i:number)
>     - string id, referred as $avp(s:string)
> - there can be aliases for avp names, defined as "alias=[is]:id", so the
> script writer can use $avp(alias)

About it, I think it's too complex. Using integer id is faster than using 
string id, and the alias is a perfect mix of both.
I suggest the following:

- Just one type of AVP id as a string:
  $avp(name1) ...  $avp(name2)

- During the script parsing/compilation, each AVP name is converted to an 
integer, so the above AVP's would become:
  $avp(1) ... $avp(2)

- In this way, there is no need of alias id or integer id, the script would be 
as fast as now when using integer id and as readable as now using string id, 
making all of it simpler.


> - not related to avp core part, but important to mention here -- tm,
> controlled by a parameter, can make the avps from transaction (request)
> available to onreply_route.

Which is exactly the advantage of *non* enabling that parameter? performance? 
low resources? since the AVP already exists in the transaction memory I can't 
imagine the benefict of making it not available during the transaction 
replies process.

Best regards.

-- 
Iñaki Baz Castillo



More information about the Devel mailing list