[Kamailio-Devel] SF.net SVN: openser:[5130] trunk/mod_fix.h

Henning Westerholt henning.westerholt at 1und1.de
Fri Oct 24 13:33:26 CEST 2008


On Friday 24 October 2008, Daniel-Constantin Mierla wrote:
> >>> - add AVP type to gparam_t, to make this usable for carrierroute
> >>
> >> this should not be necessary. pv_spec_t can handle the avp naming. The
> >> avp is just another PV. What is the particular use case for you? Maybe I
> >> can help showing how to use the pv_spec_t as avp for it.
> >
> > Hi Daniel,
> >
> > yes, i know. But we've some performance concerns regards to printing the
> > PV for every invocation of this function, when an AVP is used most of the
> > time. Do you think this is no problem?
>
> if that is a concern for you, you can get the name and then use it as
> AVP. The pv_spec_t has inside the new fields you added
> http://www.asipto.com/pub/kamailio-devel-guide/#c11pv_name_t
>
> Moreover, there is a function that gets the avp name out of pv_spec_t,
> for the case the avp name is dynamic, e.g., $avp($var(avpname)), see
> pv_get_avp_name() in pvar.c

Hi Daniel,

thank you for the explanation, i'll check this out. I know about the pv_spec_t 
function, but was not aware that it also hold the AVP value. I'll change this 
later today, and adapt the carrierroute module.

Henning



More information about the Devel mailing list