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

130 HP-UX C SIP Stack Programmers Guide
Working with Handles
SINGLE-USER VERSUS MULTI-USER APPLICATIONS
By default, the Register-ClientMgr owns all the register-clients. The Register-
ClientMgr is responsible for generating a Call-ID once and supplying it to all its
register-clients. The Register-ClientMgr is also responsible for the CSeq-Step
counter. Each register-client will receive the CSeq-Step current count from the
Register-ClientMgr immediately before sending a new REGISTER request. The
Register-ClientMgr will increase the CSeq-Step count each time a new
REGISTER request is sent by one of its register-clients.
This mode of action is suitable for single user applications that register to a
single registrar. When an application registers several users to different
registrars, each of the register-clients needs to have its own Call-ID and to
manage its own CSeq step. For this, the register client object needs to detach
from its manager after its creation. The SIP Stack supplies API functions for
detaching a register-client from the Register-ClientMgr. In this chapter, register-
clients that detached from the Register-ClientMgr are referred to as stand-alone
register-clients. You can either set a Call-ID for a stand-alone register-client or
the register-client will generate one for you. A stand-alone register-client will
also manage its own CSeq step counter and increase it for every outgoing
REGISTER request.
For more information, see the RvSipRegClientDetachFromMgr() function in the
SIP Stack Reference Guide.
WORKING WITH
HANDLES
All register-clients and the Register-ClientMgr are identified using handles.
You must supply these handles when using the Register-Client API.
RvSipRegClientMgrHandle defines the Register-ClientMgr handle. You receive
this handle by calling RvSipStackGetRegClientMgrHandle().
RvSipRegClientHandle defines a register-client handle. You receive this handle
from RvSipRegClientMgrCreateRegClient().