1
我有pyst LIB基本的Python AGI代碼:星號蟒蛇AGI問題
的extensions.conf
[from-internal]
exten => _.,1,answer()
exten => _.,2,AGI(test.py)
我有test.py在/ var/lib中/星/ AGI斌作爲
#!/usr/bin/python
import sys
import os
from agi import AGI
def test_call(agi = None,text = ""):
agi.say_alpha(text, "#")
agi.hangup()
if __name__ == "__main__":
text = 'abcdefr'
agi = AGI()
test_call(agi,text)
和我有一個文件agi.py是從pyst庫獲得。
當我嘗試打電話到該AGI我得到這個問題
Executing [[email protected]:1] Answer("SIP/12345-00000016", "") in new stack
[Mar 14 00:01:29] NOTICE[2790]: res_rtp_asterisk.c:2358 ast_rtp_read: Unknown RTP codec 126 received from '169.254.38.82:20338'
-- Executing [[email protected]:2] AGI("SIP/12345-00000016", "test.py") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/test.py
test.py: Failed to execute '/var/lib/asterisk/agi-bin/test.py': No such file or directory
-- Auto fallthrough, channel 'SIP/12345-00000016' status is 'UNKNOWN'
-- Executing [[email protected]:1] Hangup("SIP/12345-00000016", "") in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/12345-00000016'
我看到我在/ var/lib中/星/ AGI斌其中777許可文件。
請建議獲得這個基本的腳本工作。
感謝所有提前
我看到我在ubuntu服務器中丟失了一些軟件包。我已經將這個腳本移動到elastix服務器,它可以找到。但在Ubuntu服務器,我錯過了哪些軟件包? – voipmanvn 2013-03-13 18:11:47
你確定該文件位於正確的位置?因爲'沒有這樣的文件或目錄'告訴你它找不到文件。腳本是可執行的嗎? – jagsler 2013-03-13 19:03:04