summaryrefslogtreecommitdiff
path: root/anyrtpproxy
diff options
context:
space:
mode:
Diffstat (limited to 'anyrtpproxy')
-rw-r--r--anyrtpproxy/commandHandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/anyrtpproxy/commandHandler.cpp b/anyrtpproxy/commandHandler.cpp
index f2d1a23..58d9974 100644
--- a/anyrtpproxy/commandHandler.cpp
+++ b/anyrtpproxy/commandHandler.cpp
@@ -169,8 +169,10 @@ string CommandHandler::handleRequest(string modifiers, string call_id, string ad
RtpSession& session = gRtpSessionTable.getOrNewSession(call_id, is_new);
if(is_new)
{
- u_int16_t port1 = 35000; // TODO: get next available port
- u_int16_t port2 = 35001; // TODO: get next available port
+ static u_int16_t port1 = 35000; // TODO: get next available port
+ static u_int16_t port2 = 35001; // TODO: get next available port
+ port1+=2;
+ port2+=2;
session.setLocalAddr("0.0.0.0"); // TODO: read this from config
session.setLocalPort1(port1);