Created
September 10, 2014 16:29
-
-
Save jfinstrom/97c4d151c259d9d26d28 to your computer and use it in GitHub Desktop.
Snippit I use to poke around on the Asterisk ARI this changes based on endpoint and data model...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import requests | |
from requests.auth import HTTPBasicAuth | |
IPADD='192.168.0.32:8088/ari/' | |
ENDPOINT = 'events' | |
ARIUSER='' | |
ARIPASS='' | |
r = requests.get('http://%s%s' % (IPADD,ENDPOINT),auth=HTTPBasicAuth(ARIUSER,ARIPASS)) | |
results = r.text | |
#results = r.json() | |
print results | |
#for r in results: | |
#print "Device: %s Status is %s" % (r['resource'],r['state']) |
semerkin
commented
Sep 26, 2016
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment