Thanks!
you should use $fti and $tti only after loose_route().
If used before, it doesn't find the proper Route header and assumes downstream. The issue actually is the fact that there is some caching done in this case, to avoid doing same processing many times for same sip message. So getting again $fti or $tti after loose route doesn't change anymore the values computed before loose route.
Makes perfect sense. I forgot how the parser works. Only parse the headers when they are needed.
So take-away is *only* access a pv /after/ you have run any of its prerequisites. First time a pv is referenced, it is defined and allocated. After that the value (at time of first reference) will be used for the rest of the script. And yes, this is for R/O pv's - R/W can be reassigned.
As always, user support is absolutely the best. Thank you.
I guess it needs more clarifications in the docs.
Maybe, but I'm not sure how to express it clearer.
Also, record_route() for requests within dialog can take the tag from callee, if the re-invite comes from that side.
Right. Forgot that too.
Thanks again. All works as expected now!