<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>
<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/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/freeswitch-share/moh/0/2_8.wav" />
<br>
<action application="set"
data="transfer_ringback=file_string:///opt/freeswitch-share/moh/0/2_8.wav"/><br>
<action application="set"
data="ringback=/opt/freeswitch-share/moh/0/2_8.wav"/>
<br>
<br>
<!-- 3. Call to customer -->
<br>
<action application="set"
data="hangup_after_bridge=true"/>
<br>
<br>
<action application="bridge"
data="[leg_timeout=20]sofia/gateway/gw1/79262410000@wg1|[leg_timeout=20]sofia/gateway/gw1/79262411111@gw1"/><br>
<!-- Second try in 5 seconds -->
<br>
<action application="sleep" data="5000"/>
<br>
<action application="bridge"
data="[leg_timeout=20]sofia/gateway/gw1/79262410000@wg1|[leg_timeout=20]sofia/gateway/gw1/79262411111@gw1"/><br>
<br>
<!-- 4. Bridge fail -->
<br>
<action application="playback"
data="/opt/freeswitch-share/fs_sounds/ru/connection_not_established.mp3"/><br>
<action application="hangup"/>
<br>
</condition>
<br>
</extension>
<br>
<br>
Thank All!
<br>
</div>
</body>
</html>