为什么选择SIP定时器T4的值为5秒?

Why the value of SIP timer T4 is chosen as 5 seconds?

在 RFC 3261 中,定时器 T4 定义为 "Maximum duration a message will remain in the network" 和 "T4 represents the amount of time the network will take to clear messages between client and server transactions"。

SIP 消息如何刷新或网络如何清除客户端和服务器事务之间的消息?

这些只是任意选择的值。 通常 5 秒对于全球的 UDP 来说就足够了,而且如果你的数据包延迟超过 5 秒,那么我们就不能再谈论实时 VoIP 了。 一些网络缓冲区可能会在它过期之前抛出它。

很多 SIP 堆栈并没有如此严格地实现这些计时器(当然大多数 sip 实现不是实时 运行 OS)。