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.

from plivo import plivoxml

response = 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())
Response
<Response>
	<Conference startConferenceOnEnter="false" waitSound="https://<yourdomain>.com/waitmusic/">My Room</Conference>
</Response>

XML for the moderator:

Response
<Response>
	<Conference startConferenceOnEnter="true" endConferenceOnExit="true">My Room</Conference>
</Response>