[sr-dev] is $td.did avp a normal avp?

Jan Janak jan at ryngle.com
Tue Apr 26 16:54:10 CEST 2011


(moving to sr-dev)

This looks like a bug to me. All such AVPs should be preserved for
reply and failure route blocks. Let me see if I can reproduce it, I'll
get back to you later this week.

-Jan

On Fri, Apr 22, 2011 at 3:00 PM, Juha Heinanen <jh at tutpro.com> wrote:
> 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.
>
> in route block i have
>
>    $avp(did) = $td.did;
>    xlog("L_INFO", "at t_relay: <td/td.did> = <$avp(did)/$avp(td.did)>\n");
>    if (t_relay()) exit;
>
> branch route, onreply route, and failure route are set when the above
> t_relay() takes place.
>
> at the end of branch route block, i have
>
>    xlog("L_INFO", "at end of contact branches: <did/td.did> = <$avp(did)/$avp(td.did)>\n");
>
> and at the beginning of onreply route block:
>
>    xlog("L_INFO", "at beginning of onreply: <did/td.did> = <$avp(did)/$avp(td.did)>\n");
>
> and at the beginning of failure route block:
>
>    xlog("L_INFO", "at beginning of contact failure: <did/td.did = <$avp(did)/$avp(td.did)>\n");
>
> when i make a call, i get to syslog:
>
> Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13706]: INFO: at t_relay: <td/td.did> = <test.fi/test.fi>
> Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13706]: INFO: at end of contact branches: <did/td.did> = <test.fi/test.fi>
> Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13708]: INFO: at beginning of onreply: <did/td.did> = <test.fi/<null>>
> Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13705]: INFO: at beginning of contact failure: <did/td.did = <test.fi/<null>>
>
> why is it that $avp(did) value has been preserved from route/branch
> route block to onreply/failure blocks, but value of $avp(td.did) is not?
>
> i'll cc to jan in case he is not on this list.
>
> -- juha
>
>



More information about the sr-dev mailing list