From 08d7dc585b8735b71d41b13fdf2bb1795be49571 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 18 Jun 2010 13:47:45 +0000 Subject: [PATCH] - add sippeers and sipshowpeer git-svn-id: https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/trunk@10 01a3061f-1c3a-49da-a2a0-fa5697faa6a0 --- asterisk/manager.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/asterisk/manager.py b/asterisk/manager.py index 4ca65d6..e4870b6 100644 --- a/asterisk/manager.py +++ b/asterisk/manager.py @@ -445,6 +445,7 @@ class Manager(object): self._running.clear() +# Manager actions def login(self, username, secret): """Login to the manager, throws ManagerAuthException when login falis""" @@ -579,6 +580,18 @@ class Manager(object): 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 ManagerSocketException(ManagerException): pass class ManagerAuthException(ManagerException): pass