JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SIP API Developer's Guide     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

1.  SIP Overview

2.  Oracle Solaris SIP Internals

3.  Multithreading and URI Support

4.  SIP API Functions

Stack Initialization Function

Message Allocation Functions

SIP Header Addition Functions

SIP Request and Response Creation Functions

Header and Message Copying Functions

Header and Value Deleting Functions

Header Lookup Functions

Value Retrieval and Response Description Functions

SIP ID Generating Functions

VIA Functions

SIP Message Sending Function

Processing Inbound Messages

Transaction Layer Functions

Dialog Layer Functions

URI Functions

SIP Header Value Retrieval Functions

Connection Object Functions

Miscellaneous Functions

A.  Examples of Use

B.  Programming with the SIP API

C.  Transaction Timers

Index

Header and Message Copying Functions

int sip_copy_start_line(sip_msg_t from, sip_msg_t to);

The sip_copy_start_line() function copies the first line of the SIP message. The first line is either the request or the response line. The line is copied from the position that is indicated by the value of msg_from to the position that is indicated by the value of msg_to.

int sip_copy_header(sip_msg_t sip_msg, sip_header_t sip_header, char *param);

The sip_copy_header() function creates a new SIP header using the values given by the sip_header and param parameters, if the values for these parameters are not NULL. This function adds the new header to the message that is indicated by the value of the sip_msg parameter.

int sip_copy_header_by_name(sip_msg_t from, sip_msg_t to, char *header_name, char *param);

The sip_copy_header_by_name() function copies the header given by the value of the header_name parameter from the position specified in msg_from to the position specified in msg_to. The value of the header_name parameter can be either the long name or the compact name. The function creates a new SIP header using the contents of the header_name field in msg_from, then adds the value of the param parameter if that value is not NULL. The function adds the resulting header to msg_to.

int sip_copy_all_headers(sip_msg_t from, sip_msg_t to);

The sip_copy_all_headers() function copies all of the headers, except for the start line, from the SIP message indicated in the from parameter to the SIP message indicated in the to parameter. The API will not copy headers from a message that is marked as deleted.

sip_msg_t sip_clone_msg(const sip_msg_t sip_msg);

The sip_clone_msg() function returns a message that is a copy of the SIP message that is indicated by the value of the sip_msg parameter. The function returns a message that contains all of the headers and the contents that are present in the SIP message that is indicated by the value of the sip_msg parameter.