Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Peter Baer (peter_baer)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: loose routed messages may use wrong outbound port
loose_route() does not select the correct socket for relayed packets if the route header does not have a port specified and the proxy is setup to use more than one listening port (using same protocol).
So for example:
A request comes in on socket 192.168.1.100:15061 with route header:
Route: <sip:192.168.1.100:15061;r2=on;lr;ftag=71737667aac2b773o1>, <sip:192.168.1.100;r2=on;lr;ftag=71737667aac2b773o1>.
When loose_route gets called grep_sock_info() does not match on port because we look at 2nd route that has no port specified:
This causes the message is to be sent out on 192.168.1.100:15061 instead of 192.168.1.100:5060.
There is an attached patch that fixes this bug, but it has only been tested on 1.3.
Thanks for the report and the fix - I'm working on it right now as more
changes are required. The protocol par tis also affected by a similar bug.
Also this is not only RR specific, but other parts of the code are