I'm missing something obvious here, throwing this out to get a couple extra sets of eyeballs on it.
I can't get rr modules is_direction() or the $fti / $tti pv's to work in 4.3.x or 4.4.x
Relevant parts of the config:
loadmodule "rr.so" modparam ("rr", "enable_full_lr", 1) modparam ("rr", "append_fromtag", 1)
...
route {
xlog ("L_INFO", "$rm: $fu -> $ru");
record_route ();
if (has_totag ()) { xlog ("L_INFO", "Before Loose route: fti: $fti tti: $tti ci: $ci"); if (loose_route ()) { if (is_direction ("downstream")) { xlog ("L_INFO", "in-dialog $rm request from caller to callee"); } else { xlog ("L_INFO", "in-dialog $rm request from callee to caller"); } xlog ("L_INFO", "After Loose route: fti: $fti tti: $tti ci: $ci"); } }
if (! t_relay ()) { sl_reply_error (); } }
----
Bob and Alice are hard phones, with kamailio + dbaliases in the middle.
Alice calls Bob, then Bob (the callee) sends the BYE
----
Syslog:
01. INVITE: sip:alice@kamailio.org -> sip:bob@kamailio.org:5060 02. Alias lookup returned sip:bob@biloxi.com , sending on 03. ACK: sip:alice@kamailio.org -> sip:bob@biloxi.com 04. Before Loose route: fti: 707601862 tti: 45686ADF-10AAEB28 ci: 8744171@atlanta.com 05. in-dialog ACK request from caller to callee 06. After Loose route: fti: 707601862 tti: 45686ADF-10AAEB28 ci: 8744171@atlanta.com 07. BYE: sip:bob@kamailio.org -> sip:alice@atlanta.com:5066 08. Before Loose route: fti: 45686ADF-10AAEB28 tti: 707601862 ci: 8744171@atlanta.com 09. in-dialog BYE request from caller to callee 10. After Loose route: fti: 45686ADF-10AAEB28 tti: 707601862 ci: 8744171@atlanta.com
Using the above config, is_direction always returns "caller", even when bob is sending the message. Looking at a packet capture:
01. Kamailio Sent: Record-Route: sip:kamailio.org;lr=on;ftag=707601862
<on the 200 ok from Bob> Kamailio Received: Record-Route: sip:kamailio.org;lr=on;ftag=707601862 Kamailio Sent: Record-Route: sip:kamailio.org;lr=on;ftag=707601862
07. Kamailio Received: Route: sip:kamailio.org;lr=on;ftag=707601862 Kamailio Sent: Record-Route: sip:kamailio.org;lr=on;ftag=45686ADF-10AAEB28
I expect $fti to be wrong before the loose_route (line 08); but lines 09 and 10 are wrong.
I'm obviously missing something trivial here. Any ideas what I should check next?
Thanks!