<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-text-flowed" 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>
      &lt;extension name="srv_sctv"&gt;
      <br>
              &lt;condition field="destination_number"
      expression="^12345$"&gt;
      <br>
      <br>
                &lt;!-- 1. Answer &amp; welcome --&gt;
      <br>
      <br>
                &lt;action application="answer"/&gt;
      <br>
                &lt;action application="set"
      data="continue_on_fail=true"/&gt;
      <br>
      <br>
                &lt;action application="playback"
      data="/opt/freeswitch-share/fs_sounds/ring_welcome.wav"/&gt;
      <br>
      <br>
                &lt;!-- 2. Setup hold music &amp; other settings --&gt;
      <br>
                &lt;action application="set"
      data="ignore_early_media=true" /&gt;
      <br>
                &lt;action application="set"
      data="instant_ringback=true" /&gt;
      <br>
                &lt;action application="export"
      data="hold_music=/opt/freeswitch-share/moh/0/2_8.wav" /&gt;
      <br>
                &lt;action application="set"
data="transfer_ringback=file_string:///opt/freeswitch-share/moh/0/2_8.wav"/&gt;<br>
                &lt;action application="set"
      data="ringback=/opt/freeswitch-share/moh/0/2_8.wav"/&gt;
      <br>
      <br>
                &lt;!-- 3. Call to customer --&gt;
      <br>
                &lt;action application="set"
      data="hangup_after_bridge=true"/&gt;
      <br>
      <br>
                &lt;action application="bridge"
data="[leg_timeout=20]sofia/gateway/gw1/79262410000@wg1|[leg_timeout=20]sofia/gateway/gw1/79262411111@gw1"/&gt;<br>
                &lt;!-- Second try in 5 seconds --&gt;
      <br>
                &lt;action application="sleep" data="5000"/&gt;
      <br>
                &lt;action application="bridge"
data="[leg_timeout=20]sofia/gateway/gw1/79262410000@wg1|[leg_timeout=20]sofia/gateway/gw1/79262411111@gw1"/&gt;<br>
      <br>
                &lt;!-- 4. Bridge fail --&gt;
      <br>
                &lt;action application="playback"
data="/opt/freeswitch-share/fs_sounds/ru/connection_not_established.mp3"/&gt;<br>
                &lt;action application="hangup"/&gt;
      <br>
              &lt;/condition&gt;
      <br>
      &lt;/extension&gt;
      <br>
      <br>
      Thank All!
      <br>
    </div>
  </body>
</html>