Install using pip
...
pip install sipuni-api
from sipuni_api import Sipuni
client = Sipuni('<user_id>', '<api_key>')
# create simple call
client.make_call(phone='79379992', sipnumber='201')
# create call tree
client.make_tree_call(phone='79379992', sipnumber='201', tree='000658610')
# create call external
client.make_external_call(from_phone='79379992', to_phone='79379993', first_sipnumber='201', second_sipnumber='204')
client.make_voice_call(phone='79379992', sipnumber='201', message='test 123', voice_type='Vladimir')
client.hangup_call(call_id='123456789.123')
# call statistic
from datetime import datetime, timedelta
client.get_call_stats(from_date=(datetime.now() - timedelta(days=1)), to_date=datetime.now()) # return csv data
# get call record
client.get_record('<record_id>') # return bytes
# get list of managers
client.get_managers()
- examples
- tests
MIT