<div dir="ltr">I&#39;ve tried all variations of ringback and pre_answer order. <div>I&#39;ve found solution that works for me, but it appears to be a bug in displace_session or uuid_displace implementation.</div><div><br></div><div>Method1: </div><div>Thing that works:</div><div><div><div>&lt;action application=&quot;pre_answer&quot;/&gt;<br></div><div>&lt;action application=&quot;set&quot; data=&quot;send_silence_when_idle=1400&quot;/&gt;<br></div></div><div>&lt;action application=&quot;displace_session&quot; data=&quot;tone_stream://%(1000,4000,425);loops=-1 0 mux}&quot;/&gt;</div><div>&lt;action application=&quot;sleep&quot; data=&quot;8000&quot;/&gt;<br></div><div><br></div><div>Thing that doesn&#39;t work: the above plays tone_stream during sleep, but stop fails</div><div>&lt;action application=&quot;stop_displace_session&quot; data=&quot;tone_stream://%(1000,4000,425);loops=-1}&quot;/&gt;. It doesn&#39;t stop displace.<br></div></div><div><br></div><div>Method 2. Use uuid_displace instead of displace_session:</div><div><div>&lt;action application=&quot;set&quot; data=&quot;api_result=${uuid_displace ${uuid} start tone_stream://L=5;%(1000,4000,425)}&quot;/&gt;</div><div>&lt;action application=&quot;sleep&quot; data=&quot;8000&quot;/&gt;</div><div>&lt;action application=&quot;set&quot; data=&quot;api_result=${uuid_displace ${uuid} stop tone_stream://L=5;%(1000,4000,425);}&quot;/&gt;<br></div></div><div><br></div><div>It works, but there is a problem: it incorrectly interprets tone_stream syntax of this: &quot;tone_stream://%(1000,4000,425);loops=-1&quot; and plays some strange DTMF (possibly it interpretes some symbols as DTMF) after generated sound.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-03 11:25 GMT+03:00 David Villasmil <span dir="ltr">&lt;<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Have you tried moving the &quot;pre_answer&quot; to before the ringback?</div><div hspace="streak-pt-mark" style="max-height:1px"><img style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&amp;type=zerocontent&amp;guid=df0b04f3-83bf-462d-8f08-216164c5a750"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, May 31, 2016 at 1:57 PM, Dmitry Sytchev <span dir="ltr">&lt;<a href="mailto:kbdfck@gmail.com" target="_blank">kbdfck@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi all!<br>
<br>
I&#39;d like to resolve some unclear ringback behavior in early media<br>
mode. I&#39;m trying to implement ringback while no bridge active.<br>
A calls FS, FS does something, then searching for B and bridges A to B.<br>
<br>
I&#39;d like to start playing custom ringback immediately after call from<br>
A gets into FS, not when we start bridge to B.<br>
<br>
I&#39;m doing something like that:<br>
<br>
&lt;action application=&quot;set&quot; data=&quot;ringback=%(2000, 4000, 440.0, 480.0)&quot;/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;instant_ringback=true&quot;/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;bridge_early_media=true&quot;/&gt;<br>
&lt;action application=&quot;pre_answer&quot;/&gt;<br>
&lt;action application=&quot;sleep&quot; data=&quot;10000&quot;/&gt;<br>
...<br>
&lt;action application=&quot;bridge&quot; data=&quot;some bridge data&quot;/&gt;<br>
<br>
There is no ringback to A in such scenario until bridge is called in<br>
further dialplan processing. I&#39;ve tried all combinations of<br>
ignore/bridge early media, but with no luck. Pre_answer can be called<br>
directly or by FS when call is recorded, with no difference. There is<br>
a wiki page that recommends usage of ring_ready:<br>
<br>
<a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+ring_ready" rel="noreferrer" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+ring_ready</a><br>
<br>
ring_ready works, but it can give only Ringing to calling side, so  I<br>
can&#39;t pass custom RBT to calling party. It would be enough for me, but<br>
once somebody calls pre_answer, no early media is passed until bridge<br>
attempt.<br>
<br>
What can be done to resolve this? Thanks in advance.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Best regards,<br>
<br>
Dmitry Sytchev,<br>
IT Engineer<br>
<br></div></div><span class="">
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</span></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br><br>Dmitry Sytchev,<br>IT Engineer</div>
</div>