<div dir="ltr"><div class="gmail_extra">You have to figure it somehow with adjusting the python code of media-dispatcher. We have developed special &quot;/etc/init.d/kamailio grace&quot; command, which waits for the moment, when there are no calls, so it can be restarted. It queries mediaproxy every second. </div>
<div class="gmail_extra"><br></div><div class="gmail_extra">In future we will not use mediaproxy anymore - it is not supported in latest version either. rtpproxy gives us better performance results.<br><br><div class="gmail_quote">
On Tue, Feb 12, 2013 at 2:44 PM, Eduardo Lejarreta <span dir="ltr">&lt;<a href="mailto:lejarreta.e@sarenet.es" target="_blank">lejarreta.e@sarenet.es</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Good evening.<br>
<br>
Launching &quot;mediaproxy-dispatcher&quot; and &quot;mediaproxy-relay&quot; on the foreground and with &quot;DEBUG&quot; we can see:<br>
<br>
mediaproxy-dispatcher log:<br>
------------------------------------------------------------------&gt; Kamctl restart<br>
debug: Connection to OpenSIPS lost: Connection was closed cleanly.<br>
debug: Connection to OpenSIPS lost: Connection was closed cleanly.<br>
debug: Connection to OpenSIPS lost: Connection was closed cleanly.<br>
debug: Issuing &quot;remove&quot; command to relay at A.B.C.D<br>
debug: Got statistics: {xxxxxxxxxxxxxxxxxxx}<br>
debug: Connection to OpenSIPS lost: Connection was closed cleanly.<br>
<br>
mediaproxy-relay log:<br>
------------------------------------------------------------------&gt; Kamctl restart<br>
debug: removing session xxxxxxxxxxxxxxxxxxx<br>
(Port 50000 Closed)<br>
(Port 50001 Closed)<br>
(Port 50002 Closed)<br>
(Port 50003 Closed)<br>
<br>
So &quot;mediaproxy-dispatcher&quot; doesn&#39;t receive any command from Kamailio, he just detects &quot; Connection was closed cleanly&quot; and then issues a &quot;remove&quot; command to &quot;mediaproxy-relay&quot;.<br>

<br>
Does anybody know any way to avoid this?<br>
<div class="im HOEnZb"><br>
Thanks and regards.<br>
--<br>
Eduardo Lejarreta.<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div></div>