[OpenSIPS-Users] RTP Proxy and Re-Invites
Jeff Pyle
jpyle at fidelityvoice.com
Fri Nov 14 02:30:18 CET 2014
Ali,
This is what I use within loose_route() to handle rtpproxy. In my
particular case I'm bridging between two interfaces.
if (has_body("application/sdp")) {
# Begin rtp session update gyrations
if (method == "INVITE") {
# INVITE w/ SDP, so early neg
# This is offer, reply is answer
rtpproxy_offer("frocl");
t_on_reply("1");
} else if (method == "ACK") {
# ACK w/ SDP, so late neg (done now)
# This is answer
rtpproxy_answer("frocl");
}
} else {
if (method == "INVITE") {
# INVITE w/o SDP, so late neg
# This is nothing, reply is offer, ACK is answer (~5 lines
up)
t_on_reply("2");
} else {
t_on_reply("1");
}
}
And then:
onreply_route[1] { # Manage content as necessary - early negotiation
if (has_body("application/sdp")) {
if ($DLG_status) { # Update
rtpproxy_answer("frocl");
} else { # New
rtpproxy_answer("froc");
}
}
}
onreply_route[2] { # Manage content as necessary - late negotiation -
update
if (has_body("application/sdp")) {
rtpproxy_offer("frocl");
}
}
This does not handle rejected reinvites. I don't know how to solve that
one. Otherwise, it works well, although in some spots it may be overkill.
- Jeff
On Thu, Nov 13, 2014 at 5:13 PM, Ali Pey <alipey at gmail.com> wrote:
> Hello,
>
> What's the best way of handling rtpproxy with re-invites?
>
> Should I do unforce and then offer/answer? What if the re-invite gets
> rejected?
>
> Any help appreciated.
>
> Thanks,
> Ali Pey
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20141113/ac037fed/attachment-0001.htm>
More information about the Users
mailing list