Created
May 6, 2011 19:53
-
-
Save mattwilliamson/959656 to your computer and use it in GitHub Desktop.
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
scream_enterprise_id = 'deb1c7b8-5170-11e0-9d53-12313d0462df' | |
product_id = 'deb2e2ba-5170-11e0-9d53-12313d0462df' | |
from json_rpc import JsonRpcProxy | |
a = JsonRpcProxy('public-sandbox.teltech.local', 1919) | |
import csv | |
with open('scream.csv', 'w') as c_file: | |
c = csv.writer(c_file) | |
c.writerow(['address', 'type', 'call_id']) | |
calls = a.call_remote('call.find', {'filters':[['product_id', '=', '4ef0d924-5171-11e0-9d53-12313d0462df']], 'limit': 999999}) | |
# all = a.call_remote('endpoint.find', {'filters':[['is_deleted', '=', False]]}) | |
# all = a.call_remote('user.find', {'filters':[['is_deleted', '=', False]], 'properties':['address'], 'limit': 1}) | |
# all = a.call_remote('enterprise.find', {'filters':[['is_deleted', '=', False]]}) | |
for call in calls['results']: | |
# print call | |
participants = a.call_remote('call_participant.get', {'id': call['id']}) | |
if participants: | |
for participant in participants: | |
# print participant | |
c.writerow([participant['address'], participant['type'], call['id']]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment