11 #ifndef _SipUdpServer_h_ 12 #define _SipUdpServer_h_ 17 #include <os/OsNatKeepaliveListener.h> 18 #include <utl/UtlSList.h> 19 #include <os/OsRWMutex.h> 30 class OsNatDatagramSocket ;
31 class OsNotification ;
61 int udpReadBufferSize = -1,
62 UtlBoolean bUseNextAvailablePort = FALSE,
63 const char* szBoundIp = NULL);
79 const char* szLocalIp,
80 int refreshPeriodInSecs,
81 OsNotification* pNotification) ;
88 const char* szLocalSipIp = NULL);
91 const char* szRemoteIp,
93 const int keepAliveSecs,
94 OsNatKeepaliveListener* pListener) ;
97 const char* szRemoteIp,
98 const int remotePort) ;
101 const char* szRemoteIp,
102 const int remotePort,
103 const int keepAliveSecs,
104 OsNatKeepaliveListener* pListener) ;
107 const char* szRemoteIp,
108 const int remotePort) ;
111 const char* szRemoteIp,
112 const int remotePort,
113 const char* szMethod,
114 const int keepAliveSecs,
115 OsNatKeepaliveListener* pListener) ;
118 const char* szRemoteIp,
119 const int remotePort,
120 const char* szMethod) ;
123 const char* szMethod,
124 const char* szRemoteIp,
125 const int remotePort,
126 const char* szContactIp,
127 const int contactPort) ;
133 const intptr_t eventData) ;
143 const char* szLocalIp = NULL) ;
151 const char* szRemoteIp,
152 const int remotePort,
153 const char* szMethod) ;
163 const char* hostAddress,
164 const char* localIp);
171 UtlString mStunServer ;
172 int mStunRefreshSecs ;
174 UtlSList mSipKeepAliveBindings ;
175 OsRWMutex mKeepAliveMutex ;
177 OsStatus createServerSocket(
const char* localIp,
179 const UtlBoolean& bUseNextAvailablePort,
180 int udpReadBufferSize);
193 #endif // _SipUdpServer_h_ Transaction and Transport manager for SIP stack.
Definition: SipUserAgent.h:157
The SipUdpServer is owner/container of the sockets used for UDP communications.
Definition: SipUdpServer.h:52
UtlBoolean getStunAddress(UtlString *pIpAddress, int *pPort, const char *szLocalIp=NULL)
Definition: SipUdpServer.cpp:881
void printStatus()
Definition: SipUdpServer.cpp:823
UtlBoolean removeKeepAliveBinding(void *pBinding)
Definition: SipUdpServer.cpp:935
UtlBoolean removeStunKeepAlive(const char *szLocalIp, const char *szRemoteIp, const int remotePort)
Definition: SipUdpServer.cpp:645
Definition: SipProtocolServerBase.h:40
void updateSipKeepAlive(const char *szLocalIp, const char *szMethod, const char *szRemoteIp, const int remotePort, const char *szContactIp, const int contactPort)
Definition: SipUdpServer.cpp:782
Specialization of HttpMessage to contain and manipulate SIP messages.
Definition: SipMessage.h:343
UtlBoolean addStunKeepAlive(const char *szLocalIp, const char *szRemoteIp, const int remotePort, const int keepAliveSecs, OsNatKeepaliveListener *pListener)
Definition: SipUdpServer.cpp:607
void shutdownListener()
Definition: SipUdpServer.cpp:442
UtlBoolean removeSipKeepAlive(const char *szLocalIp, const char *szRemoteIp, const int remotePort, const char *szMethod)
Definition: SipUdpServer.cpp:740
#define SIP_PORT
Definition: SipMessage.h:256
void * findKeepAliveBinding(OsTimer *pTimer)
Definition: SipUdpServer.cpp:946
static void SipKeepAliveCallback(const intptr_t userData, const intptr_t eventData)
Definition: SipUdpServer.cpp:1089
SipUdpServer(int sipPort=SIP_PORT, SipUserAgent *userAgent=NULL, int udpReadBufferSize=-1, UtlBoolean bUseNextAvailablePort=FALSE, const char *szBoundIp=NULL)
Definition: SipUdpServer.cpp:179
OsSocket * buildClientSocket(int hostPort, const char *hostAddress, const char *localIp)
Definition: SipUdpServer.cpp:504
UtlBoolean addCrLfKeepAlive(const char *szLocalIp, const char *szRemoteIp, const int remotePort, const int keepAliveSecs, OsNatKeepaliveListener *pListener)
Definition: SipUdpServer.cpp:535
UtlBoolean addKeepAliveBinding(void *pBinding)
Definition: SipUdpServer.cpp:918
virtual ~SipUdpServer()
Definition: SipUdpServer.cpp:231
int getServerPort(const char *szLocalIp=NULL)
Definition: SipUdpServer.cpp:852
UtlBoolean addSipKeepAlive(const char *szLocalIp, const char *szRemoteIp, const int remotePort, const char *szMethod, const int keepAliveSecs, OsNatKeepaliveListener *pListener)
Definition: SipUdpServer.cpp:679
UtlBoolean sendTo(const SipMessage &message, const char *address, int port, const char *szLocalSipIp=NULL)
Definition: SipUdpServer.cpp:462
void enableStun(const char *szStunServer, int iStunPort, const char *szLocalIp, int refreshPeriodInSecs, OsNotification *pNotification)
Definition: SipUdpServer.cpp:357
int run(void *pArg)
Definition: SipUdpServer.cpp:349
void sendSipKeepAlive(OsTimer *pTimer)
Definition: SipUdpServer.cpp:990
UtlBoolean removeCrLfKeepAlive(const char *szLocalIp, const char *szRemoteIp, const int remotePort)
Definition: SipUdpServer.cpp:573
OsMutex mMapLock
Definition: SipUdpServer.h:166