Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
torrez committed Apr 4, 2012
0 parents commit 98ef842
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
21 changes: 21 additions & 0 deletions conference.py
@@ -0,0 +1,21 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from twilio.rest import TwilioRestClient
from twilio.rest.resources import Conferences
import settings


client = TwilioRestClient(settings.API_KEY, settings.API_TOK)

parser = argparse.ArgumentParser(description='Call some people for a conference. Be sure you’ve set up your Twilio dealio.')
parser.add_argument('numbers', metavar='N', type=str, nargs='+',
help='Phone numbers to call into a conference.')

args = parser.parse_args()
numbers = vars(args)['numbers']

for number in numbers:
call = client.calls.create(to=number,
from_=settings.FROM_NUMBER,
url=settings.CONFERENCE_URL)
17 changes: 17 additions & 0 deletions settings.example.py
@@ -0,0 +1,17 @@
API_KEY = "" #FROM TWILIO
API_TOK = "" #FROM TWILIO
FROM_NUMBER = "+12125551212" #Your Twilio number
CONFERENCE_URL = "http://torrez.org/conference"
#put a URL here that will respond to a POST with:
#
# <?xml version="1.0" encoding="UTF-8"?>
# <Response>
# <Say>Joining a conference room</Say>
# <Dial>
# <Conference>My Room</Conference>
# </Dial>
# </Response>
#
# Feel free to use my URL for as long as
# I can remember not to delete it.
#

0 comments on commit 98ef842

Please sign in to comment.