I'm writing a small program to check my voicemail and email the recording to me at set intervals. Here's the python code for the call portion, at least up to testing basic call & AUDIX option tree navigation once the call connects:
from twilio.rest import TwilioRestClient
# put your own credentials here
ACCOUNT_SID = ""
AUTH_TOKEN = ""
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
ext = ""
ext_passwd = ""
digs = "wwwwww#ww" + ext + "wwww" + ext_passwd + "#wwwwww2"
call = client.calls.create(
to="+",
from_="+",
url="",
send_digits=digs,
record="true"
)
print call.sid
The url
parameter is required, and it seems the target has to be TwiML containing a reference to an audio file that will play when the call connects. I want a silent call, at least from that end, and just to send the digits necessary to navigate my voice mail.
I assume I'm missing something? Or do I really need to host a TwiML file, and reference an "empty" mp3 with a second or two of silence in it?