def invite_member(self, invite_callerid, invite_route, confno, phonenumber): if not (IsInt(confno)): return None if not (IsInt(phonenumber)): return None channel = invite_route + phonenumber context = "meetme_context" extension = confno priority = "1" application = None data = None #application = "MeetMe"; #data = confno+",dT"; timeout = "30000" variable = "" account = "" async = True try: manager = Manager(*Config().get_connection()) action_result = manager.Originate(channel, context, extension, priority, application, data, timeout, invite_callerid, variable, account, async) except: raise
def main2(): manager = MyManager(*Config().get_connection()) try: print '#', repr(manager) print manager.serve_forever() except KeyboardInterrupt, e: raise SystemExit
def kick_member(self, confno, usernumber): if not (IsInt(confno)): return None try: manager = Manager(*Config().get_connection()) print "meetme kick " + str(confno) + " " + str(usernumber) action_result = manager.Command("meetme kick " + str(confno) + " " + str(usernumber)) except: return None
def conference_member(self, confno): if (sample): obj_list = [] for i in range(1, random.randrange(9, 10)): obj_conf_list = self.create_member(i) obj_list.append(obj_conf_list) return obj_list if not (IsInt(confno)): return None try: manager = Manager(*Config().get_connection()) conflist = manager.Command("meetme list " + str(confno) + " concise") except: #print "There is an error!" return None else: obj_list = [] for x, val in enumerate(conflist): if (val.find('!') <> -1): sp_list = val.split('!') obj_conf_list = dict() obj_conf_list['callerno'] = sp_list[0] obj_conf_list['cid_number'] = sp_list[1] obj_conf_list['cid_name'] = sp_list[2] obj_conf_list['channel'] = sp_list[3] obj_conf_list['user_type'] = sp_list[4] obj_conf_list['monitor'] = sp_list[5] obj_conf_list['muted'] = sp_list[6] obj_conf_list['floor'] = sp_list[7] obj_conf_list['istalking'] = sp_list[8] obj_conf_list['callduration'] = sp_list[9] obj_list.append(obj_conf_list) return obj_list
def conference_list(self): if (sample): obj_list = [] obj_conf_list = dict() obj_conf_list['confno'] = '400' obj_conf_list['member'] = str(random.randrange(1, 10)) obj_conf_list['activity'] = '1' obj_list.append(obj_conf_list) obj_conf_list = dict() obj_conf_list['confno'] = '5000' obj_conf_list['member'] = str(random.randrange(1, 10)) obj_conf_list['activity'] = '1' obj_list.append(obj_conf_list) return obj_list try: manager = Manager(*Config().get_connection()) conflist = manager.Command("meetme list concise") except: #print "There is an error!" return None else: obj_list = [] for x, val in enumerate(conflist): if (val.find('!') <> -1): sp_list = val.split('!') obj_conf_list = dict() obj_conf_list['confno'] = sp_list[0] obj_conf_list['member'] = sp_list[1] obj_conf_list['activity'] = sp_list[1] obj_list.append(obj_conf_list) return obj_list
def __init__(self): CoreManager.__init__(self, *Config().get_connection())