MultiPartyCall
Conference
AudioStream
- Overview
- Initiate an audio stream
- Stream events to Plivo
Dial
GetDigits
PreAnswer
Redirect
Speak
Play a message
In this first example, when a call is directed to this example XML document, the caller will hear “Go Green, Go Plivo” spoken once.
Example Request
Copy
Ask AI
from plivo import plivoxml
response = (plivoxml.ResponseElement()
.add(plivoxml.SpeakElement('Go Green, Go Plivo.')))
print(response.to_string())
Copy
Ask AI
from plivo import plivoxml
response = (plivoxml.ResponseElement()
.add(plivoxml.SpeakElement('Go Green, Go Plivo.')))
print(response.to_string())
Copy
Ask AI
from flask import Flask, Response, request
import plivoxml
app=Flask(__name__)
@app.route('/speak/play_message/', methods=['GET','POST'])
def play_message():
response = plivoxml.Response()
response.addSpeak("Go Green, Go Plivo.")
return Response(str(response), mimetype='text/xml')
if __name__ == "__main__":
app.run(host='0.0.0.0', debug=True)
# Sample Conference XML
# <Response>
# <Speak>Go Green, Go Plivo.</Speak>
# </Response>
Response
Copy
Ask AI
<Response>
<Speak>Go Green, Go Plivo.</Speak>
</Response>
Assistant
Responses are generated using AI and may contain mistakes.