0
from asterisk.agi import *
agi = AGI()
agi.verbose("python agi started")
agi.record_file('/tmp/qwerty', timeout=10, format='gsm', escape_digits='0')
agi.hangup()
私はファイルに会話を書き込もうとしています。空のファイルが作成されます(サイズはゼロですが、書き込みは発生しません)。答えを解除した直後に接続が切断されます。アスタリスクはAGI(Python)経由で会話を録音しません
マイ拡張子:
[test_forcall]
exten => 111111,1,Answer()
exten => 111111,2,AGI(asteriskAgi)
阿木デバッグ:Golangの実現の動作
-- SIP/200-0000000c answered
-- Executing [[email protected]_forcall:1] Answer("SIP/200-0000000c", "") in new stack
-- Executing [[email protected]_forcall:2] AGI("SIP/200-0000000c", "asteriskAgi") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/asteriskAgi
<SIP/200-0000000c>AGI Tx >> agi_request: asteriskAgi
<SIP/200-0000000c>AGI Tx >> agi_channel: SIP/200-0000000c
<SIP/200-0000000c>AGI Tx >> agi_language: en
<SIP/200-0000000c>AGI Tx >> agi_type: SIP
<SIP/200-0000000c>AGI Tx >> agi_uniqueid: 1510050624.24
<SIP/200-0000000c>AGI Tx >> agi_version: 13.13.1~dfsg-4ubuntu1
<SIP/200-0000000c>AGI Tx >> agi_callerid: 200
<SIP/200-0000000c>AGI Tx >> agi_calleridname: RobotGalina
<SIP/200-0000000c>AGI Tx >> agi_callingpres: 0
<SIP/200-0000000c>AGI Tx >> agi_callingani2: 0
<SIP/200-0000000c>AGI Tx >> agi_callington: 0
<SIP/200-0000000c>AGI Tx >> agi_callingtns: 0
<SIP/200-0000000c>AGI Tx >> agi_dnid: unknown
<SIP/200-0000000c>AGI Tx >> agi_rdnis: unknown
<SIP/200-0000000c>AGI Tx >> agi_context: test_forcall
<SIP/200-0000000c>AGI Tx >> agi_extension: 111111
<SIP/200-0000000c>AGI Tx >> agi_priority: 2
<SIP/200-0000000c>AGI Tx >> agi_enhanced: 0.0
<SIP/200-0000000c>AGI Tx >> agi_accountcode:
<SIP/200-0000000c>AGI Tx >> agi_threadid: 139782415746816
<SIP/200-0000000c>AGI Tx >>
> 0x7f21cc003790 -- Probation passed - setting RTP source address to 127.0.0.1:8000
<SIP/200-0000000c>AGI Tx >> 200 result=1
<SIP/200-0000000c>AGI Rx << RECORD FILE "111" "gsm" "#" 10
<SIP/200-0000000c>AGI Tx >> 200 result=0 (timeout) endpos=0
は同様
残念ですが、タイムアウトはミリ秒単位の最大記録時間です。 – Vadim
はい、1000を使用しています – arheops