在对你的回复中REGISTER
,你应该得到一个Expires
标题(你也可以发送一个)。REGISTER
您应该在到期时间之前发送另一个请求。这应该让您在典型场景中注册。服务器本身不应该丢失您的注册,即使它重新启动。如果它真的不能持久化数据,那么你就无能为力了。您的注册将在下一个到期时间附近刷新。
像往常一样 - 如果有疑问,请阅读RFC:
10.3 处理 REGISTER 请求
...
7. The registrar now processes each contact address in the Contact
header field in turn. For each address, it determines the
expiration interval as follows:
- If the field value has an "expires" parameter, that value
MUST be taken as the requested expiration.
- If there is no such parameter, but the request has an
Expires header field, that value MUST be taken as the
requested expiration.
- If there is neither, a locally-configured default value MUST
be taken as the requested expiration.
这部分还应该解释一些事情:10.2.1.1 Setting the Expiration Interval of Contact Addresses