Merge pull request #3 from RangeNetworks/issue/21

Issue/21
This commit is contained in:
Michael Iedema
2014-07-11 09:37:24 -07:00
5 changed files with 23 additions and 3 deletions

2
.gitignore vendored
View File

@@ -9,6 +9,8 @@ Makefile
aclocal.m4
build-arch-stamp
build-indep-stamp
compile
config/test_ortp_version
config.guess
config.h
config.log

View File

@@ -29,6 +29,7 @@
#include <ortp/telephonyevents.h>
#include <config.h>
#include <Logger.h>
#include <Timeval.h>
#include <GSMConfig.h>
@@ -980,7 +981,11 @@ void SipRtp::initRTP1(const char *d_ip_addr, unsigned d_port, unsigned dialogId)
rtp_session_signal_connect(mSession,"timestamp_jump",(RtpCallback)ourRtpTimestampJumpCallback,dialogId);
gCountRtpSockets++;
rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort );
#ifdef ORTP_NEW_API
rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort, -1);
#else
rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort);
#endif
rtp_session_set_remote_addr(mSession, d_ip_addr, d_port);
WATCHF("*** initRTP local=%d remote=%s %d\n",mRTPPort,d_ip_addr,d_port);

View File

@@ -0,0 +1,8 @@
#include <ortp/ortp.h>
int main(int argc, char **argv)
{
RtpSession * mSession;
mSession = rtp_session_new(RTP_SESSION_SENDRECV);
rtp_session_set_local_addr(mSession, "0.0.0.0", -1, -1);
}

View File

@@ -117,8 +117,12 @@ fi
AC_CHECK_LIB(a53, _init, ,[AC_MSG_ERROR([Cannot link with -la53. Install the liba53 package or manually build and install with $ sudo ./tools/install_liba53.sh])])
dnl Check for sip+rtp libs
#AC_CHECK_LIB([ortp], [main])
AC_MSG_CHECKING([ortp api version])
AS_IF([gcc -I=/usr/local/include -o config/test_ortp_version config/test_ortp_version.cpp -lortp &> /dev/null], [
AC_DEFINE(ORTP_NEW_API, 1, rtp_session_set_local_addr takes four arguments)
AC_MSG_RESULT([>= 0.22.0])
],
[AC_MSG_RESULT([< 0.22.0])])
dnl Check for other misc libs
#AC_CHECK_LIB([c], [main])
#AC_CHECK_LIB([dl], [main])

1
debian/rules vendored
View File

@@ -26,6 +26,7 @@ config: configure-stamp
configure-stamp: configure
dh_testdir
# Add here commands to configure the package.
autoreconf -i
./configure $(confflags)
touch configure-stamp