🚨 问题现象

呼叫到分机后秒断。

499 Edge Send Timeout


🔍 问题分析

错误含义

499 Edge Send Timeout 是 FreeSWITCH 特有的错误码,表示:

  • 分机返回 100 Trying 后超时
  • 呼叫在等待分机响应时超时挂断
  • 通常是由于分机端网络延迟导致

触发条件

1
2
3
4
5
6
7
8
9
10
11
┌─────────┐                ┌─────────┐
│ FS │──── INVITE ────>│ 分机 │
└─────────┘ └─────────┘
│ │
│<────── 100 Trying ─────────│ (分机收到请求)
│ │
│ (等待 180/183/200...) │
│ │
│ ⏱️ 超时 │ (网络延迟/分机未响应)
│ │
│<────── 499 Timeout ────────│

🛠️ 解决方案

方案一:调整超时时间

修改 SIP Profile 配置,延长超时等待时间:

1
2
# 编辑 SIP Profile 配置
vim /usr/local/freeswitch/conf/sip_profiles/internal.xml

找到并调整以下参数:

1
2
3
4
5
6
7
8
<!-- 呼叫超时设置(默认 30 秒) -->
<param name="session-timeout" value="180"/>

<!-- INVITE 超时(默认 30 秒) -->
<param name="max-proceeding" value="180"/>

<!-- 100 Trying 后的超时时间 -->
<param name="timer-B" value="32000"/>

重载配置:

1
fs_cli -x "sofia profile internal restart reloadxml"

方案二:检查分机网络

排查分机端网络问题:

1
2
3
4
5
6
7
8
# 测试分机网络连通性
ping <分机IP>

# 测试 SIP 端口(5060)
telnet <分机IP> 5060

# 查看分机注册状态
fs_cli -x "sofia status profile internal reg"

方案三:检查分机状态

确认分机是否正常注册并在线:

1
2
3
4
5
# 查看分机注册状态
fs_cli -x "sofia status profile internal reg <分机号>"

# 查看分机在线状态
fs_cli -x "show registrations"

方案四:检查防火墙

确认防火墙没有阻止 SIP 流量:

1
2
3
4
5
6
7
8
9
# 检查防火墙规则
sudo iptables -L -n

# 开放 SIP 端口(如果需要)
sudo iptables -I INPUT -p udp --dport 5060 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 5080 -j ACCEPT

# 开放 RTP 端口范围
sudo iptables -I INPUT -p udp --dport 16384:32768 -j ACCEPT

📊 相关配置参数

参数 默认值 说明
session-timeout 1800 会话超时时间(秒)
max-proceeding 100 最大 proceeding 状态数
timer-B 32000 INVITE 超时时间(毫秒)
timer-F 32000 响应超时时间(毫秒)
rtp-timeout-sec 300 RTP 超时时间(秒)

🔗 相关文档


© 2018–2026 小周周 · 使用 Stellar 构建

站内搜索

没有找到内容!