Skip to main content
This code calls the 2410 extension at sip:[email protected]. The User element describes the SIP endpoint and gives it the attribute sendDigits. 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.UserElement(
        'sip:[email protected]', send_digits='wwww2410')))
print(response.to_string())
Response
<Response>
    <Dial>
        <User sendDigits="wwww2410">sip:[email protected]</User>
    </Dial>
</Response>