<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">What you describe already works as you suggested today, BYE messages are sent&nbsp;automatically&nbsp;by call_control and mediaproxy modules in various cases. Did you test &nbsp;and it did not work for you?<div><br></div><div>Regards,</div><div>Adrian</div><div><div><br><div><div>On May 6, 2009, at 10:22 PM, Iņaki Baz Castillo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi, MediaProxy can account the end of a "broken" session (after X secons from <br>the loss of RTP). This is done via Radius or MySQL directly from MediaProxy, <br>but the still alive endpoint doesn't receive a BYE.<br><br>In real life, when talking from my mobile to other (GSM network), if the <br>remote loses the GSM connection (i.e. in a tunnel) I leave hearing audio and <br>my cell phone receives a "BYE" after X seconds (5-10). This is very useful <br>since I can understand that the session has ended due to loss of connetion in <br>the remote party.<br><br>But with OpenSIPS + MediaProxy is not possible to do it. MediaProxy can <br>account the call for the real duration of the RTP session, but there is no BYE <br>when one of the endpoints loses the connection.<br><br>So I wonder how feasible would be the following:<br><br>- MediaProxy detects loss of RTP.<br>- MediaProxy accounts the call (via Radius/MySQL) as now.<br>- MediaProxy notifies OpenSIPS (MediaProxy -> dispacher -> mediaproxy module) <br>about the end of the call.<br>- OpenSIPS generates BYE (local_route) in both directions of the dialog (even <br>if one of them probably wouldn't arrive to the endpoint).<br><br><br>Other option would be:<br><br>- MediaProxy detects loss of RTP.<br>- MediaProxy does *NOT* account the call.<br>- MediaProxy notifies OpenSIPS (MediaProxy -> dispacher -> mediaproxy module) <br>about the end of the call.<br>- OpenSIPS generates BYE in both directions of the dialog.<br>- OpenSIPS (in local_route) does the accounting (it must be know some <br>MediaProxy parameters, as the time after MediaProxy ends the session if RTP is <br>lost). This BYE would also account the call end reason ("media timeout") by <br>setting some AVP used in the Radius acc module...<br><br><br>Opinions?<br><br><br>For now, media-relaying solutions (as MediaProxy) are useful, and mostly used, <br>for calls between SIP clients and SIP gws, so if the user (or gw) crashes, the <br>accounting is "fixed". But I expect that there is more world than just calls <br>between SIP users and PSTN gateways (imagine for example OpenSIPS + MediaProxy <br>being used in an IMS environment where calls between users *are* really <br>accounted for billing).<br><br><br>Thanks for any comment. Best regards.<br><br><br>-- <br>Iņaki Baz Castillo &lt;<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>><br><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">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></blockquote></div><br></div></div></body></html>