<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 12pt; font-family: "Times New Roman",Times,serif'>
<p>Hi,</p>
<p>I'm using latest kamailio 5.6.2 and rtpengine. </p>
<p>I need to play announcement to both parties when call is answered by callee. Now I run play_media in event route but when audio start announcement sounds like we have a 50% packet loss. After it is completed there is no problem with audio both sides. I figured out that if i do block_media() my announcement play perfectly but i dont understand how to do unblock_audio() after announcement ends.</p>
<p>Appriciate any help!</p>
<p>here is my code:</p>
<table class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" style="height: 108px;" data-hpc="" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="" data-tagsearch-path="testkama.file">
<tbody>
<tr style="height: 18px;">
<td id="LC703" class="blob-code blob-code-inner js-file-line" style="height: 18px; width: 188px;">event_route[dialog:start]{</td>
</tr>
<tr style="height: 18px;">
<td id="L704" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" style="height: 18px; width: 188px;" data-line-number="704"> </td>
<td id="LC704" class="blob-code blob-code-inner js-file-line" style="height: 18px; width: 354.365px;">xlog("L_INFO", "dialog started, received 200OK");</td>
</tr>
<tr style="height: 18px;">
<td id="L705" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" style="height: 18px; width: 188px;" data-line-number="705"> </td>
<td id="LC705" class="blob-code blob-code-inner js-file-line" style="height: 18px; width: 354.365px;">block_media();</td>
</tr>
<tr style="height: 18px;">
<td id="L706" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" style="height: 18px; width: 188px;" data-line-number="706"> </td>
<td id="LC706" class="blob-code blob-code-inner js-file-line" style="height: 18px; width: 354.365px;">play_media("all file=/usr/local/src/myfile.mp3");</td>
</tr>
<tr style="height: 18px;">
<td id="L707" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" style="height: 18px; width: 188px;" data-line-number="707"> </td>
<td id="LC707" class="blob-code blob-code-inner js-file-line" style="height: 18px; width: 354.365px;">#unblock_media();</td>
</tr>
<tr style="height: 18px;">
<td id="L708" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" style="height: 18px; width: 188px;" data-line-number="708"> </td>
<td id="LC708" class="blob-code blob-code-inner js-file-line" style="height: 18px; width: 354.365px;">}</td>
</tr>
</tbody>
</table>
<p><br /></p>
<div id="signature">-- <br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Best Regards</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Stepan Kislovich</div>
</div>
</body></html>