AGI からアスタリスク サーバーを呼び出そうとしています。私の AGI は基本的に、アスタリスク サーバーとの通信にアスタリスク-java.jar ライブラリを使用する Java コードです。アスタリスク サーバーとの接続を開き、いくつかのコマンドを実行したところ、サーバーから正しい応答が得られました。さて、次のコードを使用して、アスタリスクサーバーに電話をかけようとすると
OriginateAction act = new OriginateAction();
act.setChannel ("IAX2/3002");
act.setContext ("default");
act.setExten ("3002");
act.setPriority (new Integer(1));
act.setAsync (true);
act.setTimeout(3000l);
return mc.sendAction(act);
serverCLI で次のようになりました。
== Manager 'salman' logged on from 127.0.0.1
[Sep 12 19:39:14] NOTICE[12093]: channel.c:5619 __ast_request_and_dial: Unable to request channel IAX2/3002
== Manager 'salman' logged off from 127.0.0.1
「チャネル IAX2/3002 を要求できません」と表示されるのはなぜですか? manager.conf を構成し、extensions.conf にダイヤルプランを設定し、iax.conf でユーザーを作成しました。助けてください!
私の manager.conf ファイル:
[general]
enabled = yes
;webenabled = yes
port = 5038
bindaddr = 0.0.0.0
[salman]
secret=salman
permit=0.0.0.0/0.0.0.0
read=all
write=all
私の extension.conf ファイル:
[general]
static=yes
writeprotect=yes
clearglobalvars=no
autofallthrough=yes
priorityjumping=no
[default]
exten => 3001,1,Answer()
exten => 3001,2,Playback(/home/salman/Test_sound_file/main_menu)
exten => 3001,3,Hangup()
そして私の Iax.conf ファイル:
[general]
bandwidth=medium
disallow=all
allow=alaw
trunkmaxsize=128000
trunkmtu=1240
iaxthreadcount=100
iaxmaxthreadcount=512
autokill=yes
trunkfreq=20
srvlookup=no
codecpriority=host
[3002]
type=friend
context=default
secret=3002
callerid=3002
requirecalltoken=no
host=dynamic
nat=yes
canreinvite=no
mailbox=1000@default