In the response to your REGISTER
, you should get an Expires
header (you can send one too). You should send another REGISTER
request before the expiry time. This should keep you registered in a typical scenario. The server itself shouldn't lose your registration, even if it restarts. If it really doesn't persist the data then there's not much you can do about it. Your registration will be refreshed close to the next expiry time.
As usual - if in doubt, read the RFC:
10.3 Processing REGISTER Requests
...
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.
This part should also explain some things: 10.2.1.1 Setting the Expiration Interval of Contact Addresses