Juha Heinanen writes:
domain module sets $td.did at lookup_domain call. $td.did seems to be a normal avp, because i can print its value with xlog by referring to it as $avp(td.did). however, its value is gone at failure route, which makes me suspect that $td.did is not really a normal avp.
perhaps this has something to do with the flags of $td.did avp that seem to be
flags = AVP_TRACK_TO | AVP_CLASS_DOMAIN
i modified avpops avp_print() to print AVP with those flags and called it at the and of branch route and at the beginning of onerply route. i got to syslog
Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: Printing AVPs in branch route Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: avpops [avpops_impl.c:1328]: p=0xb4797ca0, flags=0x0041 Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: avpops [avpops_impl.c:1332]: #011#011#011name=<lcr_id> Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: avpops [avpops_impl.c:1342]: #011#011#011val_int=<1> Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: avpops [avpops_impl.c:1328]: p=0xb4797c10, flags=0x0043 Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: avpops [avpops_impl.c:1332]: #011#011#011name=<did> Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9862]: INFO: avpops [avpops_impl.c:1340]: #011#011#011val_str=<test.fi / 7> Apr 23 14:25:52 sip /usr/sbin/sip-proxy[9865]: INFO: Printing AVPs in onreply route
this shows that $td.did was set at the end of branch route, but not at the beginning of onreply route, which seems to indicate that avps with flags AVP_TRACK_TO | AVP_CLASS_DOMAIN are not saved/restored with the transaction.
i then tried to read tm module code and found this kind of line in t_hooks.c:
set_avp_list(AVP_CLASS_DOMAIN | AVP_TRACK_TO, backup_dom_to );
which seems to indicate that those avps would be saved, but clearly that is not the case.
i'll switch this to sr-dev list in the hope that there is someone left who knows what is going on and how also AVP_TRACK_TO | AVP_CLASS_DOMAIN avps can be saved/restored with the transaction?
-- juha