HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
140 HP-UX C SIP Stack Programmer’s Guide
Register-Client Refresh Mechanism
REGISTER-CLIENT
R
EFRESH
M
ECHANISM
When a REGISTER request receives a 2xx class response, the register-client
assumes the REGISTERED state. This state indicates that the register-client is
registered with the requested Registrar according to its To, From, Expires and
Contact headers. The register-client is not terminated and remains in the
REGISTERED state until the application causes a change in the state of the
object.
The application can either terminate the register-client using the
RvSipRegClientTerminate() function, or refresh the object registration using the
RvSipRegClientRegister() function. Calling the RvSipRegClientRegister()
function causes the register-client to use internal data to begin a new registration
process.
A new REGISTER request is sent to the Registrar, containing the To, From,
Expires and Contact headers associated with the register-client. You can use the
refresh mechanism to change your registration information with the Registrar by
updating the expiration time-outs and adding new Contact headers to the list.
You can also use this mechanism to register with a different Registrar, by
changing the Registrar address before calling RvSipRegClientRegister().
If your application is running on low resources and you prefer the register-client
object to be terminated immediately after a successful registration, use the
RvSipRegClientTerminate() function as soon as you have been notified of the
REGISTERED state. This function frees the register-client but does not
terminate the registration with the Registrar.
REGISTER-CLIENT
M
ANAGER API
The Register-ClientMgr controls the SIP Stack collection of Register-Clients.
You use the Register-Client Manager API to set application callbacks with the
SIP Stack and to create new register-clients.
RvSipRegClientMgrCreateRegClient()
You can use RvSipRegClientMgrCreateRegClient() to create a new
register-client object.
RvSipRegClientMgrSetEvHandlers()
You use RvSipRegClientMgrSetEvHandlers() to set your register-client
associated event handler (callback function) pointers in the SIP Stack.
The Register-Client API declares prototypes for all Register-Client callback
functions. For example: