sipxtacklib
Version 3.3
|
SipTransaction correlates requests and responses. More...
#include <SipTransaction.h>
Public Types | |
enum | transactionStates { TRANSACTION_UNKNOWN = 0, TRANSACTION_LOCALLY_INIITATED, TRANSACTION_CALLING, TRANSACTION_PROCEEDING, TRANSACTION_COMPLETE, TRANSACTION_CONFIRMED, TRANSACTION_TERMINATED } |
enum | messageRelationship { MESSAGE_UNKNOWN, MESSAGE_UNRELATED, MESSAGE_SAME_SESSION, MESSAGE_DIFFERENT_BRANCH, MESSAGE_REQUEST, MESSAGE_PROVISIONAL, MESSAGE_FINAL, MESSAGE_NEW_FINAL, MESSAGE_CANCEL, MESSAGE_CANCEL_RESPONSE, MESSAGE_ACK, MESSAGE_2XX_ACK, MESSAGE_DUPLICATE } |
The relationship of a message to a transaction. More... | |
Public Member Functions | |
SipTransaction (SipMessage *request=NULL, UtlBoolean isOutgoing=TRUE, UtlBoolean userAgentTransaction=TRUE) | |
virtual | ~SipTransaction () |
param: userAgentTransaction - user agent (vs proxy) client or More... | |
void | getNewBranchId (SipMessage &request, UtlString &branchId) |
UtlBoolean | handleOutgoing (SipMessage &outgoingMessage, SipUserAgent &userAgent, SipTransactionList &transactionList, enum messageRelationship relationship, SIPX_TRANSPORT_DATA *pTransport=NULL) |
void | handleResendEvent (const SipMessage &outgoingMessage, SipUserAgent &userAgent, enum messageRelationship relationship, SipTransactionList &transactionList, int &nextTimeout, SipMessage *&delayedDispatchedMessage, SIPX_TRANSPORT_DATA *pTransport) |
void | handleExpiresEvent (const SipMessage &outgoingMessage, SipUserAgent &userAgent, enum messageRelationship relationship, SipTransactionList &transactionList, int &nextTimeout, SipMessage *&delayedDispatchedMessage, SIPX_TRANSPORT_DATA *pTransport) |
UtlBoolean | handleIncoming (SipMessage &incomingMessage, SipUserAgent &userAgent, enum messageRelationship relationship, SipTransactionList &transactionList, SipMessage *&delayedDispatchedMessage, SIPX_TRANSPORT_DATA *pTransport) |
void | removeTimer (OsTimer *timer) |
void | stopTimers () |
void | startTimers () |
void | deleteTimers () |
void | linkChild (SipTransaction &child) |
void | toString (UtlString &dumpString, UtlBoolean dumpMessagesAlso) |
void | dumpTransactionTree (UtlString &dumpstring, UtlBoolean dumpMessagesAlso) |
void | dumpChildren (UtlString &dumpstring, UtlBoolean dumpMessagesAlso) |
SipTransaction * | getTopMostParent () const |
void | getCallId (UtlString &callId) const |
enum transactionStates | getState () const |
long | getStartTime () const |
long | getTimeStamp () const |
void | touch () |
void | touchBelow (int newDate) |
SipMessage * | getRequest () |
SipMessage * | getLastProvisionalResponse () |
SipMessage * | getLastFinalResponse () |
void | cancel (SipUserAgent &userAgent, SipTransactionList &transactionList) |
void | markBusy () |
void | markAvailable () |
void | notifyWhenAvailable (OsEvent *availableEvent) |
void | signalNextAvailable () |
void | signalAllAvailable () |
UtlBoolean | isServerTransaction () const |
UtlBoolean | isDnsSrvChild () const |
Inquiry as to whether this transaction is a recursed DNS SRV child. More... | |
UtlBoolean | isUaTransaction () const |
UtlBoolean | isChildSerial () |
UtlBoolean | isEarlyDialogWithMedia () |
UtlBoolean | isChildEarlyDialogWithMedia () |
UtlBoolean | isMethod (const char *methodToMatch) const |
enum messageRelationship | whatRelation (const SipMessage &message, UtlBoolean isOutgoing) const |
UtlBoolean | isBusy () |
UtlBoolean | isUriChild (Url &uri) |
UtlBoolean | isUriRecursed (Url &uri) |
UtlBoolean | isUriRecursedChildren (UtlString &uriString) |
void | setTransport (SIPX_TRANSPORT_DATA *pTransport) |
Static Public Member Functions | |
static void | getStateString (enum transactionStates state, UtlString &stateString) |
static void | getRelationshipString (enum messageRelationship relationship, UtlString &relationshipString) |
static void | buildHash (const SipMessage &message, UtlBoolean isOutgoing, UtlString &hash) |
Static Public Attributes | |
static int | smTransactionNum = 0 |
static UtlString | smBranchIdBase |
Protected Member Functions | |
void | handleChildTimeoutEvent (SipTransaction &child, const SipMessage &outgoingMessage, SipUserAgent &userAgent, enum messageRelationship relationship, SipTransactionList &transactionList, int &nextTimeout, SipMessage *&delayedDispatchedMessage, SIPX_TRANSPORT_DATA *pTransport) |
UtlBoolean | handleChildIncoming (SipMessage &incomingMessage, SipUserAgent &userAgent, enum messageRelationship relationship, SipTransactionList &transactionList, UtlBoolean childSaysShouldDispatch, SipMessage *&delayedDispatchedMessage, SIPX_TRANSPORT_DATA *pTransport) |
UtlBoolean | startSequentialSearch (SipUserAgent &userAgent, SipTransactionList &transactionList, SIPX_TRANSPORT_DATA *pTransport) |
returns: TRUE/FALSE as to whether the message should be dispatched to applications More... | |
UtlBoolean | recurseChildren (SipUserAgent &userAgent, SipTransactionList &transactionList) |
UtlBoolean | recurseDnsSrvChildren (SipUserAgent &userAgent, SipTransactionList &transactionList, SIPX_TRANSPORT_DATA *pTransport) |
UtlBoolean | findBestResponse (SipMessage &bestResponse) |
enum messageRelationship | addResponse (SipMessage *&response, UtlBoolean isOutGoing, enum messageRelationship relationship=MESSAGE_UNKNOWN) |
void | cancelChildren (SipUserAgent &userAgent, SipTransactionList &transactionList) |
void | doMarkBusy (int markValue) |
SipTransaction correlates requests and responses.
CallId + 's' or 'c' (for server or client) is used as the key for the hash (i.e. stored as the string/data in the parent UtlString.
enum transactionStates |
enum messageRelationship |
The relationship of a message to a transaction.
SipTransaction | ( | SipMessage * | request = NULL , |
UtlBoolean | isOutgoing = TRUE , |
||
UtlBoolean | userAgentTransaction = TRUE |
||
) |
|
virtual |
param: userAgentTransaction - user agent (vs proxy) client or
void getNewBranchId | ( | SipMessage & | request, |
UtlString & | branchId | ||
) |
UtlBoolean handleOutgoing | ( | SipMessage & | outgoingMessage, |
SipUserAgent & | userAgent, | ||
SipTransactionList & | transactionList, | ||
enum messageRelationship | relationship, | ||
SIPX_TRANSPORT_DATA * | pTransport = NULL |
||
) |
void handleResendEvent | ( | const SipMessage & | outgoingMessage, |
SipUserAgent & | userAgent, | ||
enum messageRelationship | relationship, | ||
SipTransactionList & | transactionList, | ||
int & | nextTimeout, | ||
SipMessage *& | delayedDispatchedMessage, | ||
SIPX_TRANSPORT_DATA * | pTransport | ||
) |
void handleExpiresEvent | ( | const SipMessage & | outgoingMessage, |
SipUserAgent & | userAgent, | ||
enum messageRelationship | relationship, | ||
SipTransactionList & | transactionList, | ||
int & | nextTimeout, | ||
SipMessage *& | delayedDispatchedMessage, | ||
SIPX_TRANSPORT_DATA * | pTransport | ||
) |
UtlBoolean handleIncoming | ( | SipMessage & | incomingMessage, |
SipUserAgent & | userAgent, | ||
enum messageRelationship | relationship, | ||
SipTransactionList & | transactionList, | ||
SipMessage *& | delayedDispatchedMessage, | ||
SIPX_TRANSPORT_DATA * | pTransport | ||
) |
void removeTimer | ( | OsTimer * | timer | ) |
void stopTimers | ( | ) |
void startTimers | ( | ) |
void deleteTimers | ( | ) |
void linkChild | ( | SipTransaction & | child | ) |
void toString | ( | UtlString & | dumpString, |
UtlBoolean | dumpMessagesAlso | ||
) |
void dumpTransactionTree | ( | UtlString & | dumpstring, |
UtlBoolean | dumpMessagesAlso | ||
) |
void dumpChildren | ( | UtlString & | dumpstring, |
UtlBoolean | dumpMessagesAlso | ||
) |
|
static |
|
static |
|
static |
SipTransaction * getTopMostParent | ( | ) | const |
void getCallId | ( | UtlString & | callId | ) | const |
enum SipTransaction::transactionStates getState | ( | ) | const |
long getStartTime | ( | ) | const |
long getTimeStamp | ( | ) | const |
void touch | ( | ) |
void touchBelow | ( | int | newDate | ) |
SipMessage * getRequest | ( | ) |
SipMessage * getLastProvisionalResponse | ( | ) |
SipMessage * getLastFinalResponse | ( | ) |
void cancel | ( | SipUserAgent & | userAgent, |
SipTransactionList & | transactionList | ||
) |
void markBusy | ( | ) |
void markAvailable | ( | ) |
void notifyWhenAvailable | ( | OsEvent * | availableEvent | ) |
void signalNextAvailable | ( | ) |
void signalAllAvailable | ( | ) |
UtlBoolean isServerTransaction | ( | ) | const |
UtlBoolean isDnsSrvChild | ( | ) | const |
Inquiry as to whether this transaction is a recursed DNS SRV child.
UtlBoolean isUaTransaction | ( | ) | const |
UtlBoolean isChildSerial | ( | ) |
UtlBoolean isEarlyDialogWithMedia | ( | ) |
UtlBoolean isChildEarlyDialogWithMedia | ( | ) |
UtlBoolean isMethod | ( | const char * | methodToMatch | ) | const |
enum SipTransaction::messageRelationship whatRelation | ( | const SipMessage & | message, |
UtlBoolean | isOutgoing | ||
) | const |
UtlBoolean isBusy | ( | ) |
UtlBoolean isUriChild | ( | Url & | uri | ) |
UtlBoolean isUriRecursed | ( | Url & | uri | ) |
UtlBoolean isUriRecursedChildren | ( | UtlString & | uriString | ) |
|
inline |
|
protected |
|
protected |
|
protected |
returns: TRUE/FALSE as to whether the message should be dispatched to applications
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |