This XML code performs a few actions:

  • Sets the timeLimit attribute, after which the member will be removed from the conference.
  • Sets hangupOnStar to true, which enables the user to leave a conference by pressing the * key.
  • Specifies a Redirect element, so that after the member leaves the room, the redirect URL is invoked.
from plivo import plivoxml

response = plivoxml.ResponseElement()
response.add(
    plivoxml.ConferenceElement('My Room', hangup_on_star=True, time_limit=30))
response.add(plivoxml.RedirectElement('https://<yourdomain>.com/redirect/'))

print(response.to_string())
Response
<Response>
  <Conference hangupOnStar="true" timeLimit="30">My Room</Conference>
  <Redirect>https://<yourdomain>.com/redirect/</Redirect>
</Response>