[Freeswitch-users] how to close conference after playing audio files

Sergey Safarov s.safarov at gmail.com
Fri Feb 21 07:57:52 UTC 2020


Think event "event_socket_library" able to catch "file_played" event.
Just execute "/events all" in fs_cli and looks event generated after file
played.

Then try catch this using "event_socket_library".

On Fri, Feb 21, 2020 at 5:11 AM MomoSxp at hotmail.com <MomoSxp at hotmail.com>
wrote:

> im trying to start a conference between a list of users, play a list of
> audio files and then close the conference. im using the
> event_socket_library in c++ and am doing the following:
>
> conference <uuid> dial user/user1
> conference <uuid> dial user/user2
> conference <uuid> dial user/user3
> in a loop:
> conference play <path_to_audio_file>
> conference hup all //will skip the stream and end the call, but i need to wait for the last playback to end.
>
> how do i know when the last file was played so i can close the conference?
> is there a way to do it programmatically? a dialplan script taking the
> users and the files and the conference name as parameters, starting and
> closing the conference automatically would be fine, too. doing this im not
> sure on how to play a file to a conference and closing it.
>
> i tried something like this: but its not playing the file and not closing
> the conference
>
> <extension name="extension-playconf">
>   <condition field="destination_number" expression="^playconf$">
>     <action application="answer"/>
>     <action application="conference_set_auto_outcall" data="user/1001"/>
>     <action application="conference_set_auto_outcall" data="user/1002"/>
>     <action application="playback" data="/home/freeswitch/regioaudio/audio.wav"/>
>     <action application="conference" data="hup all">
>   </condition></extension>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://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
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200221/b0e06dcb/attachment.html>


More information about the FreeSWITCH-users mailing list