<Response> <Speak>Please leave a message after the beep.</Speak> <Record action="https://example.com/handle-recording/" /></Response>
from plivo import plivoxmlresponse = plivoxml.ResponseElement()response.add(plivoxml.SpeakElement('Please leave a message after the beep.'))response.add(plivoxml.RecordElement(action='https://example.com/handle-recording/'))print(response.to_string())
<Response> <Speak> You've reached John's voicemail. Leave a message after the beep, press pound when finished. </Speak> <Record action="https://example.com/save-voicemail/" maxLength="120" finishOnKey="#" playBeep="true" /> <Speak>Thank you for your message. Goodbye.</Speak></Response>
from plivo import plivoxmlresponse = plivoxml.ResponseElement()response.add(plivoxml.SpeakElement( "You've reached John's voicemail. Leave a message after the beep."))response.add(plivoxml.RecordElement( action='https://example.com/save-voicemail/', max_length=120, finish_on_key='#', play_beep=True))response.add(plivoxml.SpeakElement('Thank you for your message. Goodbye.'))print(response.to_string())
<Response> <Record recordSession="true" callbackUrl="https://example.com/recording-ready/" /> <Speak>This call is being recorded for quality purposes.</Speak> <Dial> <Number>+14155551234</Number> </Dial></Response>
Notes:
Recording starts immediately and continues until the call ends