Loading...
Searching...
No Matches
SIP Tags

SIP headers in tag item lists and tagged argument lists. More...

## Files

file | sip_tag_class.h
| \ @{

## Variables

tag_class_t | sipexthdrtag_class [1]
| \

## Detailed Description

SIP headers in tag item lists and tagged argument lists.

The include file <sofia-sip/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());
...
SIPTAG_CONTENT_TYPE_STR
#define SIPTAG_CONTENT_TYPE_STR(s)
Tag list item for string with Content-Type header value.
Definition sip_tag.h:4562
SIPTAG_PAYLOAD
#define SIPTAG_PAYLOAD(x)
Tag list item for pointer to a message payload structure sip_payload_t.
Definition sip_tag.h:5091
sip_payload_t
msg_payload_t sip_payload_t
@
Definition sip.h:137
SIPTAG_USER_AGENT
#define SIPTAG_USER_AGENT(x)
Tag list item for pointer to a User-Agent header structure sip_user_agent_t.
Definition sip_tag.h:2081
SIPTAG_HEADER_STR
#define SIPTAG_HEADER_STR(s)
Tag list item for header string.
Definition sip_tag.h:167
TAG_END
#define 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".

## Variable Documentation

## sipexthdrtag_class

tag_class_t sipexthdrtag_class[1]

\

Tag class using SIP header structure.

Tag class for tags containing SIP headers.

Tags in this class are not automatically added to the message with sip_add_tl() or sip_add_tagis().

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