1. Register demo twilio.com account.

https://www.twilio.com/try-twilio

2. Login the account, get account_sid and auth_token.

3. Install twilio-python

opkg update
opkg install python-openssl
opkg install distribute
easy_install twilio
nano /mnt/sda1/twiliocall.py
#!/usr/bin/python
from twilio.rest import TwilioRestClient
account_sid = "ACXXXXXXXXXXXXXXXXX"
auth_token  = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(account_sid, auth_token)
call = client.calls.create(to="+12125551212",from_="+12125551212",url="http://twimlets.com/holdmusic?Bucket=com.twilio.music.guitars")
print call.sid

from_="+12125551212" should be your twilio number.

chmod 755 /mnt/sda1/twiliocall.py
/mnt/sda1/twiliocall.py

 

Comments powered by CComment