A caller may join a conference room “My Room” and hear wait music, but the conference doesn’t start until the moderator joins the conference.
If the moderator sets endConferenceOnExit to true, then when the moderator hangs up, the conference will end and each participant will also exit the conference.
fromplivoimportplivoxmlresponse=plivoxml.ResponseElement()response.add(plivoxml.ConferenceElement('My Room',start_conference_on_enter=False,wait_sound='https://<yourdomain>.com/waitmusic/'))print(response.to_string())# Next, XML for moderator with endConferenceOnExit set to true
moderator_response=plivoxml.ResponseElement()moderator_response.add(plivoxml.ConferenceElement('My Room',start_conference_on_enter=True,end_conference_on_exit=True))print(moderator_response.to_string())
varplivo=require('plivo');varresponse=plivo.Response();varparams={'startConferenceOnEnter':"false",'waitSound':"https://<yourdomain>.com/waitMusic/"};varconference_name="My Room";response.addConference(conference_name,params);console.log(response.toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="false" waitSound="https://<yourdomain>.com/waitMusic/">My Room</Conference>
</Response>
*//* Code to generate XML to be returned from url at waitSound */varplivo=require('plivo');varresponse=plivo.Response();varparams={'startConferenceOnEnter':"true",'endConferenceOnExit':"true"};varconference_name="My Room";response.addConference(conference_name,params);console.log(response.toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="true" endConferenceOnExit="true">My Room</Conference>
</Response>
*/
<?phprequire'../vendor/autoload.php';usePlivo\XML\Response;$response=newResponse();$params=array('startConferenceOnEnter'=>"false",'waitSound'=>"https://<yourdomain>.com/waitmusic/");$conference_name="My Room";$response->addConference($conference_name,$params);Header('Content-type: text/xml');echo($response->toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="false" waitSound="https://<yourdomain>.com/waitmusic/">My Room</Conference>
</Response>
*/?><?php/*Code to generate XML to be returned from url at waitSound*/require'../vendor/autoload.php';usePlivo\XML\Response;$response=newResponse();$params=array('startConferenceOnEnter'=>"true",'endConferenceOnExit'=>"true");$conference_name="My Room";$response->addConference($conference_name,$params);Header('Content-type: text/xml');echo($response->toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="true" endConferenceOnExit="true">My Room</Conference>
</Response>
*/?>
// Example for conference - moderated conferencepackagecom.plivo.api.xml.samples.conference;importcom.plivo.api.exceptions.PlivoXmlException;importcom.plivo.api.xml.Conference;importcom.plivo.api.xml.Response;importcom.plivo.api.xml.Speak;classModeratedConference{publicstaticvoidmain(String[]args)throwsPlivoXmlException{Responseresponse=newResponse().children(newSpeak("You will now be placed into a demo conference"),newConference("demo").endConferenceOnExit(true).startConferenceOnEnter(false).waitSound("https://<yourdomain>.com/waitmusic/"));System.out.println(response.toXmlString());}}
// Example for conference - moderated conferencepackagemainimport"github.com/plivo/plivo-go/v7/xml"funcmain(){response:=xml.ResponseElement{Contents:[]interface{}{new(xml.SpeakElement).SetContents("You will now be placed into a demo conference"),new(xml.ConferenceElement).SetEndConferenceOnExit(true).SetStartConferenceOnEnter(false).SetWaitSound("https://<yourdomain>.com/waitmusic/").SetContents("demo"),},}print(response.String())}
fromflaskimportFlask,Response,requestimportplivoxmlapp=Flask(__name__)@app.route('/conference/moderated/',methods=['GET','POST'])defmoderated_conference():response=plivoxml.Response()params={'startConferenceOnEnter':"false",'endConferenceOnExit':"true",'waitSound':"https://www.foo.com/waitmusic/"}conference_name="demo"# Conference Room name
response.addConference(conference_name,**params)returnResponse(str(response),mimetype='text/xml')if__name__=="__main__":app.run(host='0.0.0.0',debug=True)# Sample Conference XML
# <Response>
# <Speak>
# You will now be placed into a demo conference.
# This is brought to you by Plivo.
# To know more visit us at plivo.com
# </Speak>
# <Conference startConferenceOnEnter="false"
# endConferenceOnExit="true"
# waitSound="https://www.foo.com/waitmusic/">
# demo
# </Conference>
# </Response>
require'rubygems'require'plivo'includePlivoresponse=Response.new()params={'startConferenceOnEnter'=>"false",'waitSound'=>"https://www.foo.com/waitmusic/"}conference_name="My Room"response.addConference(conference_name,params)putsresponse.to_xml()=begin
Sample Output
<Response>
<Conference startConferenceOnEnter='false' waitSound='https://www.foo.com/waitmusic/'>My Room</Conference>
</Response>
=end=begin
Code to generate XML to be returned from url at waitSound
=endresponse=Response.new()params={'startConferenceOnEnter'=>"true",'endConferenceOnExit'=>"true"}conference_name="My Room"response.addConference(conference_name,params)putsresponse.to_xml()=begin
Sample Output
<Response>
<Conference endConferenceOnExit='true' startConferenceOnEnter='true'>My Room</Conference>
</Response>
=end
varplivo=require('plivo');varresponse=plivo.Response();varparams={'startConferenceOnEnter':"false",'waitSound':"https://www.foo.com/waitMusic/"};varconference_name="My Room";response.addConference(conference_name,params);console.log(response.toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="false" waitSound="https://www.foo.com/waitMusic/">My Room</Conference>
</Response>
*//* Code to generate XML to be returned from url at waitSound */varplivo=require('plivo');varresponse=plivo.Response();varparams={'startConferenceOnEnter':"true",'endConferenceOnExit':"true"};varconference_name="My Room";response.addConference(conference_name,params);console.log(response.toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="true" endConferenceOnExit="true">My Room</Conference>
</Response>
*/
<?phprequire'../vendor/autoload.php';usePlivo\Response;$response=newResponse();$params=array('startConferenceOnEnter'=>"false",'waitSound'=>"https://www.foo.com/waitmusic/");$conference_name="My Room";$response->addConference($conference_name,$params);Header('Content-type: text/xml');echo($response->toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="false" waitSound="https://www.foo.com/waitmusic/">My Room</Conference>
</Response>
*/?><?php/*Code to generate XML to be returned from url at waitSound*/require'../vendor/autoload.php';usePlivo\Response;$response=newResponse();$params=array('startConferenceOnEnter'=>"true",'endConferenceOnExit'=>"true");$conference_name="My Room";$response->addConference($conference_name,$params);Header('Content-type: text/xml');echo($response->toXML());/*
Sample Output
<Response>
<Conference startConferenceOnEnter="true" endConferenceOnExit="true">My Room</Conference>
</Response>
*/?>
// Example for conference - moderated conferencepackagemainimport"github.com/plivo/plivo-go/v7/xml"funcmain(){response:=xml.ResponseElement{Contents:[]interface{}{new(xml.SpeakElement).SetContents("You will now be placed into a demo conference"),new(xml.ConferenceElement).SetEndConferenceOnExit(true).SetStartConferenceOnEnter(false).SetWaitSound("https://<yourdomain>.com/waitmusic/").SetContents("demo"),},}print(response.String())}
Rate this page
🥳 Thank you! It means a lot to us!
×
Help Us Improve
Thank you so much for rating the page, we would like to get your input
for further improvements!