Skip to main content
This code dials the extension 2410 at the number 15671234567. The Number element describes the phone number and gives it the sendDigits attribute. To dial the extension a couple of seconds after the number is dialed, we add a few leading w characters, telling Plivo to wait 0.5 seconds for each w.
from plivo import plivoxml

response = plivoxml.ResponseElement()
response.add(plivoxml.DialElement().add(
    plivoxml.NumberElement('12025551111', send_digits='wwww2410')))
print(response.to_string())
Response
<Response>
    <Dial>
      <User>sip:alice1234@phone.plivo.com</User>
      <Number>15671234567</Number>
      <User>sip:john1234@phone.plivo.com</User>
    </Dial>
</Response>
I