Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- from xivo_auth_client import Client as Auth
- from xivo_confd_client import Client as Confd
- # Please add a web service user with acl confd.#
- username = "defined"
- password = "defined"
- auth = Auth('127.0.0.1', username=username, password=username, verify_certificate=False)
- token_data = auth.token.new('xivo_service', expiration=10)
- token = token_data['token']
- uuid = token_data['xivo_user_uuid']
- confd = Confd('localhost', verify_certificate=False, token=token)
- for line_sip in confd.endpoints_sip.list()['items']:
- id = line_sip['id']
- value = {'id': id,
- 'options': [
- ['dtmfmode', 'info']
- ]
- }
- print "Update endpoint SIP ", id
- confd.endpoints_sip.update(value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement