Commit 181f1d3d authored by Johannes Barthel's avatar Johannes Barthel
Browse files

add more ugliness to fix issue with umlauts in bbb user names

parent aaffcc33
Pipeline #5796 passed with stage
in 2 minutes and 50 seconds
......@@ -22,6 +22,8 @@ class ModeratedMic:
if password is None:
raise ValueError("no password found in config")
self.fs_password = password
# connect to mongo
mongo = pymongo.MongoClient("127.0.1.1")
......@@ -32,7 +34,8 @@ class ModeratedMic:
self.fs.connect()
def _get_fs_member_id(self, caller_num, conference_id):
fs_conference = json.loads(self.fs.send("api conference {} json_list".format(conference_id)).data)[0]
fs_response = subprocess.check_output(["/opt/freeswitch/bin/fs_cli", "-H", "127.0.0.1", "-P", "8021", "-p", self.fs_password, "-x", "conference {} json_list".format(conference_id)]).decode("utf-8")
fs_conference = json.loads(fs_response)[0]
fs_member_id = [m["id"] for m in fs_conference["members"] if m["caller_id_number"] == caller_num][0]
return fs_member_id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment