[Freeswitch-users] Play hold music while try to call to customer
Dmitry Mordovin
d.mordovin at dwide.com
Wed Sep 14 03:17:47 MSD 2016
Hi,
Thank you David, your config sample help me!
DM
On 09/13/2016 06:25 PM, David Villasmil wrote:
> Hello,
>
> I got that. I think it might work :)
> Let him try it :)
>
> Something like:
>
> <extension name="Local_Extension">
> <condition field="destination_number" expression="^(9.*)$">
> <action application="pre_answer"/>
> <action application="playback" data="local_stream://moh"/>
> <action application="bridge"
> data="[leg_timeout=5]user/1001@${domain_name}"/>
> <action application="sleep" data="5000"/>
> <action application="bridge"
> data="[leg_timeout=5]user/1002@${domain_name}"/>
> <action application="playback"
> data="/opt/freeswitch-share/fs_sounds/ru/connection_not_established.mp3"/>
> <action application="hangup"/>
> </condition>
> </extension>
>
> David
>
> On Tue, Sep 13, 2016 at 4:19 PM, Don Hawkins
> <hawkins at hawkinsegroup.com <mailto:hawkins at hawkinsegroup.com>> wrote:
>
> He wants the second attempt to bride to be transparent and hold
> music to pay during the sleep time. Had to read it a few times,
> unfortunately can't help.
>
> Sincerely,
> Don Hawkins
>
> Sent from my NationPCS® Nexus 6.
>
>
> On Sep 13, 2016 9:18 AM, "David Villasmil"
> <david.villasmil.work at gmail.com
> <mailto:david.villasmil.work at gmail.com>> wrote:
>
> Hello,
>
> Not sure i understood you goal, but I receive the INVITE, and
> start sending moh until the call is answered, like this:
>
> <extension name="Local_Extension">
> <condition field="destination_number" expression="^(9.*)$">
> <action application="pre_answer"/>
> <action application="playback" data="local_stream://moh"/>
> <action application="bridge"
> data="user/${dialed_extension}@${domain_name}"/>
> <action application="hangup"/>
> </condition>
> </extension>
>
> You could do something similar.
>
> Regards,
>
> Dacud
>
>
>
> On Tue, Sep 13, 2016 at 3:56 PM, Dmitry Mordovin
> <d.mordovin at dwide.com <mailto:d.mordovin at dwide.com>> wrote:
>
> Hello,
>
> I can't figure out how to configure hold music to play
> from begin extension till customer answer.
> The problems is:
> - Hold music play while bridge calling to customer only
> and silence while sleep 5 sec before second try
> - Hold music begin play .wav from start each time when
> bridge switch to next route.
>
> 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)?
>
> My config:
>
> <extension name="srv_sctv">
> <condition field="destination_number"
> expression="^12345$">
>
> <!-- 1. Answer & welcome -->
>
> <action application="answer"/>
> <action application="set"
> data="continue_on_fail=true"/>
>
> <action application="playback"
> data="/opt/freeswitch-share/fs_sounds/ring_welcome.wav"/>
>
> <!-- 2. Setup hold music & other settings -->
> <action application="set"
> data="ignore_early_media=true" />
> <action application="set"
> data="instant_ringback=true" />
> <action application="export"
> data="hold_music=/opt/freeswitch-share/moh/0/2_8.wav" />
> <action application="set"
> data="transfer_ringback=file_string:///opt/freeswitch-share/moh/0/2_8.wav"/>
> <action application="set"
> data="ringback=/opt/freeswitch-share/moh/0/2_8.wav"/>
>
> <!-- 3. Call to customer -->
> <action application="set"
> data="hangup_after_bridge=true"/>
>
> <action application="bridge"
> data="[leg_timeout=20]sofia/gateway/gw1/79262410000 at wg1|[leg_timeout=20]sofia/gateway/gw1/79262411111 at gw1"/>
> <!-- Second try in 5 seconds -->
> <action application="sleep" data="5000"/>
> <action application="bridge"
> data="[leg_timeout=20]sofia/gateway/gw1/79262410000 at wg1|[leg_timeout=20]sofia/gateway/gw1/79262411111 at gw1"/>
>
> <!-- 4. Bridge fail -->
> <action application="playback"
> data="/opt/freeswitch-share/fs_sounds/ru/connection_not_established.mp3"/>
> <action application="hangup"/>
> </condition>
> </extension>
>
> Thank All!
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
> <http://www.freeswitchsolutions.com>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> <http://confluence.freeswitch.org>
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
> <http://www.freeswitchsolutions.com>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> <http://confluence.freeswitch.org>
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
> <http://www.freeswitchsolutions.com>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org <http://confluence.freeswitch.org>
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160914/e9b04432/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list