我正在使用Starpy来自动化Asterisk。一切正常,但有时候我会收到一个150,其中Asterisk无法发起呼叫。
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/starpy/manager.py", line 154, in lineReceived
self.dispatchIncoming() # does dispatch and clears cache
File "/usr/local/lib/python2.7/dist-packages/starpy/manager.py", line 242, in dispatchIncoming
callback(message)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 362, in callback
self._startRunCallbacks(result)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 458, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/starpy/manager.py", line 348, in errorUnlessResponse
raise error.AMICommandFailure(message)
starpy.error.AMICommandFailure: {'message': 'Originate failed', 'response': 'Error', 'actionid': '53345672-2'}
根据我的研究,当被叫方未接听电话时会发生此错误。但是,我不相信并且正在寻找有关“起源失败”原因的更多细节。我想在开始拨号之前监控频道,但它不起作用。在被叫方应答呼叫后,需要调用频道监视器。
如果您有任何建议,请与我们联系。
感谢。
答案 0 :(得分:0)
使用tcpdump或其他类似工具查看完整的星号发送内容
在修复了那个库之后,非常喜欢它只是有bug。