[OpenSIPS-Users] Mediaproxy wrong port, bug?

Aleksander Akimow aleksander.akimow at gmail.com
Thu Jan 31 23:44:29 CET 2013

We are having this problem as well even not using asterisk.

> Hi all,
> I found the cause of this issue: asterisk. For future reference, this
> is what caused this kind of behaviour:
> SIP proxy:
> Media proxy:
> Media proxy:
> Asterisk has a peer (opensips) defined as with nat=no. Global
> setting:  nat=yes. Changing this to global nat=never and enable it
> explicit for peers who need it does solve the problem. Somehow,
> asterisk does not seem to recognize audio streams to and
> to belong to a session going to and does something to
> confuse Mediaproxy. I did not further look into the exact cause of
> this issue.

This setting nat=never tells asterisk not to use symmetric RTP
response. So Asterisk will still send replies to old ports negotiated
into SDP even if mediaproxy changes source port and because of this
setting mediaproxy will be able to see them all time. Our call parties
use symmetric RTP by default and there is no way to disable this
behavior. When mediaproxy sends its first packet from wrong port all
responses start to come to this port and after some time conntrack
timeout is triggered.  I have sent full dump (RTP+SIP) with logs where
you can see exaclty how it happens.


More information about the Users mailing list