Juha,
i have always thought that AVPs exits per transaction. that does not seem to be the case, however, because when i put in the beginning of my script
xlog("L_INFO", "Caller lcr_id $avp(CALLER_LCR_ID_AVP)\n");
this gets printed to syslog:
Aug 29 11:34:34 localhost /usr/sbin/sip-router[10210]: INFO: Caller lcr_id 2
is this the indented behavior? do i really need to delete all AVPs in the beginning of the script in order to make sure that they don't have any values left from processing of previous message?
What kind of AVP is this? Where is its value defined? If it is a global AVP (defined in global_attrs table) then what you see could be correct. Global AVPs are always present.
If this is a domain level avp (defined in domain_attrs table) then what you see could be correct, provided that you called some function from domain module before the statement above (i.e. lookup_domain).
If it is neither domain-level nor global avp then the behavior you see is not intended.
You can also try to use the ser version of xlog module to see where the value comes from:
xlog("L_INFO", "User-level value: %$fu.CALLER_LCR_ID_AVP\n"); xlog("L_INFO", "Domain-level value: %$fd.CALLER_LCR_ID_AVP\n"); xlog("L_INFO", "Global-level value: %g.CALLER_LCR_ID_AVP\n");
Provided that this is an AVP with string name (If I am not mistaken then the ser version of xlog module does not support AVPs with integer names).
Jan.