Skip Navigation Links | |
Exit Print View | |
SIPAPI Developer's Guide Oracle Solaris 11.1 Information Library |
2. Oracle Solaris SIP Internals
3. Multithreading and URI Support
SIP Request and Response Creation Functions
Header and Message Copying Functions
Header and Value Deleting Functions
Value Retrieval and Response Description Functions
The sip_msg_is_request() function returns a value of B_TRUE if the message is a request. This function returns a value of B_FALSE in all other cases.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
boolean_t sip_msg_is_response(const sip_msg_t sip_msg, int *error);The sip_msg_is_response() function returns a value of B_TRUE if the message is a response. This function returns a value of B_FALSE in all other cases.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
sip_method_t sip_get_request_method(const sip_msg_t sip_msg, int *error);The sip_get_request_method() function returns the SIP method from the start line of the SIP request message that is contained in the sip_msg parameter.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
int sip_get_response_code(sip_msg_t sip_msg, int *error);The sip_get_response_code() function returns the response code from the start line of the SIP response message that is contained in the sip_msg parameter.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t *sip_get_response_phrase(sip_msg_t sip_msg, int *error);The sip_get_response_phrase() function returns the reason phrase from the start line of the SIP response message that is contained in the sip_msg parameter.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t *sip_get_sip_version(sip_msg_t sip_msg, int *error);The sip_get_sip_version() function returns the SIP version from the start line of the SIP response message that is contained in the sip_msg parameter.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
int sip_get_msg_len(sip_msg_t sip_msg, int *error);The sip_get_msg_len() function returns the length of the SIP message that is contained in the sip_msg parameter.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t sip_get_contact_display_name(sip_header_value_t value, int *error);The sip_get_contact_display_name() function returns the display name from a CONTACT header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t sip_get_from_display_name(sip_msg_t sip_msg, int *error, int *error);The sip_get_from_display_name() function returns the display name from a FROM header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_to_display_name(sip_msg_t sip_msg, int *error);The sip_get_to_display_name() function returns the display name from a TO header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t *sip_get_from_tag(sip_msg_t sip_msg, int *error);The sip_get_from_tag() function returns the tag value from a FROM header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_to_tag(sip_msg_t sip_msg, int *error);The sip_get_to_tag() function returns the tag value from a TO header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_callid(sip_msg_t sip_msg, int *error);The sip_get_callid() function gets the callid value from a Call-ID header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_callseq_num(sip_msg_t sip_msg, int *error);The sip_get_callseq_num() function returns the call sequence value from the Cseq header. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
sip_method_t sip_get_callseq_method(sip_msg_t sip_msg, int *error);The sip_get_callseq_method() function returns the method from the Cseq header. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_via_sent_by_host(sip_header_value_t value, int *error);The sip_get_via_sent_by_host() function returns the value of the host from a VIA header.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
int sip_get_via_sent_by_port(sip_header_value_t value, int *error);The sip_get_via_sent_by_port() function returns the value of the port from a VIA header.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t sip_get_via_sent_protocol_version(sip_header_value_t value, int *error);The sip_get_via_sent_protocol_version() function returns the value of the protocol version from a VIA header.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t sip_get_via_sent_protocol_name(sip_header_value_t value, int *error);The sip_get_via_sent_protocol_name() function returns the value of the protocol name from a VIA header.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t sip_get_via_sent_transport(sip_header_value_t value, int *error);The sip_get_via_sent_transport() function returns the value of the transport from a VIA header.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
int sip_get_maxforward(sip_msg_t sip_msg, int *error);The sip_get_maxforward() function returns the number of hops that is listed as a value in the Max-forwards header. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_content_length(sip_msg_t sip_msg, int *error);the sip_get_content_length() function returns the length that is listed as a value in the Content-Length header of a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_content_type(sip_msg_t sip_msg, int *error);The sip_get_content_type() function returns the content type from the Content-Type header of a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_content_sub_type(sip_msg_t sip_msg, int *error);The sip_get_content_sub_type() function returns the content subtype from the Content-Type header of a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
char sip_get_content(sip_msg_t sip_msg, int *error);The sip_get_content() function returns the message body of the SIP message. The calling thread must free the string that this function returns. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_accept_type(sip_header_value_t value, int *error);The sip_get_accept_type() function returns the type from the Accept header value of a SIP message. This function returns a pointer to the header and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_accept_sub_type(sip_header_value_t value, int *error);The sip_get_accept_sub_type() function returns the subtype from the Accept header value of a SIP message. This function returns a pointer to the header and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_accept_enc(sip_header_value_t value, int *error);The sip_get_accept_enc() function returns the encoding from the Accept-Encoding header value of a SIP message. This function returns a pointer to the header and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_accept_lang(sip_header_value_t value, int *error);The sip_get_accept_lang() function returns the language from the Accept-Language header value of a SIP message. This function returns a pointer to the header and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_alert_info_uri(sip_header_value_t value, int *error);The sip_get_alert_info_uri() function returns the URI string alert-param from the Alert-Info header value of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
sip_method_t sip_get_allow_method(sip_header_value_t value, int *error);The sip_get_allow_method() function returns the method from the Allow header value of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_min_expires(sip_msg_t sip_msg, int *error);The sip_get_min_expires() function returns the number of seconds that is specified in the Min-Expires header value of the SIP message that is specified in the sip_msg parameter. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_mime_version(sip_msg_t sip_msg, int *error);The sip_get_mime_version() function returns the MIME version value of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_org(sip_msg_t sip_msg, int *error);The sip_get_org() function returns the value of the Organization header value of a SIP message. This function returns a pointer to the header and the length of the value.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t *sip_get_priority(sip_msg_t sip_msg, int *error);The sip_get_priority() function returns the value of the Priority header value of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_replyto_display_name(sip_msg_t sip_msg, int *error);The sip_get_replyto_display_name() function returns the display name from the Reply-To header value of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_replyto_uri_str(sip_msg_t sip_msg, int *error);The sip_get_replyto_uri_str() function returns the URI from the Reply-To header value of a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_date_time(sip_msg_t sip_msg, int *error);The sip_get_date_time() function returns the value of the time from the Date header of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_date_day(sip_msg_t sip_msg, int *error);The sip_get_date_day() function returns the value of the day from the Date header of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_date_month(sip_msg_t sip_msg, int *error);The sip_get_date_month() function returns the value of the month from the Date header of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_date_wkday(sip_msg_t sip_msg, int *error);The sip_get_date_wkday() function returns the value of the weekday from the Date header of a SIP message. This function returns a pointer to the header and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_date_year(sip_msg_t sip_msg, int *error);The sip_get_date_year() function returns the value of the year from the Date header of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_date_timezone(sip_msg_t sip_msg, int *error);The sip_get_date_timezone() function returns the value of the time zone from the Date header of a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_content_disp(sip_msg_t sip_msg, int *error);The sip_get_content_disp() function returns the value of the Content-Disposition header in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_date_content_enc(sip_header_value_t value, int *error);The sip_get_date_content_enc() function returns the encoding from the Content-Encoding header value. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_error_info_uri(sip_header_value_t value, int *error);The sip_get_error_info_uri() function returns the URI string from the Error-Info header value. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_expires(sip_msg_t sip_msg, int *error);The sip_get_expires() function returns the Expires header value. This header value is an integer. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_require(sip_header_value_t value, int *error);The sip_get_require() function returns the value of the Require header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_subject(sip_msg_t sip_msg, int *error);The sip_get_subject() function returns the value of the Subject header in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_supported(sip_header_value_t value, int *error);The sip_get_supported() function returns the value of the supported extension from the Supported header. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_tstamp_delay(sip_msg_t, int *, int *error);The sip_get_tstamp_delay() function returns the value of the Timestamp header in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value.
The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.
const sip_str_t sip_get_unsupported(sip_header_value_t value, int *error);The sip_get_unsupported() function returns the list of the unsupported features from the Unsupported header value in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_server(sip_msg_t sip_msg, int *error);The sip_get_server() function returns the value of the Server header in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_user_agent(sip_msg_t sip_msg, int *error);The sip_get_user_agent() function returns the value of the User-Agent header in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_warning_code(sip_header_value_t value, int *error);The sip_get_warning_code() function returns the value of the warning code from the Warning header value in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_warning_agent(sip_header_value_t value, int *error);The sip_get_warning_agent() function returns the value of the warning agent from the Warning header value in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_warning_text(sip_header_value_t value, int *error);The sip_get_warning_text() function returns the value of the warning text from the Warning header value in a SIP message. This function returns a pointer to the header and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_call_info_uri(sip_header_value_t value, int *error);The sip_call_info_uri() function returns the URI string from the Call-Info header value in a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_in_reply_to(sip_header_value_t value, int *error);The sip_get_in_reply_to() function returns the value of callid from the In-Reply-To header value in a SIP message. This function returns a pointer to the display name (or the tag or callid, as appropriate) and the length of the value. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
int sip_get_retry_after_time(sip_msg_t sip_msg, int *error);The sip_get_retry_after_time() function returns the value of the time interval from the Retry-After header in a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.
const sip_str_t sip_get_retry_after_cmts(sip_msg_t sip_msg, int *error);The sip_get_retry_after_cmts() function returns the value of the comments from the Retry-After header in a SIP message. If the value of the *error parameter is not NULL, the function sets the value to zero if the function completes successfully. If the function does not complete successfully, the function sets the value of the *error parameter to the error number.