sipxtacklib
Version 3.3
|
#include <SipRefreshMgr.h>
Public Member Functions | |
UtlBoolean | init (SipUserAgent *ptrToMyAgent, int sipTcpPort=SIP_PORT, int sipUdpPort=SIP_PORT, const char *defaultUser=NULL, const char *publicAddress=NULL, const char *defaultSipAddress=NULL, const char *sipDirectoryServers=NULL, const char *sipRegistryServers=NULL, int defaultRegistryTimeout=3600, int defaultSubscribeTimeout=60 *60 *24, int restartCount=1, const char *macAddress=NULL) |
void | StartRefreshMgr () |
void | setRegistryPeriod (const int periodInSeconds) |
Mutator for the mDefaultRegistryPeriodMember. More... | |
void | setSubscribeTimeout (const int periodInSeconds) |
Mutator for the mDefaultSubscribePeriodMember. More... | |
const int | getSubscribeTimeout () |
Accessor for the mDefaultSubscribePeriodMember. More... | |
void | addMessageConsumer (OsServerTask *messageEventListener) |
void | addMessageObserver (OsMsgQ &messageQueue, const char *sipMethod=NULL, UtlBoolean wantRequests=TRUE, UtlBoolean wantResponses=TRUE, UtlBoolean wantIncoming=TRUE, UtlBoolean wantOutGoing=FALSE, const char *eventName=NULL, void *observerData=NULL) |
UtlBoolean | newRegisterMsg (const Url &fromUrl, const UtlString &lineId, int registryPeriodSeconds=-1, Url *pPreferredContactUri=NULL) |
param: messageQueue - the queue on which an SipMessageEvent is dispatched param: sipMethod - the specific method type of the requests or responses to be observed. NULL or a null string indicates all methods. param: wantRequests - want to observe SIP requests param: wantResponses - want to observe SIP responses param: wantIncoming - want to observe SIP messages originating from the network. param: wantOutGoing - want to observe SIP messages originating from locally. param: eventName - want to observer SUBSCRIBE or NOTIFY requests having the given event type param: observerData - data to be attached to SIP messages queued on the observer More... | |
void | reRegisterAll () |
void | reRegister (const Url &fromUrl) |
void | unRegisterUser (const Url &fromUrl, const UtlBoolean &onStartup=FALSE, const UtlString &lineid="") |
void | reSubscribeAll () |
void | unSubscribeAll () |
void | setLineMgr (SipLineMgr *const lineMgr) |
SipLineMgr *const | getLineMgr () const |
UtlBoolean | newSubscribeMsg (SipMessage &message) |
SipRefreshMgr () | |
void | dumpMessageLists (UtlString &results) |
virtual | ~SipRefreshMgr () |
virtual UtlBoolean | handleMessage (OsMsg &eventMessage) |
UtlBoolean | getNatMappedAddress (UtlString *pIpAddress, int *pPort) |
void | generateCallId (const UtlString &lineId, const UtlString &method, UtlString &callid, UtlBoolean onStartup=FALSE) |
Protected Types | |
enum | RefreshMsgTypes { UNSPECIFIED = 0, START_REFRESH_MGR } |
Protected Member Functions | |
UtlBoolean | isUAStarted () |
void | waitForUA () |
void | queueMessageToObservers (SipMessageEvent &event, const char *method) |
void | getFromAddress (UtlString *address, int *port, UtlString *protocol) |
void | rescheduleAfterTime (SipMessage *message, int percentage=DEFAULT_PERCENTAGE_TIMEOUT) |
void | sendToObservers (const OsMsg &eventMessage, SipMessage *registerRequest) |
OsStatus | sendRequest (SipMessage ®isterRequest, const char *method) |
void | rescheduleRequest (SipMessage *registerRequest, int secondsFromNow, const char *method, int percentage=DEFAULT_PERCENTAGE_TIMEOUT, UtlBoolean sendImmediate=FALSE) |
void | processOKResponse (SipMessage *registerResponse, SipMessage *registerRequest) |
void | parseContactFields (SipMessage *message, SipMessage *sipRequest, int &expireVal) |
void | processResponse (const OsMsg &eventMessage, SipMessage *registerRequest) |
void | createTagNameValuePair (UtlString &tagNamevaluePair) |
void | registerUrl (const char *registerFromAddress, const char *registerToAddress, const char *registerUri, const char *contactUrl, const UtlString ®isterCallId, int registerPeriod=-1) |
UtlBoolean | isDuplicateRegister (const Url &url, SipMessage &oldMessage) |
UtlBoolean | isDuplicateRegister (const Url &url) |
void | addToRegisterList (SipMessage *message) |
UtlBoolean | removeFromRegisterList (SipMessage *message) |
void | addToSubscribeList (SipMessage *message) |
UtlBoolean | removeFromSubscribeList (SipMessage *message) |
UtlBoolean | isDuplicateSubscribe (const Url &url) |
UtlBoolean | isDuplicateSubscribe (const Url &fromUrl, SipMessage &oldMsg) |
void | getContactField (const Url ®isterToField, UtlString &contact, const UtlString &lineId="", Url *pPreferredContactUri=NULL) |
void | removeAllFromRequestList (SipMessage *response) |
void | removeAllFromRequestList (SipMessage *response, SipMessageList *pRequestList) |
UtlBoolean | isExpiresZero (SipMessage *pRequest) |
void | fireSipXLineEvent (const Url &url, const UtlString &lineId, const SIPX_LINESTATE_EVENT event, const SIPX_LINESTATE_CAUSE cause, const char *bodyBytes=NULL) |
SIPX_LINESTATE_EVENT | getLastLineEvent (const UtlString &lineId) |
void | setLastLineEvent (const UtlString &lineId, const SIPX_LINESTATE_EVENT eMajor) |
Protected Attributes | |
SipLineMgr * | mpLineMgr |
UtlHashMap * | mpLastLineEventMap |
int | mDefaultRegistryPeriod |
SipMessageList | mRegisterList |
OsRWMutex | mRegisterListMutexR |
OsRWMutex | mRegisterListMutexW |
UtlString | mRegistryServer |
int | mDefaultSubscribePeriod |
SipMessageList | mSubscribeList |
OsRWMutex | mSubscribeListMutexR |
OsRWMutex | mSubscribeListMutexW |
UtlBoolean | mIsStarted |
UtlHashBag | mMessageObservers |
OsRWMutex | mObserverMutex |
OsMutex | mUAReadyMutex |
UtlString | mContactAddress |
UtlString | mDefaultSipAddress |
UtlString | mSipIpAddress |
UtlString | mDefaultUser |
UtlString | mMacAddress |
UtlString | mRestartCountStr |
SipUserAgent * | mMyUserAgent |
int | mTcpPort |
int | mUdpPort |
int | mRestartCount |
UtlRandom | mRandomNumGenerator |
UtlHashBag | mTimerBag |
|
protected |
SipRefreshMgr | ( | ) |
|
virtual |
UtlBoolean init | ( | SipUserAgent * | ptrToMyAgent, |
int | sipTcpPort = SIP_PORT , |
||
int | sipUdpPort = SIP_PORT , |
||
const char * | defaultUser = NULL , |
||
const char * | publicAddress = NULL , |
||
const char * | defaultSipAddress = NULL , |
||
const char * | sipDirectoryServers = NULL , |
||
const char * | sipRegistryServers = NULL , |
||
int | defaultRegistryTimeout = 3600 , |
||
int | defaultSubscribeTimeout = 60*60*24 , |
||
int | restartCount = 1 , |
||
const char * | macAddress = NULL |
||
) |
void StartRefreshMgr | ( | ) |
void setRegistryPeriod | ( | const int | periodInSeconds | ) |
Mutator for the mDefaultRegistryPeriodMember.
void setSubscribeTimeout | ( | const int | periodInSeconds | ) |
Mutator for the mDefaultSubscribePeriodMember.
const int getSubscribeTimeout | ( | ) |
Accessor for the mDefaultSubscribePeriodMember.
void addMessageConsumer | ( | OsServerTask * | messageEventListener | ) |
void addMessageObserver | ( | OsMsgQ & | messageQueue, |
const char * | sipMethod = NULL , |
||
UtlBoolean | wantRequests = TRUE , |
||
UtlBoolean | wantResponses = TRUE , |
||
UtlBoolean | wantIncoming = TRUE , |
||
UtlBoolean | wantOutGoing = FALSE , |
||
const char * | eventName = NULL , |
||
void * | observerData = NULL |
||
) |
UtlBoolean newRegisterMsg | ( | const Url & | fromUrl, |
const UtlString & | lineId, | ||
int | registryPeriodSeconds = -1 , |
||
Url * | pPreferredContactUri = NULL |
||
) |
param: messageQueue - the queue on which an SipMessageEvent is dispatched param: sipMethod - the specific method type of the requests or responses to be observed. NULL or a null string indicates all methods. param: wantRequests - want to observe SIP requests param: wantResponses - want to observe SIP responses param: wantIncoming - want to observe SIP messages originating from the network. param: wantOutGoing - want to observe SIP messages originating from locally. param: eventName - want to observer SUBSCRIBE or NOTIFY requests having the given event type param: observerData - data to be attached to SIP messages queued on the observer
void reRegisterAll | ( | ) |
void reRegister | ( | const Url & | fromUrl | ) |
void unRegisterUser | ( | const Url & | fromUrl, |
const UtlBoolean & | onStartup = FALSE , |
||
const UtlString & | lineid = "" |
||
) |
void reSubscribeAll | ( | ) |
void unSubscribeAll | ( | ) |
void setLineMgr | ( | SipLineMgr *const | lineMgr | ) |
SipLineMgr *const getLineMgr | ( | ) | const |
UtlBoolean newSubscribeMsg | ( | SipMessage & | message | ) |
void dumpMessageLists | ( | UtlString & | results | ) |
|
virtual |
UtlBoolean getNatMappedAddress | ( | UtlString * | pIpAddress, |
int * | pPort | ||
) |
void generateCallId | ( | const UtlString & | lineId, |
const UtlString & | method, | ||
UtlString & | callid, | ||
UtlBoolean | onStartup = FALSE |
||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |