SIP Tags
[SIP Headers]

Collaboration diagram for SIP Tags:


Detailed Description

SIP headers in tag item lists and tagged argument lists.

The include file <sip_tag.h> defines tags and tag items for including SIP headers in tag item lists or tagged argument lists. For each header, there is a tag for pointer to header object and an another tag for string containing header value. For example, From header has tags SIPTAG_FROM() and SIPTAG_FROM_STR().

It is also possible to include user-defined headers or non-standard headers using SIPTAG_HEADER_STR().

A function taking SIP headers as arguments could be called like this:

 sip_payload_t *payload;
 ...
 sip_add_tl(msg, sip, 
            SIPTAG_CONTENT_TYPE_STR("text/plain"),
            SIPTAG_USER_AGENT(agent->user_agent),
            SIPTAG_PAYLOAD(payload),
            SIPTAG_HEADER_STR("X-Header: contents\nP-Header: bar"),
            TAG_END());
 ...

In the above fragment, the function sip_add_tl() will add Content-Type and User-Agent headers along with message payload to the SIP message. The Content-Type header is made with value "text/plain".


Files

file  sip_tag_class.c
 SIP Tag classes.
file  sip_tag_class.h
 Tag classes for SIP headers.


Sofia-SIP 1.12.1 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.