<div dir="ltr">Ali,<div><br></div><div>This is what I use within loose_route() to handle rtpproxy. In my particular case I'm bridging between two interfaces.</div><div><br></div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><div><font face="monospace">if (has_body("application/sdp")) {</font></div></div></div></div><div><div><font face="monospace"> # Begin rtp session update gyrations</font></div></div><div><div><font face="monospace"> if (method == "INVITE") {</font></div></div><div><div><font face="monospace"> # INVITE w/ SDP, so early neg</font></div></div><div><div><font face="monospace"> # This is offer, reply is answer</font></div></div><div><div><font face="monospace"> rtpproxy_offer("frocl");</font></div></div><div><div><font face="monospace"> t_on_reply("1");</font></div></div><div><div><font face="monospace"> } else if (method == "ACK") {</font></div></div><div><div><font face="monospace"> # ACK w/ SDP, so late neg (done now)</font></div></div><div><div><font face="monospace"> # This is answer</font></div></div><div><div><font face="monospace"> rtpproxy_answer("frocl");</font></div></div><div><div><font face="monospace"> } </font></div></div><div><div><font face="monospace"> } else {</font></div></div><div><div><font face="monospace"> if (method == "INVITE") {</font></div></div><div><div><font face="monospace"> # INVITE w/o SDP, so late neg</font></div></div><div><div><font face="monospace"> # This is nothing, reply is offer, ACK is answer (~5 lines up)</font></div></div><div><div><font face="monospace"> t_on_reply("2");</font></div></div><div><div><font face="monospace"> } else {</font></div></div><div><div><font face="monospace"> t_on_reply("1");</font></div></div><div><div><font face="monospace"> }</font></div></div><div><div><font face="monospace"> }</font></div></div></blockquote><div><br></div><div><br></div><div>And then:</div><div><br></div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="monospace">onreply_route[1] { # Manage content as necessary - early negotiation</font></div></div><div><div><font face="monospace"> if (has_body("application/sdp")) {</font></div></div><div><div><font face="monospace"> if ($DLG_status) { # Update</font></div></div><div><div><font face="monospace"> rtpproxy_answer("frocl");</font></div></div><div><div><font face="monospace"> } else { # New</font></div></div><div><div><font face="monospace"> rtpproxy_answer("froc");</font></div></div><div><div><font face="monospace"> }</font></div></div><div><div><font face="monospace"> }</font></div></div><div><div><font face="monospace">}</font></div></div><div><div><br></div></div><div><div><br></div></div><div><div><font face="monospace">onreply_route[2] { # Manage content as necessary - late negotiation - update</font></div></div><div><div><font face="monospace"> if (has_body("application/sdp")) {</font></div></div><div><div><font face="monospace"> rtpproxy_offer("frocl");</font></div></div><div><div><font face="monospace"> }</font></div></div><div><div><font face="monospace">}</font></div></div></blockquote><div><br></div><div><br></div><div><br></div><div>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.</div><div><br></div><div><br></div><div>- Jeff</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 5:13 PM, Ali Pey <span dir="ltr"><<a href="mailto:alipey@gmail.com" target="_blank">alipey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>What's the best way of handling rtpproxy with re-invites? </div><div><br></div><div>Should I do unforce and then offer/answer? What if the re-invite gets rejected?</div><div><br></div><div>Any help appreciated.</div><div><br></div><div>Thanks,</div><div>Ali Pey</div><div><br></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>