HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

134 HP-UX C SIP Stack Programmers Guide
Register-Client API
RvSipRegClientMake()
After creating a register-client, you can use this function to set the To and From
headers and the contact and Registrar addresses in the register-client, and send
the REGISTER request. You can use this function if you have all the needed
fields in textual format.
RvSipRegClientRegister()
After creating a register-client and setting the To, From, Expires and Contact
headers and the Registrar address, you can use RvSipRegClientRegister() for
generating and sending the required REGISTER message to the Registrar.
RvSipRegClientAuthenticate()
If you receive 401 or 407 responses which indicate that the REGISTER request
was not authenticated by the Registrar, the register-client assumes the
UNAUTHENTICATED state. You can use RvSipRegClientAuthenticate() in the
UNAUTHENTICATED state to re-send the registration request with
authentication information.
RVSipRegClientTerminate()
Terminates a register-client and frees all its resources. After calling this
function, you can no longer reference the register-client. Note that the terminate
function does not send any messages to the Registrar, rather simply destructs the
object.
EVENTS The Register-Client API supplies several events, in the form of callback
functions, to which your application may listen and react. In order to listen to an
event, your application should first define a special function called the event
handler and then pass the event handler pointer to the Register-ClientMgr. When
an event occurs, the register-client calls the event handler function using the
pointer.
The following events are supplied with the Register-Client API:
RvSipRegClientStateChangedEv()
This event is probably the most useful of the events that the SIP register-client
reports. Through this function, you receive notifications of SIP register-client
state changes and the associated state change reason. You can then react to the