- add sippeers and sipshowpeer

git-svn-id: https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/trunk@10 01a3061f-1c3a-49da-a2a0-fa5697faa6a0
develop
ralf 2010-06-18 13:47:45 +00:00
parent e7d849c7dd
commit 08d7dc585b
1 changed files with 13 additions and 0 deletions

View File

@ -445,6 +445,7 @@ class Manager(object):
self._running.clear() self._running.clear()
# Manager actions
def login(self, username, secret): def login(self, username, secret):
"""Login to the manager, throws ManagerAuthException when login falis""" """Login to the manager, throws ManagerAuthException when login falis"""
@ -579,6 +580,18 @@ class Manager(object):
return response return response
def sippeers(self):
cdict = {'Action' : 'Sippeers'}
response = self.send_action(cdict)
return response
def sipshowpeer(self, peer):
cdict = {'Action' : 'SIPshowpeer'}
cdict['Peer'] = peer
response = self.send_action(cdict)
return response
class ManagerException(Exception): pass class ManagerException(Exception): pass
class ManagerSocketException(ManagerException): pass class ManagerSocketException(ManagerException): pass
class ManagerAuthException(ManagerException): pass class ManagerAuthException(ManagerException): pass