[Freeswitch-users] how to close conference after playing audio files
momosxp at hotmail.com
Fri Feb 21 14:04:04 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
<condition field="destination_number" expression="^playconf$">
<action application="conference_set_auto_outcall" data="user/1001"/>
<action application="conference_set_auto_outcall" data="user/1002"/>
<action application="conference" data="hup all">
i tried looking for the event PLAYBACK_START and PLAYBACK_STOP, but they
wont appear when using conferences.
there are events for conferences like play-file and play-file-done:
Table: Conference Events
But only the clients seem to receive the events.
Is there a way to make a dialplan for a conference that will close the
conference on the condition that an audio file is finished playing? (the
last one of multiple files)
Or is there a way to receive the conference events with the
Sent from: http://freeswitch-users.2379917.n2.nabble.com/
More information about the FreeSWITCH-users