SIP headers in tag item lists and tagged argument lists. More...
Files | |
file | sip_tag_class.h |
Tag classes for SIP headers. | |
Variables | |
tag_class_t | sipexthdrtag_class [1] |
Tag class for tags containing SIP headers. |
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()); ...
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".
Tag class for tags containing SIP headers.
Tag class using SIP header structure.
Tags in this class are not automatically added to the message with sip_add_tl() or sip_add_tagis().