Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi:~/virtualenvironment/my_new_app/bin
- sudo apt-get install libxslt
- sudo apt-get install libxml2
- pip install plivo
- (my_new_app) pi@raspberrypi:~/virtualenvironment/my_new_app/bin $ whereis libxslt
- libxslt: /usr/include/libxslt /usr/share/man/man3/libxslt.3.gz
- import sys,os
- sys.path.insert(0, '/usr/include')
- sys.path.append('/usr/include')
- import plivo, plivoxml
- auth_id = "Your AUTH_ID"
- auth_token = "Your AUTH_TOKEN"
- p = plivo.RestAPI(auth_id, auth_token)
- params = {
- 'to': '2222222222', # The phone numer to which the call will be placed
- 'from' : '1111111111', # The phone number to be used as the caller id
- # answer_url is the URL invoked by Plivo when the outbound call is answered
- # and contains instructions telling Plivo what to do with the call
- 'answer_url' : "https://s3.amazonaws.com/static.plivo.com/answer.xml",
- 'answer_method' : "GET", # The method used to call the answer_url
- # Example for asynchronous request
- # callback_url is the URL to which the API response is sent.
- #'callback_url' => "http://myvoiceapp.com/callback/",
- #'callback_method' => "GET" # The method used to notify the callback_url.
- }
- # Make an outbound call and print the response
- response = p.make_call(params)**Error:**
- Python 2.7.13 (default, Jan 19 2017, 14:48:08)
- [GCC 6.3.0 20170124] on linux2
- Type "copyright", "credits" or "license()" for more information.
- >>>
- ===== RESTART: /home/pi/virtualenvironment/my_new_app/bin/make_calls.py =====
- Traceback (most recent call last):
- File "/home/pi/virtualenvironment/my_new_app/bin/make_calls.py", line 4, in <module>
- import plivo, plivoxml
- ImportError: No module named plivoxml
- >>>
Add Comment
Please, Sign In to add comment