<Response>
  <PreAnswer>
    <Speak>This call will cost you $2 a minute.</Speak>
  </PreAnswer>
  <Speak>Hey, thanks for dropping by.</Speak>
</Response>

This example notifies the caller that the cost of the current call is $2 a minute.

Example Request

from plivo import plivoxml

response = plivoxml.ResponseElement()
response.add(plivoxml.PreAnswerElement().add(
    plivoxml.SpeakElement('This call will cost you $2 a minute.')))
response.add(plivoxml.SpeakElement('Hey, thanks for dropping by.'))
print(response.to_string())
<Response>
  <PreAnswer>
    <Speak>This call will cost you $2 a minute.</Speak>
  </PreAnswer>
  <Speak>Hey, thanks for dropping by.</Speak>
</Response>