Content-type: text/html Man page of sip_get_trans_method

sip_get_trans_method

Section: Session Initiation Protocol Library Functions (3SIP)
Updated: 20 Mar 2007
Index Return to Main Contents
 

NAME

sip_get_trans_method, sip_get_trans_state, sip_get_trans_orig_msg, sip_get_trans_conn_obj, sip_get_trans_resp_msg, sip_get_trans_branchid - get transaction attributes  

SYNOPSIS

cc [ flag ... ] file ... -lsip [ library ... ]
#include <sip.h>

sip_method_t sip_get_trans_method(sip_transaction_t sip_trans,
    int *error);

int sip_get_trans_state(sip_transaction_t trans, int *error);

const struct sip_message *sip_get_trans_orig_msg
    (sip_transaction_t sip_trans, int *error);

const struct sip_message *sip_get_trans_resp_msg
    (sip_transaction_t sip_trans, int *error);

const struct sip_conn_object *sip_get_trans_conn_obj
    (sip_transaction_t sip_trans, int *error);

char *sip_get_trans_branchid(sip_transaction_t trans, int *error);

 

DESCRIPTION

The sip_get_trans_method() function returns the method the SIP message that created the transaction sip_trans.

The sip_get_trans_state() function returns the state of the transaction sip_trans.

A newly created transaction is in the state:
SIP_NEW_TRANSACTION

A client transaction could be in one of the following states:
SIP_CLNT_CALLING
SIP_CLNT_INV_PROCEEDING
SIP_CLNT_INV_TERMINATED
SIP_CLNT_INV_COMPLETED
SIP_CLNT_TRYING
SIP_CLNT_NONINV_PROCEEDING
SIP_CLNT_NONINV_TERMINATED
SIP_CLNT_NONINV_COMPLETED

A server transaction could be in one of the following states:
SIP_SRV_INV_PROCEEDING
SIP_SRV_INV_COMPLETED
SIP_SRV_CONFIRMED
SIP_SRV_INV_TERMINATED
SIP_SRV_TRYING
SIP_SRV_NONINV_PROCEEDING
SIP_SRV_NONINV_COMPLETED
SIP_SRV_NONINV_TERMINATED

The sip_get_trans_orig_msg() function returns the message that created the transaction sip_trans. This could be a request on the client or a response on the server.

The sip_get_trans_resp_msg() function returns the last response that was sent on the transaction sip_trans. Typically, this response is used by the transaction layer for retransmissions for unreliable transports or for responding to retransmitted requests. A response that terminates a transaction is not returned.

The sip_get_trans_conn_obj() function returns the cached connection object, if any, in the transactionsip_trans.

The sip_get_trans_branchid() function returns the branch ID for the message that created the transactionsip_trans. The caller is responsible for freeing the returned string.  

RETURN VALUES

The sip_get_trans_orig_msg(), sip_get_trans_resp_msg(), sip_get_trans_conn_obj(), and sip_get_trans_branchid() functions return the required value on success or NULL on failure.

The sip_get_trans_state() and sip_get_trans_method() functions return the required value on success and -1 on failure.

The value of errno is not changed by these calls in the event of an error.  

ERRORS

If the error is non-null, one of the following values is set:

EINVAL

The input transaction sip_trans is NULL.

ENOMEM

For sip_get_trans_branchid() there is an error allocating memory for the branch ID string.

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 TYPEATTRIBUTE VALUE

Interface StabilityStable

MT-Level

 

SEE ALSO

libsip(3SIP)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
ERRORS
ATTRIBUTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:37:49 GMT, October 02, 2010