Commit cd1ccf75 authored by nextime's avatar nextime

Fixed asterisk actions in aliases

parent 9fec3c8e
...@@ -31,7 +31,7 @@ import os, logging, time, sys ...@@ -31,7 +31,7 @@ import os, logging, time, sys
from domotika.clouds.google import tts, speech from domotika.clouds.google import tts, speech
import tempfile import tempfile
from txscheduling.cron import CronSchedule, parseCronLine from txscheduling.cron import CronSchedule, parseCronLine
from dmlib.utils import genutils
log = logging.getLogger( 'FastAGI' ) log = logging.getLogger( 'FastAGI' )
...@@ -329,6 +329,8 @@ class CheckIn(BaseCheck): ...@@ -329,6 +329,8 @@ class CheckIn(BaseCheck):
def checkAlias(self, res): def checkAlias(self, res):
if res: if res:
alias=res alias=res
if genutils.isTrue(res.launch_voipaction):
self.core.manageAction(alias.voip_action_name)
return self.fagi.goTo(alias.contextto, alias.aliasto) return self.fagi.goTo(alias.contextto, alias.aliasto)
return self.close() return self.close()
...@@ -347,6 +349,8 @@ class CheckInternals(BaseCheck): ...@@ -347,6 +349,8 @@ class CheckInternals(BaseCheck):
def checkAlias(self, res): def checkAlias(self, res):
if res: if res:
alias=res alias=res
if genutils.isTrue(res.launch_voipaction):
self.core.manageAction(alias.voip_action_name)
return self.fagi.goTo(alias.contextto, alias.aliasto) return self.fagi.goTo(alias.contextto, alias.aliasto)
self.getAction() self.getAction()
......
...@@ -2734,6 +2734,9 @@ class domotikaService(service.Service): ...@@ -2734,6 +2734,9 @@ class domotikaService(service.Service):
def fagi_on_getTriggerWord(self): def fagi_on_getTriggerWord(self):
return str(self.config.get("voiceui", "triggerword")).lower() return str(self.config.get("voiceui", "triggerword")).lower()
def fagi_on_manageAction(self, action):
return dmdb.checkAsteriskActionByName(action).addCallback(self.manageAsteriskAction)
def fagi_on_getStopWord(self): def fagi_on_getStopWord(self):
return str(self.config.get("voiceui", "stopword")).lower() return str(self.config.get("voiceui", "stopword")).lower()
......
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