You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been experimenting with panoramisk lately, and I've discovered what I believe to be a bug, and also a potential solution for it. However, I'm opening an issue rather than a pull request since I'm by no means an expert in either panoramisk or asyncio.
The following statements:
action = actions.Command({'Action': 'AGI',
'Channel': agi['agi_channel'],
'Command': 'GET FULL VARIABLE ${PJSIP_HEADER(read,Call-ID)}'},
as_list=True)
res = await manager.send_action(action)
do not yield a result with code from the current git master. After digging a little, I found that in def completed(self) in actions.py, none of the conditions match the AsyncAGIExec event asterisk produces, and which carries the result. A patch as simple as:
--- a/panoramisk/actions.py
+++ b/panoramisk/actions.py
@@ -90,6 +90,8 @@
resp = self.responses[-1]
if resp.event.endswith('Complete'):
return True
+ elif resp.event in ('AsyncAGIExec'):
+ return True
elif resp.subevent in ('End', 'Exec'):
return True
elif resp.response in ('Success', 'Error', 'Fail', 'Failure'):
seems to fix that, but I'm not sure if that's the best approach here.
Here's the sequence of actions/events the send_action above triggers:
After the patch, the future contains two items in a list, the first holding the Message='Added AGI command to queue' and Response='Success' keys (this event doesn't show up in asterisk manager debug, wonder why), the second the contents of AsyncAGIExec event above, including the Result key which carries the information needed.
The text was updated successfully, but these errors were encountered:
Hello,
I've been experimenting with panoramisk lately, and I've discovered what I believe to be a bug, and also a potential solution for it. However, I'm opening an issue rather than a pull request since I'm by no means an expert in either panoramisk or asyncio.
The following statements:
do not yield a result with code from the current git master. After digging a little, I found that in
def completed(self)
inactions.py
, none of the conditions match theAsyncAGIExec
event asterisk produces, and which carries the result. A patch as simple as:seems to fix that, but I'm not sure if that's the best approach here.
Here's the sequence of actions/events the
send_action
above triggers:After the patch, the future contains two items in a list, the first holding the
Message='Added AGI command to queue'
andResponse='Success'
keys (this event doesn't show up in asterisk manager debug, wonder why), the second the contents ofAsyncAGIExec
event above, including theResult
key which carries the information needed.The text was updated successfully, but these errors were encountered: