<div dir="ltr">Hello,<div><br></div><div>Not sure i understood you goal, but I receive the INVITE, and start sending moh until the call is answered, like this:</div><div><br></div><div><div> <extension name="Local_Extension"></div><div> <condition field="destination_number" expression="^(9.*)$"></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre">        </span><action application="pre_answer"/><br></div><div><div> <span class="gmail-Apple-tab-span" style="white-space:pre">        </span><action application="playback" data="local_stream://moh"/></div></div><div> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/></div><div> <action application="hangup"/></div><div> </condition></div><div> </extension></div><div><br></div></div><div>You could do something similar.</div><div><br></div><div>Regards,</div><div><br></div><div>Dacud</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 13, 2016 at 3:56 PM, Dmitry Mordovin <span dir="ltr"><<a href="mailto:d.mordovin@dwide.com" target="_blank">d.mordovin@dwide.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div style="font-family:-moz-fixed;font-size:12px" lang="x-unicode">Hello,
<br>
<br>
I can't figure out how to configure hold music to play from begin
extension till customer answer.
<br>
The problems is:
<br>
- Hold music play while bridge calling to customer only and
silence while sleep 5 sec before second try
<br>
- Hold music begin play .wav from start each time when bridge
switch to next route.
<br>
<br>
Any ideas how to configure hold music whole call session and,
start playing after ANSWER (1 step) and stop play when customer
answer(3 step) or bridge fail (4 step)?
<br>
<br>
My config:
<br>
<br>
<extension name="srv_sctv">
<br>
<condition field="destination_number"
expression="^12345$">
<br>
<br>
<!-- 1. Answer & welcome -->
<br>
<br>
<action application="answer"/>
<br>
<action application="set"
data="continue_on_fail=true"/>
<br>
<br>
<action application="playback"
data="/opt/freeswitch-share/<wbr>fs_sounds/ring_welcome.wav"/>
<br>
<br>
<!-- 2. Setup hold music & other settings -->
<br>
<action application="set"
data="ignore_early_media=true" />
<br>
<action application="set"
data="instant_ringback=true" />
<br>
<action application="export"
data="hold_music=/opt/<wbr>freeswitch-share/moh/0/2_8.<wbr>wav" />
<br>
<action application="set"
data="transfer_ringback=file_<wbr>string:///opt/freeswitch-<wbr>share/moh/0/2_8.wav"/><br>
<action application="set"
data="ringback=/opt/<wbr>freeswitch-share/moh/0/2_8.<wbr>wav"/>
<br>
<br>
<!-- 3. Call to customer -->
<br>
<action application="set"
data="hangup_after_bridge=<wbr>true"/>
<br>
<br>
<action application="bridge"
data="[leg_timeout=20]sofia/<wbr>gateway/gw1/79262410000@wg1|[<wbr>leg_timeout=20]sofia/gateway/<wbr>gw1/79262411111@gw1"/><br>
<!-- Second try in 5 seconds -->
<br>
<action application="sleep" data="5000"/>
<br>
<action application="bridge"
data="[leg_timeout=20]sofia/<wbr>gateway/gw1/79262410000@wg1|[<wbr>leg_timeout=20]sofia/gateway/<wbr>gw1/79262411111@gw1"/><br>
<br>
<!-- 4. Bridge fail -->
<br>
<action application="playback"
data="/opt/freeswitch-share/<wbr>fs_sounds/ru/connection_not_<wbr>established.mp3"/><br>
<action application="hangup"/>
<br>
</condition>
<br>
</extension>
<br>
<br>
Thank All!
<br>
</div>
</div>
<br>______________________________<wbr>______________________________<wbr>_____________<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.<wbr>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.<wbr>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.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>