[OpenSIPS-Users] rtpengine_answer() is silently ignored on request route handling the initial INVITE when acting as an UAS - what am I missing?
Pavel Sindelka
sindelka.p at gmail.com
Sun Mar 8 16:33:54 UTC 2026
Hello again,
answering to myself, the solution is not really intuitive - instead of
using |rtpengine_answer()| directly, one has to use |rtpengine_offer()|
with a |force-answer| flag. Doing so makes the |rtpengine| module set
the |command| value to |answer| when sending the request via the control
interface:
|rtpengine_offer("force-answer to-tag=$sig_local_totag", ,
$var(new_sdp_answer), $var(orig_sdp_answer));|
|append_to_reply("Contact: $var(contact)\r\n");
append_to_reply("Content-Type: application/sdp\r\n");
t_reply_with_body(200,"OK",$var(||new_sdp_answer||));
exit;|
Pavel
Dne 08.03.2026 v 14:01 Pavel Sindelka napsal(a):
>
> Hello,
>
> https://opensips.org/docs/modules/3.6.x/rtpengine.html#func_rtpengine_answer
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20260308/300b4c4e/attachment.html>
More information about the Users
mailing list