HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
388 HP-UX C SIP Stack Programmer’s Guide
Changing the Top Via Header of the Message
CHANGING THE TOP
V
IA HEADER OF THE
M
ESSAGE
The SIP Stack automatically handles the top Via header of its outgoing requests.
After the destination address is resolved and the local address that will be used is
known, the transmitter responsible for sending the request places this local
address in the “sent-by” parameter of the top-most Via header. In some cases,
the application does not want to reveal the address from where a request was
sent. Since this information is part of the “sent-by” parameter of the Via header,
the application must change this parameter. This task can be accomplished only
in the RvSipXXXFinalDestResolvedEv() callback implementation that can be
found on each of the SIP Stack layers. The application can override the “sent-
by” information that the transmitter placed and this new information will be sent
to the remote party. Note that the application must not change the Via header
branch or transport parameters.
TIMER
C
ONFIGURATION
The SIP Stack provides API functions to control the timer values of the
transaction and the number of retransmissions during runtime. You can use
these API functions to set timer values to a transaction different than the one
that was configured. To set new timer values, you should fill the RvSipTimers
structure and set it to the object that holds the transaction you wish to control.
You may set values in the RvSipTimers structure to –1, so the configured value
will be taken instead.
The following API functions are supplied:
RvSipTransactionSetTimers()
Sets the timers in a transaction. You can use this function to set timers to an
outgoing transaction before sending the request, and to set timers to an
incoming transaction in the RvSipTransactionCreatedEv() callback.
RvSipCallLegSetTranscTimers()
Sets the timer values in a call-leg. Setting timers in a call-leg effects all the
transactions that this call-leg handles. If you want the timers to influence all
call-leg transactions, you should set them on call-leg creation (after calling
RvSipCallLegMgrCreateCallLeg() for an outgoing call-leg, and in the
RvSipCallLegCreateEv() callback for an incoming call-leg).