Hi! We found that we need double Record-Route when we call from one SIP transport to another (let's say, TCP -> TLS), because without |transport=" hint in Record-Route, mobile Linphone app sends messages (INVITE reply, ACK, BYE) via UDP, even if configured for another transport.
record_route_advertised_address() is told to add double RR if needed, automatically, so we use it.
But the subscriber (the receiver of call) can have multiple registered locations, let's say, one connected via TCP, and another via TLS. So we need to handle each call branch added by lookup(). But adding record_route_advertised_address() ONLY to branch_route attached by t_on_branch() doesn't execute if there's only one location. Having record_route_advertised_address() just in routing script after lookup() seems wrong because it seems unable to edit it for other branches (I don't remember if I have tested this and have proven a failure, or this is just my speculation). So we have added it in both places - right under lookup(), and in branch_route. But in this case we have an error logged:
ERROR: rr [rr_mod.c:337]: w_record_route_advertised_address(): Double attempt to record-route
Could anyone explain what would be the most correct solution? What is intended behaviour of branch_route? Is it omitted from execution on "primary" branch of call? Is there any parameter which could help?
Thanks in advance.