これは実際にはよくある問題です。
問題は RTP トランスポートにあります。ポート 5060 または 5080 でのシグナリングとは関係ありません。パケット自体は見えませんが、RTP タイムアウトが発生しています。アスタリスクのデフォルトの RTP タイムアウトは 30 秒です。
確認すべき点がいくつかあります。
- メディアを送信するエンドポイント (RTP ストリーム自体 - UDP ポート 10000 ~ 60000) がリモート ファイアウォールで許可されていることを確認します。
- リモート システムからすべての UDP RTP ポートを受け入れていることを確認してください。またはシグナリングなしでコールを受信します (ポート 5060-5080 で保護しています)。
前のコメンターが述べたように、NAT をチェックし、外部 IP が SIP パケットに正しく含まれていることを確認してください。必要に応じて、アスタリスク CLI で次のように入力します。
sip set debug on
次に、これに返信してデバッグの内容を貼り付けてください。さらに支援できます。
- アスタリスク内に rtpignoreversion 属性を設定することもできます。しかし、これは最後の手段としてのみお勧めします。上記の手順に従って、SIP トレースを貼り付けて、問題の原因を特定することをお勧めします。
もし私が賭け屋だったら - そして時々私は :-) - RTP (メディア) ストリームがそのサーバーとそれが通信しているエンドポイントの間で適切に渡されていないことをドーナツに賭けるでしょう. SIP トレースは問題の IP アドレスを表示し、おそらく、ファイアウォールを開いて上記のエンドポイントを許可するか、上記の UDP ポートを開いてそのサーバーへの RTP を開くように説得します。IPTABLES がオンになっている場合は、無効にしてテストします。繰り返しますが、SIP トレースは、正確な回答を得るために知る必要があるすべてを教えてくれます。
ログを確認した後に更新してください ----
あなたのルーティングスクリプトには、アスタリスクを希望する方法でバインドするために必要なフックがないように見えます...
このスクリプトを見てください - 私は過去にこれを使用しました。あなたの側でいくつかの変更が必要になりますが、それはあなたを動かすはずです...
明らかに、これはルーティング スクリプト全体ではありません。スクリプトの下部にあるルート定義の直前に配置されます...
また、アスタリスクがユーザー 3012 を認証できなかったという事実に気付きましたよね? 私はあなたがしたと仮定し、それはあなたの質問とは関係がありませんが、私は尋ねるべきだと思いました...
# ASTERISK HOOK - BEGIN
# media service number? (digits starting with *)
if ($rU=~"^\*[1-9]+") {
# we do provide access to media services only to our
# subscribers, who were previously authenticated
if (!is_from_local()) {
send_reply("403","Forbidden access to media service");
exit;
}
#identify the services and translate to Asterisk extensions
if ($rU=="*1111") {
# access to own voicemail IVR
seturi("sip:VM_pickup@ASTERISK_IP:ASTERISK_PORT");
} else
if ($rU=="*2111") {
# access to the "say time" announcement
seturi("sip:AN_time@ASTERISK_IP:ASTERISK_PORT");
} else
if ($rU=="*2112") {
# access to the "say date" announcement
seturi("sip:AN_date@ASTERISK_IP:ASTERISK_PORT");
} else
if ($rU=="*2113") {
# access to the "echo" service
seturi("sip:AN_echo@ASTERISK_IP:ASTERISK_PORT");
} else
if ($rU=~"\*3[0-9]{3}") {
# access to the conference service
# remove the "*3" prefix and place the "CR_" prefix
strip(2);
prefix("CR_");
rewritehostport("ASTERISK_IP:ASTERISK_PORT");
} else {
# unknown service
seturi("sip:AN_notavailable@ASTERISK_IP:ASTERISK_PORT");
}
# after setting the proper RURI (to point to corresponding ASTERISK extension),
# simply forward the call
t_relay();
exit;
}
# ASTERISK HOOK - END
# do lookup
if (!lookup("location")) {
# ASTERISK HOOK - BEGIN
# callee is not registered, so different to Voicemail
# First add the VM recording prefix to the RURI
prefix("VMR_");
# forward to the call to Asterisk (replace below with real IP and port)
rewritehostport("ASTERISK_IP:ASTERISK_PORT");
route(1);
# ASTERISK HOOK - END
exit;
}
# when routing via usrloc, log the missed calls also
setflag(2);
# arm a failure route in order to catch failed calls
# targeting local subscribers; if we fail to deliver
# the call to the user, we send the call to voicemail
t_on_failure("1");
route(1);
}
route[1] {
if (!t_relay()) {
sl_reply_error();
};
exit;
}
failure_route[1] {
if (t_was_cancelled()) {
exit;
}
# if the failure code is "408 - timeout" or "486 - busy",
# forward the calls to voicemail recording
if (t_check_status("486|408")) {
# ASTERISK HOOK - BEGIN
# First revert the RURI to get the original user in RURI
# Then add the VM recording prefix to the RURI
revert_uri();
prefix("VMR_");
# forward to the call to Asterisk (replace below with real IP and port)
rewritehostport("ASTERISK_IP:ASTERISK_PORT");
t_relay();
# ASTERISK HOOK - END
exit;
}