[OpenSIPS-Users] mediaproxy/rtpproxy problem with reinvites
Iñaki Baz Castillo
ibc at aliax.net
Fri Oct 31 14:11:16 CET 2008
2008/10/31 Jeff Pyle <jpyle at fidelityvoice.com>:
> How *should* rtpproxy/mediaproxy handle reinvites? I only got this far by
> using unforce_rtp_proxy, then force_rtp_proxy on a loose-routed INVITE w/
> SDP (in other words a reinvite). Should that be necessary? Might the "s"
> swap flag be helpful in this scenario somewhere?
I do the following:
In in-dialog section (loose-route) I run force_rtp_proxy("l"). In case
the initial INVITE used RtpProxy then this command re-enables it and
$rc = 1. In case the initial INVITE didn't use RtpProxy then this
command return other value (false) and no SDP modification is
performed.
In the first case, I set a flag that I check in onreply_route since
the 180/183/200 responses also need to run "force_rtp_proxy":
# in-dialog:
t_on_reply("1");
force_rtp_proxy("l");
if ($rc == 1) {
setbflag(9); # Enable RtpProxy in the reply.
}
onreply_route[1] {
if (status =~ "(180)|(183)|2[0-9][0-9]") {
if (isbflagset(6) || nat_uac_test("1"))
fix_nated_contact();
if (isbflagset(9) && has_body("application/sdp") && $cl != 0) {
force_rtp_proxy("l");
}
}
}
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the Users
mailing list