Commit 4841ab42 authored by okhin's avatar okhin
Browse files

COrrectling cathing the Hangup event

parent 0675c446
Pipeline #766 passed with stage
in 4 seconds
......@@ -216,7 +216,7 @@ class Call(object):
actions = {'Created': 'call_caller'
, 'ChannelStateChange': 'change'
, 'ChannelDtmfReceived': 'dtmf'
, 'Hangup': 'hangup'}
, 'ChannelHangupRequest': 'hangup'}
def __init__(self, caller, callee, owner, callid=None, db=None):
......@@ -472,7 +472,6 @@ def originate(db, callid=None):
abort(400, "Missing or incorrect fields, the call cannot be processed")
def static_files(filepath):
......@@ -481,14 +480,19 @@ def static_files(filepath):
return static_file(filepath, root='./views')
def little_admin(db):
# We need to check if we're admin
requests = db.execute('SELECT admin FROM users WHERE api = ?', (request.params['api']));
admin = admin.fetchall()
if admin[0] is not True:
abort(403, "You need to have an admin access")
users = db.execute('SELECT api, token, admin FROM users').fetchall()
return template('index', users=users)'/admin')
def medium_admin(db):
api = request.forms.get('api')
token = request.forms.get('token')
Supports Markdown
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