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

MomoSxp at hotmail.com MomoSxp at hotmail.com
Thu Feb 20 19:48:11 UTC 2020

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">
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200220/caf5e576/attachment.html>

More information about the FreeSWITCH-users mailing list