Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after callee answer #90

Open
morfair opened this issue Jun 30, 2020 · 3 comments
Open

Error after callee answer #90

morfair opened this issue Jun 30, 2020 · 3 comments

Comments

@morfair
Copy link

morfair commented Jun 30, 2020

Python 3.7
call = await _AMI_MANAGER.send_action({...})

DEBUG:panoramisk.manager:message interpreted: <Message ActionID='action/0db9ad0a-4f02-4cb2-b8e3-65b78ff88291/1/7' Message='Originate successfully queued' Response='Success' content=''>
ERROR:asyncio:Fatal error: protocol.data_received() call failed.
protocol: <panoramisk.ami_protocol.AMIProtocol object at 0x7f26e91954a8>
transport: <_SelectorSocketTransport fd=6 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 824, in _read_ready__data_received
    self._protocol.data_received(data)
  File "/usr/local/lib/python3.7/site-packages/panoramisk/ami_protocol.py", line 72, in data_received
    self.handle_message(message)
  File "/usr/local/lib/python3.7/site-packages/panoramisk/ami_protocol.py", line 79, in handle_message
    if response.add_message(message):
  File "/usr/local/lib/python3.7/site-packages/panoramisk/actions.py", line 88, in add_message
    multi = self.multi
  File "/usr/local/lib/python3.7/site-packages/panoramisk/actions.py", line 69, in multi
    elif msg.endswith('successfully queued') and self['async'] != 'false':
  File "/usr/local/lib/python3.7/site-packages/panoramisk/utils.py", line 179, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'async'
ERROR:panoramisk.manager:Connection lost
INFO:panoramisk.manager:Try to connect again in 2 seconds
@romkazor
Copy link
Contributor

show full await _AMI_MANAGER.send_action({...})

@morfair
Copy link
Author

morfair commented Jun 30, 2020

@romkazor

call = await _AMI_MANAGER.send_action({
 "Action": "Originate",
 "Channel": f"Local/{number}@pstn",
 "Context": "deptors_calling",
 "Exten": "say",
 "Priority": 1,
 "CallerID": cid,
 "Timeout": CALL_TIMEOUT,
 "Variable": f"debt={debt}",
})

@romkazor
Copy link
Contributor

try to add 'Async': 'true'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants