On Jul 02, 2009 at 18:06, Juha Heinanen <jh(a)tutpro.com> wrote:
Andrei Pelinescu-Onciul writes:
To make the same thing work for most ser modules,
the fixup_* functions
(e.g.: fixup_var_str_12 that is used by lookup_domain) from sr_module.c
should be modified either in a similar way, or they should just try
fix_param(FPARAM_AVP, param) if first fix_param(FPARAM_PVS, param)
failed. One might need to remove the error messages printed by
fix_param() if AVP or PVAR parsing fails (to allow for retrying with AVP
or PVARs without filling the log with errors).
in order to avoid unnecessary lookups, it should be possible (if not
mandatory) to differentiate avps and pvars syntactically. it is very
bad, if "$fd" can be either an avp with name "fd" or a pseudo
variable
denoting domain of from uri. in k, "fd" avp would be written as
$avp("fd") and no double lookup would be needed.
They are looked twice but only at startup (fixup for the script and the
modules) so there shouldn't be any runtime performance hit because of
this.
I agree however that we should differentiate somehow, but for now we
have to support the legacy modes (ser & kamailio) to make initial
migration easier.
Andrei