[OpenSIPS-Users] Wrong socket selected by proxy when forwarding requests

Jan Blom jan.blom at peopleinteractive.se
Mon Aug 15 14:56:58 CEST 2011


Hello,

I have noticed a problem when using mhomed=1. The problem was discovered in 1.6.3, but has also been verified in 1.7.0-beta.

I have Opensips (only) listening on two ports on the same IP address. Obviously this doesn't require mhomed=1, but that was a leftover from an older setup. And I wasn't expecting it to cause trouble anyway.

This is a snippet from the opensips.cfg:

	auto_aliases=no
	mhomed=1
	listen=udp:178.16.xxx.xxx:5060
	listen=udp:178.16.xxx.xxx:5002

I have two user agents that register with the proxy, both using port 5002. In the socket field from the subscriber table, I can verify that both are correctly associated with port 5002 (having value udp:178.16.xxx.xxx:5002).

User agent A then calls user agent B, again by sending the INVITE to port 5002. The INVITE request is properly forwarded to user agent B, using src port 5002.

However, the ACK request sent when B answers and the BYE request when B hangs up will both, incorrectly, be forwarded by the proxy using src port 5060. The wrong socket is selected by the proxy.

This will then prevent proper call setup and termination if any NAT is present.

If I remove the mhomed=1 setting, the problem will disappear. 

So this is currently not a problem for me since the workaround exists. However, it might be a problem for others as well, where you potentially do need a multi-homed setup.


Best regards,
Jan Blom
People Interactive



More information about the Users mailing list