def apiPolling(): if request.data: data = json.loads(request.data) state = voiceProxySettings.generateState() if request.method == 'POST': if 'cisPolling' in data['cisContext']: if 'sleepTime' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_SLEEP_TIME = data['cisContext'][ 'cisPolling']['sleepTime'] if 'URL' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_URL = data['cisContext'][ 'cisPolling']['URL'] if 'username' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_USERNAME = data['cisContext'][ 'cisPolling']['username'] if 'password' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_PASSWORD = data['cisContext'][ 'cisPolling']['password'] if request.method == 'PUT': if 'cisPolling' in data['cisContext']: if 'sleepTime' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_SLEEP_TIME = data['cisContext'][ 'cisPolling']['sleepTime'] if 'URL' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_URL = data['cisContext'][ 'cisPolling']['URL'] if 'username' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_USERNAME = data['cisContext'][ 'cisPolling']['username'] if 'password' in data['cisContext']['cisPolling']: voiceProxySettings.POLLING_PASSWORD = data['cisContext'][ 'cisPolling']['password'] if request.method == 'GET': state = voiceProxySettings.generateState() state = voiceProxySettings.generateState() resp_data = json.dumps(state, separators=(',', ':')) return Response(resp_data, mimetype='application/json', status=200)
def apiCustomerWait(): if request.data: data = json.loads(request.data) state = voiceProxySettings.generateState(); if request.method == 'POST': if 'cisCustomerWait' in data['cisContext']: voiceProxySettings.ALLOW_CUSTOMER_SET_WAIT = data['cisContext']['cisCustomerWait'] if request.method == 'PUT': if 'cisCustomerWait' in data['cisContext']: voiceProxySettings.ALLOW_CUSTOMER_SET_WAIT = data['cisContext']['cisCustomerWait'] if request.method == 'GET': state = voiceProxySettings.generateState(); state = voiceProxySettings.generateState(); resp_data = json.dumps(state, separators=(',',':')) return Response(resp_data, mimetype='application/json',status=200)
def apiWeblogging(): if request.data: data = json.loads(request.data) state = voiceProxySettings.generateState(); if request.method == 'POST': if 'cisWebLogging' in data['cisContext']: voiceProxySettings.WEB_LOGGING = data['cisContext']['cisWebLogging'] if request.method == 'PUT': if 'cisWebLogging' in data['cisContext']: voiceProxySettings.WEB_LOGGING = data['cisContext']['cisWebLogging'] if request.method == 'GET': state = voiceProxySettings.generateState(); state = voiceProxySettings.generateState(); resp_data = json.dumps(state, separators=(',',':')) return Response(resp_data, mimetype='application/json',status=200)
def apiBargin(): if request.data: data = json.loads(request.data) state = voiceProxySettings.generateState(); if request.method == 'POST': if 'cisBargein' in data['cisContext']: voiceProxySettings.BARGE_IN_ENABLED = data['cisContext']['cisBargein'] if request.method == 'PUT': if 'cisBargein' in data['cisContext']: voiceProxySettings.BARGE_IN_ENABLED = data['cisContext']['cisBargein'] if request.method == 'GET': state = voiceProxySettings.generateState(); state = voiceProxySettings.generateState(); resp_data = json.dumps(state, separators=(',',':')) return Response(resp_data, mimetype='application/json',status=200)
def apidtmf(): if request.data: data = json.loads(request.data) state = voiceProxySettings.generateState() if request.method == 'POST': if 'cisDTMF' in data['cisContext']: if 'enabled' in data['cisContext']['cisDTMF']: voiceProxySettings.DTMF_ENABLED = data['cisContext'][ 'cisDTMF']['enabled'] if request.method == 'PUT': if 'cisDTMF' in data['cisContext']: if 'enabled' in data['cisContext']['cisDTMF']: voiceProxySettings.DTMF_ENABLED = data['cisContext'][ 'cisDTMF']['enabled'] if request.method == 'GET': state = voiceProxySettings.generateState() state = voiceProxySettings.generateState() resp_data = json.dumps(state, separators=(',', ':')) return Response(resp_data, mimetype='application/json', status=200)