On 4/26/11 9:20 PM, Klaus Darilion wrote:
Jan Janak wrote:
On Tue, Apr 26, 2011 at 8:42 PM, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Jan Janak wrote:
On Tue, Apr 26, 2011 at 7:41 PM, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Not helping with this issue - but having another question: what is $td.did? Is it a pseudo variable (as it starts with $)? Is it somehow related/derived to/from $td or is the '.' just a character like a-z?
This is the SER syntax for AVP names, see http://sip-router.org/wiki/devel/avps-ser
Aha. But how does sip-router decide if $td is a ser AVP or a Kamailio pseudo variable?
If it starts with ${fu,tu,fd,td,g}. then it is taken as a SER AVPs, otherwise it is a Kamailio pseudo variable.
Not sure if I got it right. I guess if I use $fu it will be Kamailio's from-URI pseudo variable as there is no ser $fu AVP as $fu is only the prefix and not the full AVP name, a full ser AVP name would be for example $fu.foo.
Is this correct?
actually, to give further clarifications, the script variable lookup for $xyz is like: - search in K-style PV table for 'xyz' name and if found use it - if not found, treat it as AVP
So, $xyz (literally) is practically the same as $avp(xyz). When the integration happened, it was discovered there was no critical overlapping between existing PV names and ser avp lists - as mentioned in this thread, ser had lately several avp classes, using a dot to mark the end of the class and the start of the avp name.
In the past a non-existing PV name in K would have thrown error, now is considered to be classic K AVP (in ser style it is from uri avp).
Now the $avp(...) PV supports all classes, so you can use for example $avp(td.did). If the avp class is missing, then it is the 'f' class, afaik based on some emails sent in the past on the lists -- so these should be equivalent in the config file: - $myavp - $f.myavp - $avp(myavp) - $avp(f.myavp)
However, you better test the above equivalency, since I am using only K-style avps.
Cheers, Daniel