<p>Hi <a href="https://github.com/nikbyte" class="user-mention">@nikbyte</a> , there are couple of issues with this patch:</p>

<p>1) first, you assume the rtpproxy modules binds all the time to the dialog module; but this happens only if engage_rtpproxy() is used; so, the dialog api may not be available to you all the time; This can be fixed by trying to bind (with no error on failure) to dialog if autobridging is used.</p>

<p>2) you disregard the direction of the message relative to the call (as you take the info from the caller leg all the time) - this will fail if you have the reply to a re-INVITE from callee side  ; This may be fixed by looking to the right leg (caller or callee) based on the in-dialog direction of the request.</p>

<p>3) the IP information you get from dialog is not what you need. Rtpproxy needs to the IP of the destination (of the reply) - the via2; but you extract from the dialog the IP of the opensips interface used for sending out the reply - unfortunately this cannot be fixed (as dialog module does not contain such information)</p>

<p>I will close this patch - as the overall approach is wrong - and work out a similar fix but based on the TM module (instead of dialog) - I will send you a commit link in order to test.</p>

<p>Thanks, Bogdan</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href='https://github.com/OpenSIPS/opensips/pull/238#issuecomment-43774720'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/5479561__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNjMwNjY4MSwiZGF0YSI6eyJpZCI6MzI3MTcwMjR9fQ==--65a7492eaa3506d3dcc6d7a09ca88349b9c3dc38.gif' height='1' width='1'></p>