Session Initiation Protocol Library Functions
sip_get_contact_display_name(3SIP)
NAME
sip_get_contact_display_name, sip_get_from_display_name,
sip_get_to_display_name, sip_get_from_tag, sip_get_to_tag,
sip_get_callid, sip_get_callseq_num, sip_get_callseq_method,
sip_get_via_sent_by_host, sip_get_via_sent_by_port,
sip_get_via_sent_protocol_version,
sip_get_via_sent_protocol_name, sip_get_via_sent_transport,
sip_get_maxforward, sip_get_content_length,
sip_get_content_type, sip_get_content_sub_type,
sip_get_content, sip_get_accept_type,
sip_get_accept_sub_type, sip_get_accept_enc,
sip_get_accept_lang, sip_get_alert_info_uri,
sip_get_allow_method, sip_get_min_expires,
sip_get_mime_version, sip_get_org, sip_get_priority,
sip_get_replyto_display_name, sip_get_replyto_uri_str,
sip_get_date_time, sip_get_date_day, sip_get_date_month,
sip_get_date_wkday, sip_get_date_year,
sip_get_date_timezone, sip_get_content_disp,
sip_get_content_enc, sip_get_error_info_uri,
sip_get_expires, sip_get_require, sip_get_subject,
sip_get_supported, sip_get_tstamp_delay,
sip_get_unsupported, sip_get_server, sip_get_user_agent,
sip_get_warning_code, sip_get_warning_agent,
sip_get_warning_text, sip_get_call_info_uri,
sip_get_in_reply_to, sip_get_retry_after_time,
sip_get_retry_after_cmts, sip_get_rack_resp_num,
sip_get_rack_cseq_num, sip_get_rack_method,
sip_get_rseq_resp_num, sip_get_priv_value,
sip_get_passertedid_display_name,
sip_get_passertedid_uri_str,
sip_get_ppreferredid_display_name,
sip_get_ppreferredid_uri_str, sip_get_author_scheme,
sip_get_author_param, sip_get_authen_info,
sip_get_proxy_authen_scheme, sip_get_proxy_authen_param,
sip_get_proxy_author_scheme, sip_get_proxy_author_param,
sip_get_proxy_require, sip_get_www_authen_scheme,
sip_get_www_authen_param, sip_get_allow_events,
sip_get_event, sip_get_substate, sip_get_content_lang,
sip_get_tstamp_value, sip_get_route_uri_str,
sip_get_route_display_name, sip_get_contact_uri_str,
sip_get_from_uri_str, sip_get_to_uri_str - obtain header
specific attributesSYNOPSIS
cc [ flag ... ] file ... -lsip [ library ... ]
#include
const sip_str_t *sip_get_contact_display_name(sip_header_value_t value,
int *error);SunOS 5.11 Last change: 10 Feb 2007 1
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_from_display_name(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_to_display_name(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_contact_uri_str(sip_header_value_t value,
int *error);const sip_str_t *sip_get_from_uri_str(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_to_uri_str(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_from_tag(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_to_tag(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_callid(sip_msg_t sip_msg,
int *error);int sip_get_callseq_num(sip_msg_t sip_msg,
int *error);sip_method_t sip_get_callseq_method(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_via_sent_by_host(sip_header_value_t value,
int *error);int sip_get_via_sent_by_port (sip_header_value_t value,
int *error);const sip_str_t *sip_get_via_sent_protocol_version
(sip_header_value_t value, int *error);
SunOS 5.11 Last change: 10 Feb 2007 2
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_via_sent_transport(sip_header_value_t value,
int *error);int sip_get_maxforward(sip_msg_t sip_msg,
int *error);int sip_get_content_length(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_content_type(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_content_sub_type(sip_msg_t sip_msg,
int *error);char *sip_get_content(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_accept_type(sip_header_value_t value,
int *error);const sip_str_t *sip_get_accept_sub_type(sip_header_value_t value,
int *error);const sip_str_t *sip_get_accept_enc(sip_header_value_t value,
int *error);const sip_str_t *sip_get_accept_lang(sip_header_value_t value,
int *error);const sip_str_t *sip_get_alert_info_uri(sip_header_value_t value,
int *error);sip_method_t sip_get_allow_method(sip_header_value_t value,
int *error);int sip_get_min_expire(sip_msg_t sip_msg,
int *error);SunOS 5.11 Last change: 10 Feb 2007 3
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_mime_version(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_org(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_priority(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_replyto_display_name(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_replyto_uri_str(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_date_time(sip_msg_t sip_msg,
int *error);int sip_get_date_day(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_date_month(sip_msg_t sip_msg,
int *error);int sip_get_date_year(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_date_wkday(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_date_timezone(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_content_disp(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_content_enc(sip_header_value_t value,
int *error);SunOS 5.11 Last change: 10 Feb 2007 4
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_error_info_uri(sip_header_value_t value,
int *error);int sip_get_expires(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_require(sip_header_value_t value,
int *error);const sip_str_t *sip_get_subject(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_supported(sip_header_value_t value,
int *error);const sip_str_t *sip_get_tstamp_delay(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_unsupported(sip_header_value_t value,
int *error);const sip_str_t *sip_get_server(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_user_agent(sip_msg_t sip_msg,
int *error);int sip_get_warning_code(sip_header_value_t value,
int *error);const sip_str_t *sip_get_warning_agent(sip_header_value_t value,
int *error);const sip_str_t *sip_get_warning_text(sip_header_value_t value,
int *error);const sip_str_t *sip_get_call_info_uri(sip_header_value_t value,
int *error);SunOS 5.11 Last change: 10 Feb 2007 5
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_in_reply_to(sip_header_value_t value,
int *error);int sip_get_retry_after_time(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_retry_after_cmts(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_passertedid_display_name
(sip_header_value_t value, int *error);
const sip_str_t *sip_get_passertedid_uri_str
(sip_header_value_t value, int *error);
int sip_get_rack_resp_num(sip_msg_t sip_msg,
int *error);int sip_get_rack_cseq_num(sip_msg_t sip_msg, int *error);
sip_method_t sip_get_rack_method(sip_msg_t sip_msg, int *error);
int sip_get_rseq_resp_num(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_priv_value(sip_header_value_t value,
int *error);const sip_str_t *sip_get_author_scheme(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_author_param(sip_msg_t sip_msg,
char *name, int *error);const sip_str_t *sip_get_authen_info(sip_header_value_t value,
int *error);SunOS 5.11 Last change: 10 Feb 2007 6
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_proxy_authen_scheme(sip_msg_t msg,
int *error);const sip_str_t *sip_get_proxy_authen_param(sip_msg_t sip_msg,
char *name, int *error);const sip_str_t *sip_get_proxy_author_scheme(sip_msg_t msg,
int *error);const sip_str_t *sip_get_proxy_author_param(sip_msg_t sip_msg,
char *name, int *error);const sip_str_t *sip_get_proxy_require(sip_header_value_t value,
int *error);const sip_str_t *sip_get_www_authen_scheme(sip_msg_t msg,
int *error);const sip_str_t *sip_get_www_authen_param(sip_msg_t sip_msg,
char *name, int *error);const sip_str_t *sip_get_allow_events(sip_header_value_t value, int *error);
const sip_str_t *sip_get_event(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_substate(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_content_lang(sip_header_value_t value,
int *error);const sip_str_t *sip_get_tstamp_value(sip_msg_t sip_msg,
int *error);const sip_str_t *sip_get_route_uri_str(sip_header_value_t value,
int *error);SunOS 5.11 Last change: 10 Feb 2007 7
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
const sip_str_t *sip_get_route_display_name(sip_header_value_t value,
int *error);DESCRIPTION
For functions that return a pointer of type sip_str_t,
sip_str_t is supplied by:
typedef struct sip_str {
char *sip_str_ptr;
int sip_str_len;
}sip_str_t;
The sip_str_ptr parameter points to the start of the
returned value and sip_str_len supplies the length of the
returned value.For example, given the following request line in a SIP mes-
sage sip_msg that is input to sip_get_request_uri_str():
FROM :;tag=1928301774 the return is a pointer to sip_str_t with the sip_str_ptr
member pointing to "A" of Alice and sip_str_len being set to
5, the length of Alice. Access functions for headers that can have multiple values take the value as the input, while those that can have onlyone value take the SIP message sip_msg as the input.
The sip_get_contact_display_name(),
sip_get_from_display_name(), and sip_get_to_display_name()
functions will return the display name, if present, from the CONTACT header value, FROM and TO header respectively.The sip_get_contact_uri_str(), sip_get_from_uri_str(), and
sip_get_to_uri_str() functions will return the URI string
from the CONTACT value, FROM and TO header respectively.The sip_get_from_tag() and sip_get_to_tag() functions will
return the TAG parameter value, if present, from the FROM and TO header, respectively, in the provided SIP messageSunOS 5.11 Last change: 10 Feb 2007 8
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
sip_msg.
The sip_get_callid() function will return the value from the
CALL-ID header in the provided SIP message sip_msg.
The sip_get_callseq_num() function will return the call
sequence number from the CSEQ header in the provided SIPmessage sip_msg.
The sip_get_callseq_method() function will return the method
from the CSEQ header in the provided SIP message sip_msg.
The method can be one of the following: INVITE ACK OPTIONS BYE CANCEL REGISTER REFER INFO SUBSCRIBE NOTIFY PRACK UNKNOWNThe sip_get_via_sent_by_host(), sip_get_via_sent_by_port(),
sip_get_via_sent_protocol_version(),
sip_get_via_sent_protocol_name(), and
sip_get_via_sent_transport() functions will return the
sent-by host, port (if present), protocol version, protocol
name and transport information from the provided VIA headervalue. Example, if the VIA value is given by SIP/2.0/UDP
bobspc.biloxi.com:5060, then the sent-by host is
"bobspc.biloxi.com", protocol name is "SIP", protocol ver-
sion is "2.0", port is 5060 and transport is UDP.The sip_get_maxforward() function will return the value of
the MAX-FORWARDS header in the provided SIP message sip_msg.
INVITE ACK OPTIONS BYE CANCEL REGISTER REFER INFOSunOS 5.11 Last change: 10 Feb 2007 9
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
SUBSCRIBE NOTIFY PRACK UNKNOWNThe sip_get_content_length() function will return the value
of the CONTENT-LENGTH header in the provided SIP message
sip_msg. The method can return one of the following:
The sip_get_content_type() and sip_get_content_sub_type()
functions will return the value of the Type and Sub-Type
field, respectively, from the CONTENT-TYPE header in the
provided SIP message sip_msg.
The sip_get_content() function will return the message body
from the provided SIP message sip_msg. The returned string
is a copy of the message body and the caller is responsible for freeing the string after use.The sip_get_accept_type() and sip_get_accept_sub_type()
functions will return the value of the Type and Sub-Type
field, respectively, from the provided ACCEPT header value.The sip_get_accept_enc() function will return the content-
coding from the provided ACCEPT-ENCODING header value.
The sip_get_accept_lang() function will return the language
from the provided ACCEPT-LANGUAGE header value.
The sip_get_alert_info_uri() function will return the URI
string from the provided ALERT-INFO header value.
The sip_get_allow_method() function will return the SIP
method from the provided ALLOW header value. The method can return one of the following: INVITE ACK OPTIONS BYE CANCEL REGISTER REFER INFOSunOS 5.11 Last change: 10 Feb 2007 10
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
SUBSCRIBE NOTIFY PRACK UNKNOWNThe sip_get_min_expire() function will return the time in
seconds from the MIN-EXPIRES header in the provided SIP mes-
sage sip_msg.
The sip_get_mime_version() function will return the MIME
version string from the MIME-VERSION header in the provided
SIP message sip_msg.
The sip_get_org() function will return the organization
string value from the ORGANIZATION header in the providedSIP message sip_msg.
The sip_get_priority() function will return the priority
string value from the PRIORITY header in the provided SIPmessage sip_msg.
The sip_get_replyto_display_name() and
sip_get_replyto_uri_str() functions will return the display
name (if present) and the URI string, respectively, from theREPLY-TO header in the provided SIP message sip_msg.
The sip_get_date_time(), sip_get_date_day(),
sip_get_date_month(), sip_get_date_wkday(),
sip_get_date_year() and sip_get_date_timezone() functions
will return the time, day, month, week day, year andtimezone value from the DATE header in the provided SIP mes-
sage sip_msg. Example, if the DATE header has the following
value: Sat, 13 Nov 2010 23:29:00 GMT the time is "23:29:00 ", week day is "Sat", day is "13", month is "Nov", year is "2010", timezone is "GMT".The sip_get_content_disp() function will return the
content-disposition type from the CONTENT-DISPOSITION header
in the provided SIP message sip_msg.
SunOS 5.11 Last change: 10 Feb 2007 11
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
The sip_get_content_enc() function will return the content-
coding value from the CONTENT-ENCODING header value.
The sip_get_error_info_uri() function will return the URI
string from the provided ERROR-INFO header value.
The sip_get_expires() function will return the time in
seconds from the EXPIRES header in the provided SIP messagesip_msg.
The sip_get_require() function will return the option-tag
value from the provided REQUIRE header value.The sip_get_subject() function will return the value of the
SUBJECT header in the provided SIP message sip_msg.
The sip_get_supported() function will return the extension
value from the provided SUPPORTED header value.The sip_get_tstamp_delay() function will return the value
from the TIMESTAMP header in the provided SIP messagesip_msg.
The sip_get_unsupported() function will return the extension
value from the provided UNSUPPORTED header value.The sip_get_server() function will return the value from the
SERVER header in the provided SIP message sip_msg.
The sip_get_user_agent() function will return the value from
the USER-AGENT header in the provided SIP message sip_msg.
The sip_get_warning_code(), sip_get_warning_agent(), and
sip_get_warning_text() functions will return the value of
the warn-code, warn-agent and warn-text, respectively, in
the provided WARNING header value.The sip_get_call_info_uri() function will return the URI
string in the provided CALL-INFO header value.
SunOS 5.11 Last change: 10 Feb 2007 12
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
The sip_get_in_reply_to() function will return the Call-Id
value in the provided IN-REPLY-TO header value.
The sip_get_retry_after_time(), and
sip_get_retry_after_cmts() functions return the time and
comments (if any), respectively, from the RETRY-AFTER header
in the provided SIP message sip_msg.
The sip_get_passertedid_display_name() and
sip_get_passertedid_uri_str() functions will return the
display name (if any) and the URI string, respectively, inthe provided P-ASSERTED-IDENTITY header value.
The sip_get_ppreferredid_display_name() and
sip_get_ppreferredid_uri_str() functions will return the
display name (if any) and the URI string, respectively, inthe provided P-PREFERRED-IDENTITY header value.
The sip_get_rack_resp_num(), sip_get_rack_cseq_num(), and
sip_get_rack_method() functions will return the response-
number, the CSEQ number and the SIP method from the RACKheader in the provided SIP message sip_msg. The method can
return one of the following: INVITE ACK OPTIONS BYE CANCEL REGISTER REFER INFO SUBSCRIBE NOTIFY PRACK UNKNOWNThe sip_get_rseq_resp_num() function will return the
response-number, the RSEQ header in the provided SIP message
sip_msg.
The sip_get_priv_value() function will return the priv-value
in the provided PRIVACY header value.SunOS 5.11 Last change: 10 Feb 2007 13
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
The sip_get_route_uri_str() and sip_get_route_display_name()
functions will return the URI string, and display name (ifpresent) from the provided ROUTE or RECORD-ROUTE header
value.The sip_get_author_scheme() function will return the scheme
from the AUTHORIZATION header in the provided SIP messagesip_msg.
The sip_get_author_param() function will return the value of
the parameter specified in name from the AUTHORIZATIONheader in the SIP message sip_msg.
The sip_get_authen_info() function will return the authenti-
cation information from the provided AUTHORIZATION-INFO
header value.The sip_get_proxy_authen_scheme() function will return the
scheme from the PROXY-AUTHENTICATE header in the SIP message
sip_msg.
The sip_get_proxy_authen_param() function will return the
value of the parameter in name from the PROXY-AUTHENTICATE
header in the SIP message sip_msg.
The sip_get_proxy_author_scheme() function will return the
value of the scheme from the PROXY-AUTHORIZATION header in
the SIP message sip_msg.
The sip_get_proxy_author_param() function will return the
value of the parameter specified in name from the PROXY-
AUTHORIZATION header in the SIP message sip_msg.
The sip_get_proxy_require() function will return the
option-tag from the provided PROXY-REQUIRE header value.
The sip_get_www_authen_scheme() function will return the
challenge from the WWW-AUTHENTICATE header in the SIP mes-
sage sip_msg.
SunOS 5.11 Last change: 10 Feb 2007 14
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
The sip_get_www_authen_param() function will return the
value of the parameter specified in name from the WWW-
AUTHENTICATE header in the SIP message sip_msg.
The sip_get_allow_events() function returns the value of the
allowed event from the provided ALLOW-EVENTS header value.
The sip_get_event() function returns the event in the EVENT
header in the SIP message sip_msg.
The sip_get_substate() function the subscription state from
the SUBSCRIPTION-STATE header in the provided SIP message
sip_msg.
The sip_get_content_lang() function will return the language
from the provided CONTENT-LANGUAGE value.
The sip_get_tstamp_value() function will return the times-
tamp value from the TIMESTAMP header in the SIP messagesip_msg.
RETURN VALUES
For functions that return a pointer to sip_str_t, the return
value is the specified value on success or NULL in case of error. For functions that return an integer, the returnvalue is the specified value on success and -1 on error.
The value of errno is not changed by these calls in the event of an error.ERRORS
These functions take a pointer to an integer error as anargument. If the error is non-null, one of the following
values is set:EINVAL The input SIP message sip_msg or the header value
is null; or the specified header/header value is deleted. EPROTO The header value is not present or invalid. The parser could not parse it correctly.SunOS 5.11 Last change: 10 Feb 2007 15
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
ENOMEM There is an error allocating memory for the return value. On success, the value of the location pointed to by error is set to 0.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
SEE ALSO
libsip(3LIB)SunOS 5.11 Last change: 10 Feb 2007 16
Session Initiation Protocol Library Functionssip_get_contact_display_name(3SIP)
SunOS 5.11 Last change: 10 Feb 2007 17