<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hello Andrea,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">which particular aspect are you
interested in?</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">The behavior can be demonstrated using
just this simple route:</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><code>route {</code></div>
<div class="moz-cite-prefix"><code> if (is_method("INVITE")
&& !has_totag()) {</code></div>
<div class="moz-cite-prefix"><code> t_newtran();</code></div>
<div class="moz-cite-prefix"><code> rtpengine_use_set(1);</code></div>
<div class="moz-cite-prefix"><code> rtpengine_offer( , ,
$var(sdp-offer), $rb(application/sdp));</code></div>
<div class="moz-cite-prefix"><code><code><br>
</code></code></div>
<div class="moz-cite-prefix"><code><code># ... forward the SDP
offer as modified by rtpengine using another protocol</code></code></div>
<div class="moz-cite-prefix"><code><code><br>
</code></code></div>
<div class="moz-cite-prefix"><code><code># ... receive the SDP
answer from the other protocol and store it into </code></code><code><code>$var(orig-sdp-answer) </code></code></div>
<div class="moz-cite-prefix"><code><code><br>
</code></code></div>
<div class="moz-cite-prefix"><code><code>####
rtpengine_answer("to-tag=$sig_local_totag", ,
$var(new-sdp-answer), $var(orig-sdp-answer));</code></code></div>
<div class="moz-cite-prefix"><code><code>
rtpengine_offer("force-answer to-tag=$sig_local_totag", ,
$var(new-sdp-answer), $var(orig-sdp-answer));</code></code></div>
<div class="moz-cite-prefix"><code><code> </code></code></div>
<div class="moz-cite-prefix"><code><code> $var(contact) =
"<sip:" + $socket_in(ip) + ":" + $socket_in(port) + ">";<br>
append_to_reply("Contact: $var(contact)\r\n");<br>
append_to_reply("Content-Type: application/sdp\r\n");</code></code></div>
<div class="moz-cite-prefix"><code><code>
t_reply_with_body(200, "OK", $var(new-sdp-answer));<br>
exit;</code></code></div>
<div class="moz-cite-prefix"><code><code> }</code></code></div>
<div class="moz-cite-prefix"><code><code><br>
</code></code></div>
<div class="moz-cite-prefix"><code><code> #### handle other
methods & reINVITEs ####</code></code></div>
<div class="moz-cite-prefix"><code><code>}</code></code></div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I am currently trying to understand
why, upon receiving the <code>answer</code> command, <code>rtpengine</code>
changes the port it has indicated in its modified SDP offer and
chooses another one for actually forwarding the media received
from the calling party, but that's off-topic here.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Pavel</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Dne 09.03.2026 v 13:00
<a class="moz-txt-link-abbreviated" href="mailto:users-request@lists.opensips.org">users-request@lists.opensips.org</a> napsal(a):<span
style="white-space: pre-wrap">
</span></div>
<blockquote type="cite"
cite="mid:mailman.1.1773057601.28034.users@lists.opensips.org">
<pre wrap="" class="moz-quote-pre">Date: Sun, 8 Mar 2026 08:14:09 -0500
From: Andrea Sannucci <a class="moz-txt-link-rfc2396E" href="mailto:andrea@andreasannucci.eu"><andrea@andreasannucci.eu></a>
To: OpenSIPS users mailling list <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a>, Pavel
Sindelka <a class="moz-txt-link-rfc2396E" href="mailto:sindelka.p@gmail.com"><sindelka.p@gmail.com></a>
Subject: Re: [OpenSIPS-Users] rtpengine_answer() is silently ignored
on request route handling the initial INVITE when acting as an UAS -
what am I missing?
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:77f081b4-e3c6-48ea-b9be-7bb4611b6fe5@andreasannucci.eu"><77f081b4-e3c6-48ea-b9be-7bb4611b6fe5@andreasannucci.eu></a>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Hello,
can you show your configuration?
Regards
-----
Andrea Sannucci - @AS
El 8/03/2026 a las 8:01 a. m., Pavel Sindelka escribió:
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">
Hello,
<a class="moz-txt-link-freetext" href="https://opensips.org/docs/modules/3.6.x/rtpengine.html#func_rtpengine_answer">https://opensips.org/docs/modules/3.6.x/rtpengine.html#func_rtpengine_answer</a>
doesn't mention any restrictions on use of this function, but in
reality opensips does not send anything to rtpengine if
|rtpengine_answer()| is called on a request route handling the INVITE.
Nothing in the log, no UDP exchange on the rtpengine control port,
regardless whether |rtpengine_offer()| is called earlier on that route
or not. If it is, the information exchange with rtpengine related to
|rtpengine_offer()| can be seen both in the log and on the rtpengine
control port.
The intended overall workflow is to call |rtpengine_offer()|, handle
the mangled SDP offer internally and generate the SDP answer, and get
it "mangled back" using |rtpengine_answer()| before using it as the
body of a locally generated 200 response to the INVITE. Could it be
that as of now, |rtpengine_manage()| not only "combines the
functionality ... based on message type and method ..." but the three
individual methods have actually become just aliases of
|rtpengine_manage()| for backward compatibility? Or is the actual
execution of |rtpengine_answer()| suppressed thanks to some
undocumented plausibility check?
Is there any way to enforce execution of |rtpengine_answer()| on a
request route handling the INVITE?
Thank you for advice.
Pavel
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a class="moz-txt-link-rfc2396E" href="http://lists.opensips.org/pipermail/users/attachments/20260308/028ddb67/attachment-0001.html"><http://lists.opensips.org/pipermail/users/attachments/20260308/028ddb67/attachment-0001.html></a>
------------------------------
Subject: Digest Footer
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
------------------------------
End of Users Digest, Vol 212, Issue 6
*************************************
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>