[Freeswitch-users] how to close conference after playing audio files
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
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>
> 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">
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> Build your next product on our scalable cloud platform.
> Join our online community to chat in real time
> Professional FreeSWITCH Services
> sales at freeswitch.com
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-users