Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sip_create_dialog_req(3sip) [opensolaris man page]

sip_create_dialog_req(3SIP)			   Session Initiation Protocol Library Functions		       sip_create_dialog_req(3SIP)

NAME
sip_create_dialog_req, sip_create_dialog_req_nocontact - create an in-dialog request SYNOPSIS
cc [ flag ... ] file ... -lsip [ library ... ] #include <sip.h> sip_msg_t sip_create_dialog_req(sip_method_t method, sip_dialog_t dialog, char *transport, char *sent_by, int sent_by_port, char *via_param, uint32_t smaxforward, int cseq); sip_msg_t sip_create_dialog_req_nocontact(sip_method_t method, sip_dialog_t dialog, char *transport, char *sent_by, int sent_by_port, char *via_param, uint32_t smaxforward, int cseq); DESCRIPTION
The sip_create_dialog_req() function creates and returns a SIP request with the state information contained in dialog. The method in the resulting request is from method. The method can be one of the following: INVITE ACK OPTIONS BYE CANCEL REGISTER REFER INFO SUBSCRIBE NOTIFY PRACK The resulting request line in the SIP message has the SIP-Version of "2.0". The URI in the request line is from the remote target in the dialog or from the route set in the dialog, if present. See RFC 3261 (section 12.2) for details. The FROM, TO, and CALL-ID headers are added from the dialog. The MAX-FORWARDS header is added using the value in maxforward. The CSEQ header is added using the SIP method in method and the sequence number value in cseq. If cseq is -1, the sequence number is obtained from the local sequence number in the dialog. The local sequence number in the dialog is incremented and is used in the CSEQ header. The VIA header added is created using the transport, sent_by, sent_by_port (if non-zero), and via_param (if any). If dialog has a non-empty route set, the resulting SIP request has the route set from the dialog. The sip_create_dialog_req_nocontact() function is similar to sip_create_dialog_req(), except that it does not add the contact header. RETURN VALUES
The sip_create_dialog_req() and sip_create_dialog_req_nocontact() functions return the resulting SIP message on success and NULL on fail- ure. The value of errno is not changed by these calls in the event of an error. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
libsip(3LIB), attributes(5) SunOS 5.11 6 Aug 2007 sip_create_dialog_req(3SIP)

Check Out this Related Man Page

sip_get_dialog_state(3SIP)			   Session Initiation Protocol Library Functions			sip_get_dialog_state(3SIP)

NAME
sip_get_dialog_state, sip_get_dialog_callid, sip_get_dialog_local_tag, sip_get_dialog_remote_tag, sip_get_dialog_local_uri, sip_get_dia- log_remote_uri, sip_get_dialog_local_contact_uri, sip_get_dialog_remote_target_uri, sip_get_dialog_route_set, sip_get_dialog_local_cseq, sip_get_dialog_remote_cseq, sip_get_dialog_type, sip_get_dialog_method, sip_is_dialog_secure, sip_get_dialog_msgcnt - get dialog attributes SYNOPSIS
cc [ flag ... ] file ... -lsip [ library ... ] #include <sip.h> int sip_get_dialog_state(sip_dialog_t dialog, int *error); const sip_str_t *sip_get_dialog_callid(sip_dialog_t dialog, int *error); const sip_str_t *sip_get_dialog_local_tag(sip_dialog_t dialog, int *error); const sip_str_t *sip_get_dialog_remote_tag(sip_dialog_t dialog, int *error); const struct sip_uri *sip_get_dialog_local_uri(sip_dialog_t dialog, int *error); const struct sip_uri *sip_get_dialog_remote_uri(sip_dialog_t dialog, int *error); const struct sip_uri *sip_get_dialog_local_contact_uri( sip_dialog_t dialog, int *error); const struct sip_uri *sip_get_dialog_remote_target_uri( sip_dialog_t dialog, int *error); const sip_str_t *sip_get_dialog_route_set(sip_dialog_t dialog, int *error); boolean_t sip_is_dialog_secure(sip_dialog_t dialog, int *error); uint32_t sip_get_dialog_local_cseq(sip_dialog_t dialog, int *error); uint32_t sip_get_dialog_remote_cseq(sip_dialog_t dialog, int *error); int sip_get_dialog_type(sip_dialog_t dialog,int *error); int sip_get_dialog_method(sip_dialog_t dialog,int *error); int sip_get_dialog_msgcnt(sip_dialog_t dialog,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. The sip_get_dialog_state() returns the state of the dialog. A dialog can be in one of the following states: SIP_DLG_NEW SIP_DLG_EARLY SIP_DLG_CONFIRMED SIP_DLG_DESTROYED The sip_get_dialog_callid() function returns the call ID value maintained in the dialog. The sip_get_dialog_local_tag() and sip_get_dialog_remote_tag() functions return the local and remote tag values, maintained in the dialog. The sip_get_dialog_local_uri(), sip_get_dialog_remote_uri(), sip_get_dialog_local_contact_uri(), and sip_get_dialog_remote_target_uri() functions return the local, remote, local contract, and the remote target URIs, maintained in the dialog. The sip_get_dialog_route_set() function returns the route set, if any, maintained in the dialog. The sip_get_dialog_local_cseq() and sip_get_dialog_remote_cseq() functions return the local and remote CSEQ numbers maintained in the dia- log. The sip_get_dialog_type() function returns one of the following dialog types, depending on whether it is created by the client or the server. SIP_UAC_DIALOG created by client SIP_UAS_DIALOG created by server The sip_get_dialog_method() function returns the SIP method, INVITE or SUBSCRIBE, of the request that created the dialog. The sip_is_dialog_secure() function returns B_TRUE if the dialog is secure and B_FALSE otherwise. The sip_get_dialog_msgcnt() function returns the number of SIP messages (requests and responses) that were sent and received within the context of the given dialog. RETURN VALUES
The sip_get_dialog_state(), sip_get_dialog_local_cseq(), sip_get_dialog_remote_cseq(), sip_get_dialog_type(), sip_get_dialog_method(), and sip_get_dialog_msgcnt() functions return the required value on success and -1 on failure. The sip_get_dialog_callid(), sip_get_dialog_local_tag(), sip_get_dialog_remote_tag(), sip_get_dialog_local_uri(), sip_get_dia- log_remote_uri(), sip_get_dialog_local_contact_uri(), sip_get_dialog_remote_target_uri(), and sip_get_dialog_route_set() functions return the required value on success and NULL on failure. The value of errno is not changed by these calls in the event of an error. ERRORS
These functions take an error argument. If the error is non-null, one of the following values is set: EINVAL The dialog is NULL or the stack is not configured to manage dialogs. ENOTSUP The input SIP message cannot be modified. ENOMEM The memory allocation fails when the request/response line or the headers in the ACK request are created. On success, the value of the location pointed to by error is set to 0. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
libsip(3LIB) SunOS 5.11 11 Jan 2008 sip_get_dialog_state(3SIP)
Man Page