SIP注册流程

SIP registration process

要通过voip 拨打电话,用户需要先注册。所以注册是强制性的。我对注册过程有一些基本的了解。用户向服务器发送 REGISTER 请求,过期 header 值为 30 秒。服务器收到用户的请求后,它会发送过期 header 值为 120 秒的响应。用户需要在到期 header 时间段结束之前或 60 秒之前再次注册。注册完成后,注册服务器将在位置服务器中发送用户的 uri 和位置。因此用户的位置将存在于位置服务器中。如果位置服务器有用户的位置,那么为什么用户需要在时间段结束之前重新注册。而用户只需要在时间段之前 re-register 一次或多次??用户 ip 将在位置服务器中存在多长时间?

发送有效的 REGISTER 后,SIP 注册器会为该用户创建绑定并将其存储为“记录地址”,

这通常至少包含 SIP URI、public IP 及其过期时间,即当前时间 + SIP 过期时间 header。 This is referred to as "Adding a Binding" in the RFC.

在达到其过期时间后,记录地址将不再有效,通常会被删除/删除。注册是软状态,除非刷新,否则会过期。

如果在达到到期时间之前收到另一个有效的注册,则刷新 SIP 注册器上的记录地址以反映新的到期时间。 This is called "Refreshing a Binding" in the RFC.

所以回答你的问题:

how long the users ip will be present in location server??

直到收到最后一个有效的 REGISTER + REGISTER 的到期时间。

And user needs to re-register only once before the time period or multiple times?? A user only needs to send another valid REGISTER once before the binding expires to keep the binding in there as an Address of Record.

进一步阅读: