[Pkg-voip-commits] [SCM] reSIProcate branch, master, updated. upstream/1.8.1-72-gf4772e7
Daniel Pocock
daniel at pocock.com.au
Fri May 25 19:48:24 UTC 2012
The following commit has been merged in the master branch:
commit 7f342e5296b27e3b20fd83fad9a476c3c67ca74d
Author: Daniel Pocock <daniel at pocock.com.au>
Date: Fri May 25 19:32:12 2012 +0200
Imported Upstream version 1.8.2
diff --git a/apps/clicktocall/Makefile.am b/apps/clicktocall/Makefile.am
index 91a4eae..5bf95fc 100644
--- a/apps/clicktocall/Makefile.am
+++ b/apps/clicktocall/Makefile.am
@@ -6,7 +6,7 @@ EXTRA_DIST += *.sln
EXTRA_DIST += *.vcproj
SUBDIRS = .
-#SUBDIRS += test
+SUBDIRS += test
#AM_CXXFLAGS = -DUSE_ARES
diff --git a/apps/clicktocall/Makefile.in b/apps/clicktocall/Makefile.in
index 05903a3..7cbfd4e 100644
--- a/apps/clicktocall/Makefile.in
+++ b/apps/clicktocall/Makefile.in
@@ -271,7 +271,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = clicktocall.config doc *.sln *.vcproj
-SUBDIRS = .
+SUBDIRS = . test
clicktocall_LDADD = ../../resip/dum/libdum.la \
../../resip/stack/libresip.la ../../rutil/librutil.la \
@LIBSSL_LIBADD@ -lpcre -lpthread
diff --git a/apps/clicktocall/test/Makefile.am b/apps/clicktocall/test/Makefile.am
new file mode 100644
index 0000000..b5fd806
--- /dev/null
+++ b/apps/clicktocall/test/Makefile.am
@@ -0,0 +1,10 @@
+
+
+EXTRA_DIST = clicktocallxml_9_0.vcproj
+
+TESTS = clicktocallxml
+
+check_PROGRAMS = clicktocallxml
+
+clicktocallxml_SOURCES = clicktocallxml.cxx
+
diff --git a/apps/clicktocall/test/Makefile.in b/apps/clicktocall/test/Makefile.in
new file mode 100644
index 0000000..eb12599
--- /dev/null
+++ b/apps/clicktocall/test/Makefile.in
@@ -0,0 +1,580 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS = clicktocallxml$(EXEEXT)
+check_PROGRAMS = clicktocallxml$(EXEEXT)
+subdir = apps/clicktocall/test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_epoll.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am_clicktocallxml_OBJECTS = clicktocallxml.$(OBJEXT)
+clicktocallxml_OBJECTS = $(am_clicktocallxml_OBJECTS)
+clicktocallxml_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(clicktocallxml_SOURCES)
+DIST_SOURCES = $(clicktocallxml_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GPERF = @GPERF@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBARES_LIBADD = @LIBARES_LIBADD@
+LIBGEOIP_LIBADD = @LIBGEOIP_LIBADD@
+LIBMYSQL_LIBADD = @LIBMYSQL_LIBADD@
+LIBOBJS = @LIBOBJS@
+LIBPOPT_LIBADD = @LIBPOPT_LIBADD@
+LIBRADIUS_LIBADD = @LIBRADIUS_LIBADD@
+LIBS = @LIBS@
+LIBSSL_LIBADD = @LIBSSL_LIBADD@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_RELEASE = @LIBTOOL_VERSION_RELEASE@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SO_RELEASE = @SO_RELEASE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = clicktocallxml_9_0.vcproj
+clicktocallxml_SOURCES = clicktocallxml.cxx
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/clicktocall/test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu apps/clicktocall/test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+clicktocallxml$(EXEEXT): $(clicktocallxml_OBJECTS) $(clicktocallxml_DEPENDENCIES)
+ @rm -f clicktocallxml$(EXEEXT)
+ $(CXXLINK) $(clicktocallxml_OBJECTS) $(clicktocallxml_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/clicktocallxml.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/apps/clicktocall/test/clicktocallxml.cxx b/apps/clicktocall/test/clicktocallxml.cxx
new file mode 100644
index 0000000..ccb81de
--- /dev/null
+++ b/apps/clicktocall/test/clicktocallxml.cxx
@@ -0,0 +1,190 @@
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/BaseException.hxx>
+#include <rutil/XMLCursor.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM Subsystem::TEST
+
+void sleepSeconds(unsigned int seconds)
+{
+#ifdef WIN32
+ Sleep(seconds*1000);
+#else
+ sleep(seconds);
+#endif
+}
+
+int
+main (int argc, char** argv)
+{
+#ifdef WIN32
+ initNetwork();
+#endif
+
+ int sd, rc;
+ struct sockaddr_in localAddr, servAddr;
+ struct hostent *h;
+
+ if(argc != 6)
+ {
+ ErrLog(<< "usage: " << argv[0] <<" <server> <port> <initiator> <destination> <anchor 0|1>");
+ exit(1);
+ }
+
+ h = gethostbyname(argv[1]);
+ if(h==0)
+ {
+ ErrLog(<< "unknown host " << argv[1]);
+ exit(1);
+ }
+
+ servAddr.sin_family = h->h_addrtype;
+ memcpy((char *) &servAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
+ servAddr.sin_port = htons(atoi(argv[2]));
+
+ // Create TCP Socket
+ sd = socket(AF_INET, SOCK_STREAM, 0);
+ if(sd < 0)
+ {
+ ErrLog(<< "cannot open socket");
+ exit(1);
+ }
+
+ // bind to any local interface/port
+ localAddr.sin_family = AF_INET;
+ localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+ localAddr.sin_port = 0;
+
+ rc = bind(sd, (struct sockaddr *) &localAddr, sizeof(localAddr));
+ if(rc < 0)
+ {
+ ErrLog(<<"error binding locally");
+ exit(1);
+ }
+
+ // Connect to server
+ rc = connect(sd, (struct sockaddr *) &servAddr, sizeof(servAddr));
+ if(rc < 0)
+ {
+ ErrLog(<< "error connecting");
+ exit(1);
+ }
+
+ Data request(
+ "<ClickToCall>\r\n"
+ " <Request>\r\n"
+ " <Initiator>" + Data(argv[3]) + "</Initiator>\r\n"
+ " <Destination>" + Data(argv[4]) + "</Destination>\r\n"
+ " <AnchorCall>" + Data(argv[5][0] == '0' ? "false" : "true") + "</AnchorCall>\r\n"
+ " </Request>\r\n"
+ "</ClickToCall>\r\n");
+ rc = send(sd, request.c_str(), request.size(), 0);
+ if(rc < 0)
+ {
+ ErrLog(<< "error sending");
+ close(sd);
+ exit(1);
+ }
+
+ char readBuffer[8000];
+ while(rc > 0)
+ {
+ rc = recv(sd, (char*)&readBuffer, sizeof(readBuffer), 0);
+ if(rc < 0)
+ {
+ ErrLog(<< "error receiving");
+ close(sd);
+ exit(1);
+ }
+
+ if(rc > 0)
+ {
+ Data response(Data::Borrow, (const char*)&readBuffer, rc);
+ InfoLog(<< "Received response: \r\n" << response.c_str());
+ ParseBuffer pb(response);
+ XMLCursor xml(pb);
+ if(xml.firstChild())
+ {
+ if(xml.nextSibling())
+ {
+ if(xml.firstChild())
+ {
+ do
+ {
+ if(xml.getTag() == "Result")
+ {
+ XMLCursor::AttributeMap attribs = xml.getAttributes();
+ XMLCursor::AttributeMap::iterator it = attribs.find("Code");
+ if(it != attribs.end())
+ {
+ unsigned long statusCode = it->second.convertUnsignedLong();
+ if(statusCode >= 200 && statusCode < 300)
+ {
+ it = attribs.find("Leg");
+ if(it != attribs.end())
+ {
+ if(it->second == "Destination")
+ {
+ // Successfully connected to destination - break out
+ rc = 0;
+ }
+ }
+ }
+ else if(statusCode >=300)
+ {
+ // Failed - break out
+ rc = 0;
+ }
+ }
+ break;
+ }
+ } while(xml.nextSibling());
+ }
+ }
+ }
+ }
+ }
+
+ //sleepSeconds(5);
+ InfoLog(<< "xmlrpcclient done.");
+}
+
+/* ====================================================================
+
+ Copyright (c) 2009, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/apps/clicktocall/test/clicktocallxml_9_0.vcproj b/apps/clicktocall/test/clicktocallxml_9_0.vcproj
new file mode 100644
index 0000000..cd3d8bc
--- /dev/null
+++ b/apps/clicktocall/test/clicktocallxml_9_0.vcproj
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="clicktocallxml"
+ ProjectGUID="{9F820A51-A2FF-4EB6-ACB7-F0402E8D5CEC}"
+ RootNamespace="clicktocallxml"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)../../../""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib winmm.lib Dnsapi.lib Iphlpapi.lib crypt32.lib "$(ProjectDir)..\..\..\contrib\openssl\lib\vc\static\libeay32MDd.lib" "$(ProjectDir)..\..\..\contrib\openssl\lib\vc\static\ssleay32MDd.lib""
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)../../../""
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib winmm.lib Dnsapi.lib Iphlpapi.lib crypt32.lib "$(ProjectDir)..\..\..\contrib\openssl\lib\vc\static\libeay32MD.lib" "$(ProjectDir)..\..\..\contrib\openssl\lib\vc\static\ssleay32MD.lib""
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\clicktocallxml.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/configure b/configure
index c43634c..ce196a3 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for resiprocate 1.8.1.
+# Generated by GNU Autoconf 2.67 for resiprocate 1.8.2.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -698,8 +698,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='resiprocate'
PACKAGE_TARNAME='resiprocate'
-PACKAGE_VERSION='1.8.1'
-PACKAGE_STRING='resiprocate 1.8.1'
+PACKAGE_VERSION='1.8.2'
+PACKAGE_STRING='resiprocate 1.8.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1476,7 +1476,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures resiprocate 1.8.1 to adapt to many kinds of systems.
+\`configure' configures resiprocate 1.8.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1546,7 +1546,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of resiprocate 1.8.1:";;
+ short | recursive ) echo "Configuration of resiprocate 1.8.2:";;
esac
cat <<\_ACEOF
@@ -1665,7 +1665,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-resiprocate configure 1.8.1
+resiprocate configure 1.8.2
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2208,7 +2208,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by resiprocate $as_me 1.8.1, which was
+It was created by resiprocate $as_me 1.8.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -3036,7 +3036,7 @@ fi
# Define the identity of the package.
PACKAGE='resiprocate'
- VERSION='1.8.1'
+ VERSION='1.8.2'
cat >>confdefs.h <<_ACEOF
@@ -15702,7 +15702,7 @@ fi
-ac_config_files="$ac_config_files Makefile rutil/dns/ares/Makefile rutil/Makefile rutil/test/Makefile resip/Makefile resip/stack/Makefile resip/stack/test/Makefile resip/dum/Makefile resip/dum/test/Makefile resip/certs/Makefile repro/Makefile repro/reprocmd/Makefile repro/test/Makefile b2bua/Makefile tfm/Makefile tfm/repro/Makefile tfm/tfdum/Makefile apps/Makefile apps/clicktocall/Makefile apps/ichat-gw/Makefile apps/ichat-gw/jabberconnector/Makefile apps/sipdial/Makefile resip.spec reTurn/Makefile reTurn/test/Makefile reTurn/client/Makefile reflow/Makefile resip/recon/Makefile presSvr/Makefile p2p/s2c/s2c/Makefile p2p/Makefile"
+ac_config_files="$ac_config_files Makefile rutil/dns/ares/Makefile rutil/Makefile rutil/test/Makefile resip/Makefile resip/stack/Makefile resip/stack/test/Makefile resip/dum/Makefile resip/dum/test/Makefile resip/certs/Makefile repro/Makefile repro/reprocmd/Makefile repro/test/Makefile b2bua/Makefile tfm/Makefile tfm/repro/Makefile tfm/tfdum/Makefile apps/Makefile apps/clicktocall/Makefile apps/clicktocall/test/Makefile apps/ichat-gw/Makefile apps/ichat-gw/jabberconnector/Makefile apps/sipdial/Makefile resip.spec reTurn/Makefile reTurn/test/Makefile reTurn/client/Makefile reTurn/client/test/Makefile reflow/Makefile resip/recon/Makefile resip/recon/MOHParkServer/Makefile resip/recon/test/Makefile presSvr/Makefile p2p/s2c/s2c/Makefile p2p/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -16342,7 +16342,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by resiprocate $as_me 1.8.1, which was
+This file was extended by resiprocate $as_me 1.8.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16408,7 +16408,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-resiprocate config.status 1.8.1
+resiprocate config.status 1.8.2
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
@@ -16910,6 +16910,7 @@ do
"tfm/tfdum/Makefile") CONFIG_FILES="$CONFIG_FILES tfm/tfdum/Makefile" ;;
"apps/Makefile") CONFIG_FILES="$CONFIG_FILES apps/Makefile" ;;
"apps/clicktocall/Makefile") CONFIG_FILES="$CONFIG_FILES apps/clicktocall/Makefile" ;;
+ "apps/clicktocall/test/Makefile") CONFIG_FILES="$CONFIG_FILES apps/clicktocall/test/Makefile" ;;
"apps/ichat-gw/Makefile") CONFIG_FILES="$CONFIG_FILES apps/ichat-gw/Makefile" ;;
"apps/ichat-gw/jabberconnector/Makefile") CONFIG_FILES="$CONFIG_FILES apps/ichat-gw/jabberconnector/Makefile" ;;
"apps/sipdial/Makefile") CONFIG_FILES="$CONFIG_FILES apps/sipdial/Makefile" ;;
@@ -16917,8 +16918,11 @@ do
"reTurn/Makefile") CONFIG_FILES="$CONFIG_FILES reTurn/Makefile" ;;
"reTurn/test/Makefile") CONFIG_FILES="$CONFIG_FILES reTurn/test/Makefile" ;;
"reTurn/client/Makefile") CONFIG_FILES="$CONFIG_FILES reTurn/client/Makefile" ;;
+ "reTurn/client/test/Makefile") CONFIG_FILES="$CONFIG_FILES reTurn/client/test/Makefile" ;;
"reflow/Makefile") CONFIG_FILES="$CONFIG_FILES reflow/Makefile" ;;
"resip/recon/Makefile") CONFIG_FILES="$CONFIG_FILES resip/recon/Makefile" ;;
+ "resip/recon/MOHParkServer/Makefile") CONFIG_FILES="$CONFIG_FILES resip/recon/MOHParkServer/Makefile" ;;
+ "resip/recon/test/Makefile") CONFIG_FILES="$CONFIG_FILES resip/recon/test/Makefile" ;;
"presSvr/Makefile") CONFIG_FILES="$CONFIG_FILES presSvr/Makefile" ;;
"p2p/s2c/s2c/Makefile") CONFIG_FILES="$CONFIG_FILES p2p/s2c/s2c/Makefile" ;;
"p2p/Makefile") CONFIG_FILES="$CONFIG_FILES p2p/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 30a0079..c8138a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
-AC_INIT(resiprocate,1.8.1)
+AC_INIT(resiprocate,1.8.2)
AC_CONFIG_SRCDIR(repro/repro.cxx)
SO_RELEASE=`echo $PACKAGE_VERSION | cut -f1,2 -d.`
@@ -266,6 +266,7 @@ AC_OUTPUT(Makefile \
tfm/tfdum/Makefile \
apps/Makefile \
apps/clicktocall/Makefile \
+ apps/clicktocall/test/Makefile \
apps/ichat-gw/Makefile \
apps/ichat-gw/jabberconnector/Makefile \
apps/sipdial/Makefile \
@@ -273,8 +274,11 @@ AC_OUTPUT(Makefile \
reTurn/Makefile \
reTurn/test/Makefile \
reTurn/client/Makefile \
+ reTurn/client/test/Makefile \
reflow/Makefile \
resip/recon/Makefile \
+ resip/recon/MOHParkServer/Makefile \
+ resip/recon/test/Makefile \
presSvr/Makefile \
p2p/s2c/s2c/Makefile \
p2p/Makefile \
diff --git a/reTurn/UdpRelayServer.cxx b/reTurn/UdpRelayServer.cxx
index ceed6eb..f65e0fb 100644
--- a/reTurn/UdpRelayServer.cxx
+++ b/reTurn/UdpRelayServer.cxx
@@ -39,8 +39,8 @@ void
UdpRelayServer::stop()
{
asio::error_code ec;
- mSocket.close(ec);
mStopping = true;
+ mSocket.close(ec);
}
void
@@ -93,7 +93,7 @@ UdpRelayServer::onSendSuccess()
void
UdpRelayServer::onSendFailure(const asio::error_code& error)
{
- if(error != asio::error::operation_aborted)
+ if(!mStopping && error != asio::error::operation_aborted)
{
WarningLog(<< "UdpRelayServer::onSendFailure: " << error.value() << "-" << error.message());
}
diff --git a/reTurn/client/Makefile.am b/reTurn/client/Makefile.am
index 987295c..fd9ae85 100644
--- a/reTurn/client/Makefile.am
+++ b/reTurn/client/Makefile.am
@@ -1,6 +1,10 @@
# $Id$
+EXTRA_DIST = *.vcproj
+EXTRA_DIST += *.vcxproj *.vcxproj.filters
+
SUBDIRS = .
+SUBDIRS += test
#AM_CXXFLAGS = -I../../contrib/ares -DUSE_ARES
diff --git a/reTurn/client/Makefile.in b/reTurn/client/Makefile.in
index 2b8c5e5..743055b 100644
--- a/reTurn/client/Makefile.in
+++ b/reTurn/client/Makefile.in
@@ -272,7 +272,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = .
+EXTRA_DIST = *.vcproj *.vcxproj *.vcxproj.filters
+SUBDIRS = . test
#AM_CXXFLAGS = -I../../contrib/ares -DUSE_ARES
lib_LTLIBRARIES = libreTurnClient.la
diff --git a/reTurn/client/reTurnClient_10_0.vcxproj b/reTurn/client/reTurnClient_10_0.vcxproj
new file mode 100644
index 0000000..2cccc5d
--- /dev/null
+++ b/reTurn/client/reTurnClient_10_0.vcxproj
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>reTurnClient</ProjectName>
+ <ProjectGuid>{67B5906C-5C9D-4D09-AC7E-AF71D72175F8}</ProjectGuid>
+ <RootNamespace>reTurnClient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_IPV6;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)reTurnClient.lib</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_IPV6;USE_SSL;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)reTurnClient.lib</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\AsyncSocketBase.cxx" />
+ <ClCompile Include="..\AsyncTcpSocketBase.cxx" />
+ <ClCompile Include="..\AsyncTlsSocketBase.cxx" />
+ <ClCompile Include="..\AsyncUdpSocketBase.cxx" />
+ <ClCompile Include="..\ChannelManager.cxx" />
+ <ClCompile Include="..\DataBuffer.cxx" />
+ <ClCompile Include="..\RemotePeer.cxx" />
+ <ClCompile Include="..\ReTurnSubsystem.cxx" />
+ <ClCompile Include="..\StunMessage.cxx" />
+ <ClCompile Include="..\StunTuple.cxx" />
+ <ClCompile Include="TurnAsyncSocket.cxx" />
+ <ClCompile Include="TurnAsyncSocketHandler.cxx" />
+ <ClCompile Include="TurnAsyncTcpSocket.cxx" />
+ <ClCompile Include="TurnAsyncTlsSocket.cxx" />
+ <ClCompile Include="TurnAsyncUdpSocket.cxx" />
+ <ClCompile Include="TurnSocket.cxx" />
+ <ClCompile Include="TurnTcpSocket.cxx" />
+ <ClCompile Include="TurnTlsSocket.cxx" />
+ <ClCompile Include="TurnUdpSocket.cxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\AsyncSocketBase.hxx" />
+ <ClInclude Include="..\AsyncSocketBaseHandler.hxx" />
+ <ClInclude Include="..\AsyncTcpSocketBase.hxx" />
+ <ClInclude Include="..\AsyncTlsSocketBase.hxx" />
+ <ClInclude Include="..\AsyncUdpSocketBase.hxx" />
+ <ClInclude Include="..\ChannelManager.hxx" />
+ <ClInclude Include="..\DataBuffer.hxx" />
+ <ClInclude Include="ErrorCode.hxx" />
+ <ClInclude Include="..\RemotePeer.hxx" />
+ <ClInclude Include="..\ReTurnSubsystem.hxx" />
+ <ClInclude Include="..\StunMessage.hxx" />
+ <ClInclude Include="..\StunTuple.hxx" />
+ <ClInclude Include="TurnAsyncSocket.hxx" />
+ <ClInclude Include="TurnAsyncSocketHandler.hxx" />
+ <ClInclude Include="TurnAsyncTcpSocket.hxx" />
+ <ClInclude Include="TurnAsyncTlsSocket.hxx" />
+ <ClInclude Include="TurnAsyncUdpSocket.hxx" />
+ <ClInclude Include="TurnSocket.hxx" />
+ <ClInclude Include="TurnTcpSocket.hxx" />
+ <ClInclude Include="TurnTlsSocket.hxx" />
+ <ClInclude Include="TurnUdpSocket.hxx" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/reTurn/client/reTurnClient_10_0.vcxproj.filters b/reTurn/client/reTurnClient_10_0.vcxproj.filters
new file mode 100644
index 0000000..787128d
--- /dev/null
+++ b/reTurn/client/reTurnClient_10_0.vcxproj.filters
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\AsyncSocketBase.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\AsyncTcpSocketBase.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\AsyncTlsSocketBase.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\AsyncUdpSocketBase.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\ChannelManager.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\DataBuffer.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\RemotePeer.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\ReTurnSubsystem.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\StunMessage.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\StunTuple.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnAsyncSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnAsyncSocketHandler.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnAsyncTcpSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnAsyncTlsSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnAsyncUdpSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnTcpSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnTlsSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TurnUdpSocket.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\AsyncSocketBase.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\AsyncSocketBaseHandler.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\AsyncTcpSocketBase.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\AsyncTlsSocketBase.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\AsyncUdpSocketBase.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ChannelManager.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\DataBuffer.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ErrorCode.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\RemotePeer.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ReTurnSubsystem.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\StunMessage.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\StunTuple.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnAsyncSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnAsyncSocketHandler.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnAsyncTcpSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnAsyncTlsSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnAsyncUdpSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnTcpSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnTlsSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TurnUdpSocket.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/reTurn/client/reTurnClient_7_1.vcproj b/reTurn/client/reTurnClient_7_1.vcproj
new file mode 100644
index 0000000..915c313
--- /dev/null
+++ b/reTurn/client/reTurnClient_7_1.vcproj
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="reTurnClient"
+ ProjectGUID="{67B5906C-5C9D-4D09-AC7E-AF71D72175F8}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="4"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="4"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ RuntimeTypeInfo="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\AsyncSocketBase.cxx">
+ </File>
+ <File
+ RelativePath="..\AsyncTcpSocketBase.cxx">
+ </File>
+ <File
+ RelativePath="..\AsyncTlsSocketBase.cxx">
+ </File>
+ <File
+ RelativePath="..\AsyncUdpSocketBase.cxx">
+ </File>
+ <File
+ RelativePath="..\ChannelManager.cxx">
+ </File>
+ <File
+ RelativePath="..\DataBuffer.cxx">
+ </File>
+ <File
+ RelativePath="..\RemotePeer.cxx">
+ </File>
+ <File
+ RelativePath="..\ReTurnSubsystem.cxx">
+ </File>
+ <File
+ RelativePath="..\StunMessage.cxx">
+ </File>
+ <File
+ RelativePath="..\StunTuple.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocketHandler.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTcpSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTlsSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncUdpSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnTcpSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnTlsSocket.cxx">
+ </File>
+ <File
+ RelativePath=".\TurnUdpSocket.cxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath="..\AsyncSocketBase.hxx">
+ </File>
+ <File
+ RelativePath="..\AsyncSocketBaseHandler.hxx">
+ </File>
+ <File
+ RelativePath="..\AsyncTcpSocketBase.hxx">
+ </File>
+ <File
+ RelativePath="..\AsyncTlsSocketBase.hxx">
+ </File>
+ <File
+ RelativePath="..\AsyncUdpSocketBase.hxx">
+ </File>
+ <File
+ RelativePath="..\ChannelManager.hxx">
+ </File>
+ <File
+ RelativePath="..\DataBuffer.hxx">
+ </File>
+ <File
+ RelativePath=".\ErrorCode.hxx">
+ </File>
+ <File
+ RelativePath="..\RemotePeer.hxx">
+ </File>
+ <File
+ RelativePath="..\ReTurnSubsystem.hxx">
+ </File>
+ <File
+ RelativePath="..\StunMessage.hxx">
+ </File>
+ <File
+ RelativePath="..\StunTuple.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocketHandler.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTcpSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTlsSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnAsyncUdpSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnTcpSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnTlsSocket.hxx">
+ </File>
+ <File
+ RelativePath=".\TurnUdpSocket.hxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/reTurnClient_8_0.vcproj b/reTurn/client/reTurnClient_8_0.vcproj
new file mode 100644
index 0000000..13411a1
--- /dev/null
+++ b/reTurn/client/reTurnClient_8_0.vcproj
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="reTurnClient"
+ ProjectGUID="{67B5906C-5C9D-4D09-AC7E-AF71D72175F8}"
+ RootNamespace="reTurnClient"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_IPV6;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_IPV6;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\AsyncSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTcpSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTlsSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncUdpSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ChannelManager.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\DataBuffer.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\RemotePeer.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ReTurnSubsystem.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunMessage.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunTuple.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocketHandler.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTcpSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTlsSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncUdpSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTcpSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTlsSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnUdpSocket.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\AsyncSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncSocketBaseHandler.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTcpSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTlsSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncUdpSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ChannelManager.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\DataBuffer.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ErrorCode.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\RemotePeer.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ReTurnSubsystem.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunMessage.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunTuple.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocketHandler.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTcpSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTlsSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncUdpSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTcpSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTlsSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnUdpSocket.hxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/reTurnClient_9_0.vcproj b/reTurn/client/reTurnClient_9_0.vcproj
new file mode 100644
index 0000000..06505a1
--- /dev/null
+++ b/reTurn/client/reTurnClient_9_0.vcproj
@@ -0,0 +1,468 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="reTurnClient"
+ ProjectGUID="{67B5906C-5C9D-4D09-AC7E-AF71D72175F8}"
+ RootNamespace="reTurnClient"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_IPV6;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_IPV6;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="false"
+ RuntimeLibrary="2"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_IPV6;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ AdditionalIncludeDirectories="../../contrib/asio;../../contrib/boost_1_34_1;../../contrib/OpenSSL/include;../../contrib/OpenSSL/inc32;../../"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_IPV6;USE_SSL;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="false"
+ RuntimeLibrary="2"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/reTurnClient.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\AsyncSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTcpSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTlsSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncUdpSocketBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ChannelManager.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\DataBuffer.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\RemotePeer.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ReTurnSubsystem.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunMessage.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunTuple.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocketHandler.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTcpSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTlsSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncUdpSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTcpSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTlsSocket.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnUdpSocket.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\AsyncSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncSocketBaseHandler.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTcpSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncTlsSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\AsyncUdpSocketBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ChannelManager.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\DataBuffer.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ErrorCode.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\RemotePeer.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\ReTurnSubsystem.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunMessage.hxx"
+ >
+ </File>
+ <File
+ RelativePath="..\StunTuple.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncSocketHandler.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTcpSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncTlsSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnAsyncUdpSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTcpSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnTlsSocket.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\TurnUdpSocket.hxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/Makefile.am b/reTurn/client/test/Makefile.am
new file mode 100644
index 0000000..7f18061
--- /dev/null
+++ b/reTurn/client/test/Makefile.am
@@ -0,0 +1,24 @@
+
+EXTRA_DIST = ca.pem
+EXTRA_DIST += *.vcxproj *.vcxproj.filters
+EXTRA_DIST += *.vcproj
+
+LDADD = ../libreTurnClient.la
+LDADD += ../../../rutil/librutil.la
+LDADD += $(LIBSSL_LIBADD) -lpthread
+
+TESTS = \
+ TestClient \
+ TestAsyncClient \
+ TestRtpLoad
+
+check_PROGRAMS = \
+ TestClient \
+ TestAsyncClient \
+ TestRtpLoad
+
+TestClient_SOURCES = TestClient.cxx
+TestAsyncClient_SOURCES = TestAsyncClient.cxx
+TestRtpLoad_SOURCES = TestRtpLoad.cxx
+
+
diff --git a/reTurn/client/test/Makefile.in b/reTurn/client/test/Makefile.in
new file mode 100644
index 0000000..dce1710
--- /dev/null
+++ b/reTurn/client/test/Makefile.in
@@ -0,0 +1,609 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS = TestClient$(EXEEXT) TestAsyncClient$(EXEEXT) \
+ TestRtpLoad$(EXEEXT)
+check_PROGRAMS = TestClient$(EXEEXT) TestAsyncClient$(EXEEXT) \
+ TestRtpLoad$(EXEEXT)
+subdir = reTurn/client/test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_epoll.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am_TestAsyncClient_OBJECTS = TestAsyncClient.$(OBJEXT)
+TestAsyncClient_OBJECTS = $(am_TestAsyncClient_OBJECTS)
+TestAsyncClient_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+TestAsyncClient_DEPENDENCIES = ../libreTurnClient.la \
+ ../../../rutil/librutil.la $(am__DEPENDENCIES_1)
+am_TestClient_OBJECTS = TestClient.$(OBJEXT)
+TestClient_OBJECTS = $(am_TestClient_OBJECTS)
+TestClient_LDADD = $(LDADD)
+TestClient_DEPENDENCIES = ../libreTurnClient.la \
+ ../../../rutil/librutil.la $(am__DEPENDENCIES_1)
+am_TestRtpLoad_OBJECTS = TestRtpLoad.$(OBJEXT)
+TestRtpLoad_OBJECTS = $(am_TestRtpLoad_OBJECTS)
+TestRtpLoad_LDADD = $(LDADD)
+TestRtpLoad_DEPENDENCIES = ../libreTurnClient.la \
+ ../../../rutil/librutil.la $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(TestAsyncClient_SOURCES) $(TestClient_SOURCES) \
+ $(TestRtpLoad_SOURCES)
+DIST_SOURCES = $(TestAsyncClient_SOURCES) $(TestClient_SOURCES) \
+ $(TestRtpLoad_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GPERF = @GPERF@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBARES_LIBADD = @LIBARES_LIBADD@
+LIBGEOIP_LIBADD = @LIBGEOIP_LIBADD@
+LIBMYSQL_LIBADD = @LIBMYSQL_LIBADD@
+LIBOBJS = @LIBOBJS@
+LIBPOPT_LIBADD = @LIBPOPT_LIBADD@
+LIBRADIUS_LIBADD = @LIBRADIUS_LIBADD@
+LIBS = @LIBS@
+LIBSSL_LIBADD = @LIBSSL_LIBADD@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_RELEASE = @LIBTOOL_VERSION_RELEASE@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SO_RELEASE = @SO_RELEASE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = ca.pem *.vcxproj *.vcxproj.filters *.vcproj
+LDADD = ../libreTurnClient.la ../../../rutil/librutil.la \
+ $(LIBSSL_LIBADD) -lpthread
+TestClient_SOURCES = TestClient.cxx
+TestAsyncClient_SOURCES = TestAsyncClient.cxx
+TestRtpLoad_SOURCES = TestRtpLoad.cxx
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu reTurn/client/test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu reTurn/client/test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+TestAsyncClient$(EXEEXT): $(TestAsyncClient_OBJECTS) $(TestAsyncClient_DEPENDENCIES)
+ @rm -f TestAsyncClient$(EXEEXT)
+ $(CXXLINK) $(TestAsyncClient_OBJECTS) $(TestAsyncClient_LDADD) $(LIBS)
+TestClient$(EXEEXT): $(TestClient_OBJECTS) $(TestClient_DEPENDENCIES)
+ @rm -f TestClient$(EXEEXT)
+ $(CXXLINK) $(TestClient_OBJECTS) $(TestClient_LDADD) $(LIBS)
+TestRtpLoad$(EXEEXT): $(TestRtpLoad_OBJECTS) $(TestRtpLoad_DEPENDENCIES)
+ @rm -f TestRtpLoad$(EXEEXT)
+ $(CXXLINK) $(TestRtpLoad_OBJECTS) $(TestRtpLoad_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestAsyncClient.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestClient.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestRtpLoad.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/reTurn/client/test/TestAsyncClient.cxx b/reTurn/client/test/TestAsyncClient.cxx
new file mode 100644
index 0000000..97c1b35
--- /dev/null
+++ b/reTurn/client/test/TestAsyncClient.cxx
@@ -0,0 +1,328 @@
+#ifdef WIN32
+#pragma warning(disable : 4267)
+#endif
+
+#include <iostream>
+#include <string>
+#include <asio.hpp>
+#include <asio/ssl.hpp>
+#include <rutil/ThreadIf.hxx>
+
+#include "../../StunTuple.hxx"
+#include "../../StunMessage.hxx"
+#include "../TurnUdpSocket.hxx"
+#include "../TurnAsyncTcpSocket.hxx"
+#include "../TurnAsyncTlsSocket.hxx"
+#include "../TurnAsyncUdpSocket.hxx"
+#include "../TurnAsyncSocketHandler.hxx"
+#include <rutil/Logger.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace reTurn;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TEST
+//#define CONTINUOUSTESTMODE
+
+resip::Data address = resip::DnsUtil::getLocalIpAddress();
+
+void sleepSeconds(unsigned int seconds)
+{
+#ifdef WIN32
+ Sleep(seconds*1000);
+#else
+ sleep(seconds);
+#endif
+}
+
+// Simple UDP Echo Server
+class TurnPeer : public resip::ThreadIf
+{
+public:
+ TurnPeer() {}
+
+ virtual ~TurnPeer() {}
+
+ virtual void thread()
+ {
+ asio::error_code rc;
+ TurnUdpSocket turnSocket(asio::ip::address::from_string(address.c_str()), 2000);
+
+ char buffer[1024];
+ unsigned int size = sizeof(buffer);
+ asio::ip::address sourceAddress;
+ unsigned short sourcePort;
+ bool connected = false;
+
+ // Receive Data
+ rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort);
+ while((!rc || rc.value() == asio::error::operation_aborted) && !isShutdown())
+ {
+ if(!rc)
+ {
+ if(!connected)
+ {
+ turnSocket.connect(sourceAddress.to_string(), sourcePort);
+ connected = true;
+ }
+ InfoLog(<< "PEER: Received data from " << sourceAddress.to_string() << ":" << sourcePort << " - [" << resip::Data(buffer, size).c_str() << "]");
+ turnSocket.send(buffer, size);
+ }
+ size = sizeof(buffer);
+ rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort);
+ }
+
+ if(rc)
+ {
+ if(rc.value() != asio::error::operation_aborted)
+ {
+ ErrLog(<< "PEER: Receive error: " << rc.message());
+ }
+ }
+ }
+private:
+};
+
+class MyTurnAsyncSocketHandler : public TurnAsyncSocketHandler
+{
+public:
+ MyTurnAsyncSocketHandler() : mNumReceives(0) {}
+ virtual ~MyTurnAsyncSocketHandler() {}
+
+ virtual void onConnectSuccess(unsigned int socketDesc, const asio::ip::address& address, unsigned short port)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onConnectSuccess: socketDest=" << socketDesc << ", address=" << address.to_string() << ", port=" << port);
+ mTurnAsyncSocket->bindRequest();
+ }
+ virtual void onConnectFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onConnectFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onSharedSecretSuccess(unsigned int socketDesc, const char* username, unsigned int usernameSize, const char* password, unsigned int passwordSize)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSharedSecretSuccess: socketDest=" << socketDesc << ", username=" << username << ", password=" << password);
+ }
+
+ virtual void onSharedSecretFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSharedSecretFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onBindSuccess(unsigned int socketDesc, const StunTuple& reflexiveTuple)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onBindingSuccess: socketDest=" << socketDesc << ", reflexive=" << reflexiveTuple);
+ mTurnAsyncSocket->createAllocation(30, // TurnAsyncSocket::UnspecifiedLifetime,
+ TurnAsyncSocket::UnspecifiedBandwidth,
+ StunMessage::PropsPortPair,
+ TurnAsyncSocket::UnspecifiedToken,
+ StunTuple::UDP);
+ }
+ virtual void onBindFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onBindingFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onAllocationSuccess(unsigned int socketDesc, const StunTuple& reflexiveTuple, const StunTuple& relayTuple, unsigned int lifetime, unsigned int bandwidth, UInt64 reservationToken)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onAllocationSuccess: socketDest=" << socketDesc <<
+ ", reflexive=" << reflexiveTuple <<
+ ", relay=" << relayTuple <<
+ ", lifetime=" << lifetime <<
+ ", bandwidth=" << bandwidth <<
+ ", reservationToken=" << reservationToken);
+
+ // Test Data sending and receiving over allocation
+ resip::Data turnData("This test is for wrapped Turn Data!");
+ InfoLog( << "CLIENT: Sending: " << turnData);
+ mTurnAsyncSocket->sendTo(asio::ip::address::from_string(address.c_str()), 2000, turnData.c_str(), turnData.size()+1);
+
+ turnData = "This test should be in ChannelData message in TCP/TLS but not in UDP - since ChannelBindResponse is not yet received.";
+ InfoLog( << "CLIENT: Sending: " << turnData);
+ mTurnAsyncSocket->setActiveDestination(asio::ip::address::from_string(address.c_str()), 2000);
+ mTurnAsyncSocket->send(turnData.c_str(), turnData.size()+1);
+ }
+ virtual void onAllocationFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onAllocationFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+ virtual void onRefreshSuccess(unsigned int socketDesc, unsigned int lifetime)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onRefreshSuccess: socketDest=" << socketDesc << ", lifetime=" << lifetime);
+ if(lifetime == 0)
+ {
+ mTurnAsyncSocket->close();
+ }
+ }
+ virtual void onRefreshFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onRefreshFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onSetActiveDestinationSuccess(unsigned int socketDesc)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSetActiveDestinationSuccess: socketDest=" << socketDesc);
+ }
+ virtual void onSetActiveDestinationFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSetActiveDestinationFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+ virtual void onClearActiveDestinationSuccess(unsigned int socketDesc)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onClearActiveDestinationSuccess: socketDest=" << socketDesc);
+ }
+ virtual void onClearActiveDestinationFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onClearActiveDestinationFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onSendSuccess(unsigned int socketDesc)
+ {
+ //InfoLog( << "MyTurnAsyncSocketHandler::onSendSuccess: socketDest=" << socketDesc);
+ }
+ virtual void onSendFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSendFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onReceiveSuccess(unsigned int socketDesc, const asio::ip::address& address, unsigned short port, boost::shared_ptr<DataBuffer>& data)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onReceiveSuccess: socketDest=" << socketDesc << ", fromAddress=" << address.to_string() << ", fromPort=" << port << ", size=" << data->size() << ", data=" << data->data());
+
+ switch(++mNumReceives)
+ {
+ case 1:
+ break;
+ case 2:
+ {
+ resip::Data turnData("This test is for ChannelData message!");
+ InfoLog( << "CLIENT: Sending: " << turnData);
+ mTurnAsyncSocket->send(turnData.c_str(), turnData.size()+1);
+ }
+ break;
+ case 3:
+#ifdef CONTINUOUSTESTMODE
+ default:
+ {
+ sleepSeconds(1);
+ resip::Data turnData("This test is for ChannelData message!");
+ InfoLog( << "CLIENT: Sending: " << turnData);
+ mTurnAsyncSocket->send(turnData.c_str(), turnData.size()+1);
+ }
+#else
+ mTurnAsyncSocket->destroyAllocation();
+#endif
+ //mTurnAsyncSocket->close();
+ break;
+ }
+ }
+ virtual void onReceiveFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onReceiveFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ void setTurnAsyncSocket(TurnAsyncSocket* turnAsyncSocket) { mTurnAsyncSocket = turnAsyncSocket; }
+
+private:
+ TurnAsyncSocket* mTurnAsyncSocket;
+ unsigned int mNumReceives;
+};
+
+int main(int argc, char* argv[])
+{
+#if defined(WIN32) && defined(_DEBUG) && defined(LEAK_CHECK)
+ resip::FindMemoryLeaks fml;
+#endif
+ //resip::Log::initialize(resip::Log::Cout, resip::Log::Stack, argv[0]);
+
+ try
+ {
+ if (argc != 3 && argc != 4)
+ {
+ std::cerr << "Usage: TestAsyncClient <turn host> <turn port> [<local address>]\n";
+ return 1;
+ }
+ unsigned int port = resip::Data(argv[2]).convertUnsignedLong();
+ if(argc==4)
+ {
+ address = argv[3];
+ }
+
+ InfoLog(<< "Using " << address << " as local IP address.");
+
+ asio::error_code rc;
+ char username[256] = "test";
+ char password[256] = "1234";
+ TurnPeer turnPeer;
+ turnPeer.run();
+ asio::io_service ioService;
+ MyTurnAsyncSocketHandler handler;
+
+ // Setup SSL context
+ asio::ssl::context sslContext(ioService, asio::ssl::context::tlsv1);
+ // Enable certificate validation
+ sslContext.set_verify_mode(asio::ssl::context::verify_peer | // Verify the peer.
+ asio::ssl::context::verify_fail_if_no_peer_cert); // Fail verification if the peer has no certificate.
+ sslContext.load_verify_file("ca.pem");
+
+ boost::shared_ptr<TurnAsyncSocket> turnSocket(new TurnAsyncUdpSocket(ioService, &handler, asio::ip::address::from_string(address.c_str()), 0));
+ //boost::shared_ptr<TurnAsyncSocket> turnSocket(new TurnAsyncTcpSocket(ioService, &handler, asio::ip::address::from_string(address.c_str()), 0));
+ //boost::shared_ptr<TurnAsyncSocket> turnSocket(new TurnAsyncTlsSocket(ioService, sslContext, false /* validateServerCertificateHostname */, &handler, asio::ip::address::from_string(address.c_str()), 0));
+ //port=5349;
+
+ handler.setTurnAsyncSocket(turnSocket.get());
+
+ // Connect to Stun/Turn Server
+ turnSocket->connect(argv[1], port);
+
+ // Set the username and password
+ turnSocket->setUsernameAndPassword(username, password);
+
+ ioService.run();
+
+ turnPeer.shutdown();
+ turnPeer.join();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, Plantronics, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Plantronics nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/reTurn/client/test/TestAsyncClient_10_0.vcxproj b/reTurn/client/test/TestAsyncClient_10_0.vcxproj
new file mode 100644
index 0000000..ad8a916
--- /dev/null
+++ b/reTurn/client/test/TestAsyncClient_10_0.vcxproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>TestAsyncClient</ProjectName>
+ <ProjectGuid>{73151749-13F0-4093-97F1-A6952ECECDCF}</ProjectGuid>
+ <RootNamespace>TestAsyncClient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-TestAsyncClient.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(OutDir)TestAsyncClient.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>winmm.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)TestAsyncClient.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)TestAsyncClient.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-TestAsyncClient.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(OutDir)TestAsyncClient.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>winmm.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)TestAsyncClient.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="TestAsyncClient.cxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\rutil\rutil_10_0.vcxproj">
+ <Project>{3d0e5ceb-93dc-4fdb-918b-d08fa369e106}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\reTurnClient_10_0.vcxproj">
+ <Project>{67b5906c-5c9d-4d09-ac7e-af71d72175f8}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/reTurn/client/test/TestAsyncClient_10_0.vcxproj.filters b/reTurn/client/test/TestAsyncClient_10_0.vcxproj.filters
new file mode 100644
index 0000000..06620f9
--- /dev/null
+++ b/reTurn/client/test/TestAsyncClient_10_0.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="TestAsyncClient.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/reTurn/client/test/TestAsyncClient_7_1.vcproj b/reTurn/client/test/TestAsyncClient_7_1.vcproj
new file mode 100644
index 0000000..05e1d42
--- /dev/null
+++ b/reTurn/client/test/TestAsyncClient_7_1.vcproj
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="TestAsyncClient"
+ ProjectGUID="{73151749-13F0-4093-97F1-A6952ECECDCF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestAsyncClient.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/TestAsyncClient.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestAsyncClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\TestAsyncClient.cxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/TestAsyncClient_8_0.vcproj b/reTurn/client/test/TestAsyncClient_8_0.vcproj
new file mode 100644
index 0000000..43059b0
--- /dev/null
+++ b/reTurn/client/test/TestAsyncClient_8_0.vcproj
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="TestAsyncClient"
+ ProjectGUID="{73151749-13F0-4093-97F1-A6952ECECDCF}"
+ RootNamespace="TestAsyncClient"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestAsyncClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestAsyncClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestAsyncClient.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/TestAsyncClient.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestAsyncClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestAsyncClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestAsyncClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestAsyncClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestAsyncClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\TestAsyncClient.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/TestAsyncClient_9_0.vcproj b/reTurn/client/test/TestAsyncClient_9_0.vcproj
new file mode 100644
index 0000000..17395a7
--- /dev/null
+++ b/reTurn/client/test/TestAsyncClient_9_0.vcproj
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="TestAsyncClient"
+ ProjectGUID="{73151749-13F0-4093-97F1-A6952ECECDCF}"
+ RootNamespace="TestAsyncClient"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestAsyncClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestAsyncClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestAsyncClient.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/TestAsyncClient.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestAsyncClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestAsyncClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestAsyncClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestAsyncClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestAsyncClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\TestAsyncClient.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/TestClient.cxx b/reTurn/client/test/TestClient.cxx
new file mode 100644
index 0000000..9d8c44f
--- /dev/null
+++ b/reTurn/client/test/TestClient.cxx
@@ -0,0 +1,266 @@
+#ifdef WIN32
+#pragma warning(disable : 4267)
+#endif
+
+#include <iostream>
+#include <string>
+#include <asio.hpp>
+#include <asio/ssl.hpp>
+#include <rutil/ThreadIf.hxx>
+#include <rutil/Logger.hxx>
+
+#include "../../StunTuple.hxx"
+#include "../../StunMessage.hxx"
+#include "../TurnTcpSocket.hxx"
+#include "../TurnTlsSocket.hxx"
+#include "../TurnUdpSocket.hxx"
+
+using namespace reTurn;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TEST
+
+//#define CONTINUOUSTESTMODE
+#define NO_AUTHENTICATION
+
+void sleepSeconds(unsigned int seconds)
+{
+#ifdef WIN32
+ Sleep(seconds*1000);
+#else
+ sleep(seconds);
+#endif
+}
+
+// Simple UDP Echo Server
+class TurnPeer : public resip::ThreadIf
+{
+public:
+ TurnPeer() {}
+
+ virtual ~TurnPeer() {}
+
+ virtual void thread()
+ {
+ asio::error_code rc;
+ TurnUdpSocket turnSocket(asio::ip::address::from_string("127.0.0.1"), 2000);
+
+ char buffer[1024];
+ unsigned int size = sizeof(buffer);
+ asio::ip::address sourceAddress;
+ unsigned short sourcePort;
+ bool connected = false;
+
+ // Receive Data
+ rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort);
+ while((!rc || rc.value() == asio::error::operation_aborted) && !isShutdown())
+ {
+ if(!rc)
+ {
+ if(!connected)
+ {
+ turnSocket.connect(sourceAddress.to_string(), sourcePort);
+ connected = true;
+ }
+ InfoLog( << "PEER: Received data from " << sourceAddress.to_string() << ":" << sourcePort << " - [" << resip::Data(buffer, size).c_str() << "]");
+ turnSocket.send(buffer, size);
+ }
+ size = sizeof(buffer);
+ rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort);
+ }
+
+ if(rc)
+ {
+ if(rc.value() != asio::error::operation_aborted)
+ {
+ ErrLog( << "PEER: Receive error: " << rc.message());
+ }
+ }
+ }
+private:
+};
+
+#define MAX_RUNS 1000
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: TestClient <turn host> <turn port>\n";
+ return 1;
+ }
+ unsigned int port = resip::Data(argv[2]).convertUnsignedLong();
+
+ asio::error_code rc;
+ char username[256] = "test";
+ char password[256] = "1234";
+ TurnPeer turnPeer;
+ turnPeer.run();
+
+#ifndef NO_AUTHENTICATION
+ { // Connect via TLS, get SharedSecret, and disconnect
+ TurnTlsSocket tlsSocket(asio::ip::address::from_string("127.0.0.1"), 40001);
+ rc = tlsSocket.requestSharedSecret(asio::ip::address::from_string(argv[1]),
+ port.convertUnsignedLong()+1,
+ username, sizeof(username),
+ password, sizeof(password));
+ }
+
+ if(rc != 0)
+ {
+ std::cout << "Error getting shared secret: rc=" << rc..message() << std::endl;
+ return 1;
+ }
+
+ std::cout << "CLIENT: SharedSecret obtained: Username=" << username
+ << " Password=" << password
+ << std::endl;
+#endif
+
+ TurnUdpSocket turnSocket(asio::ip::address::from_string("127.0.0.1"), 0);
+ //TurnTcpSocket turnSocket(asio::ip::address::from_string("127.0.0.1"), 0);
+ //TurnTlsSocket turnSocket(false /* validateServerCertificateHostname */, asio::ip::address::from_string("127.0.0.1"), 0);
+ //port=5349;
+
+ // Connect to Stun/Turn Server
+ rc = turnSocket.connect(argv[1], port);
+ if(rc)
+ {
+ std::cout << "CLIENT: Error calling connect: rc=" << rc.message() << std::endl;
+ return 1;
+ }
+
+ // Set the username and password
+ turnSocket.setUsernameAndPassword(username, password);
+
+ // Test bind request
+ rc = turnSocket.bindRequest();
+ if(rc)
+ {
+ InfoLog(<< "CLIENT: Error calling bindRequest: rc=" << rc.message() << ", value=" << rc.value());
+ return 1;
+ }
+ else
+ {
+ InfoLog( << "CLIENT: Bind Successful! Reflexive=" << turnSocket.getReflexiveTuple());
+ }
+
+ // Test allocation
+ rc = turnSocket.createAllocation(30, // TurnSocket::UnspecifiedLifetime,
+ TurnSocket::UnspecifiedBandwidth,
+ StunMessage::PropsPortPair,
+ TurnSocket::UnspecifiedToken,
+ StunTuple::UDP);
+ if(rc)
+ {
+ InfoLog( << "CLIENT: Error creating allocation: rc=" << rc.message());
+ }
+ else
+ {
+ InfoLog( << "CLIENT: Allocation Successful! Relay=" << turnSocket.getRelayTuple()
+ << " Reflexive=" << turnSocket.getReflexiveTuple()
+ << " Lifetime=" << turnSocket.getLifetime()
+ << " Bandwidth=" << turnSocket.getBandwidth());
+
+ char buffer[1024];
+ unsigned int size = sizeof(buffer);
+ asio::ip::address sourceAddress;
+ unsigned short sourcePort;
+
+ // Test Data sending and receiving over allocation
+ resip::Data turnData("This test is for wrapped Turn Data!");
+ InfoLog(<< "CLIENT: Sending: " << turnData);
+ turnSocket.sendTo(asio::ip::address::from_string("127.0.0.1"), 2000, turnData.c_str(), turnData.size());
+
+ turnData = "This test should be a Channel Data message in TCP/TLS but not in UDP - since ChannelBindResponse is not yet received.";
+ InfoLog( << "CLIENT: Sending: " << turnData);
+ turnSocket.setActiveDestination(asio::ip::address::from_string("127.0.0.1"), 2000);
+ turnSocket.send(turnData.c_str(), turnData.size());
+
+ // Receive Data
+ while(!(rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort)))
+ {
+ InfoLog(<< "CLIENT: Received data from " << sourceAddress.to_string() << ":" << sourcePort << " - [" << resip::Data(buffer, size).c_str() << "]");
+ size = sizeof(buffer);
+ }
+ if(rc)
+ {
+ if(rc.value() != asio::error::operation_aborted)
+ {
+ InfoLog( << "CLIENT: Receive error: [" << rc.value() << "] " << rc.message());
+ }
+ }
+
+#ifdef CONTINUOUSTESTMODE
+ while(!rc || rc.value() == asio::error::operation_aborted) {
+#endif
+ turnData = "This test is for ChannelData message!";
+ InfoLog( << "CLIENT: Sending: " << turnData);
+ turnSocket.send(turnData.c_str(), turnData.size());
+
+
+ while(!(rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort)))
+ {
+ InfoLog(<< "CLIENT: Received data from " << sourceAddress.to_string() << ":" << sourcePort << " - [" << resip::Data(buffer, size).c_str() << "]");
+ size = sizeof(buffer);
+ }
+ if(rc)
+ {
+ if(rc.value() != asio::error::operation_aborted)
+ {
+ InfoLog( << "CLIENT: Receive error: [" << rc.value() << "] " << rc.message());
+ }
+ }
+#ifdef CONTINUOUSTESTMODE
+ sleepSeconds(1);
+ }//end while
+#endif
+ turnSocket.destroyAllocation();
+ }
+
+ turnPeer.shutdown();
+ turnPeer.join();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, Plantronics, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Plantronics nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/reTurn/client/test/TestClient_10_0.vcxproj b/reTurn/client/test/TestClient_10_0.vcxproj
new file mode 100644
index 0000000..5cc205d
--- /dev/null
+++ b/reTurn/client/test/TestClient_10_0.vcxproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>TestClient</ProjectName>
+ <ProjectGuid>{73151749-13F0-4093-97F1-A6952ECECDBF}</ProjectGuid>
+ <RootNamespace>TestClient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-TestClient.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;LEAK_CHECK;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(OutDir)TestClient.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>winmm.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)TestClient.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)TestClient.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-TestClient.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(OutDir)TestClient.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>winmm.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)TestClient.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="TestClient.cxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\rutil\rutil_10_0.vcxproj">
+ <Project>{3d0e5ceb-93dc-4fdb-918b-d08fa369e106}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\reTurnClient_10_0.vcxproj">
+ <Project>{67b5906c-5c9d-4d09-ac7e-af71d72175f8}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/reTurn/client/test/TestClient_10_0.vcxproj.filters b/reTurn/client/test/TestClient_10_0.vcxproj.filters
new file mode 100644
index 0000000..0493f2e
--- /dev/null
+++ b/reTurn/client/test/TestClient_10_0.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="TestClient.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/reTurn/client/test/TestClient_7_1.vcproj b/reTurn/client/test/TestClient_7_1.vcproj
new file mode 100644
index 0000000..1ad6826
--- /dev/null
+++ b/reTurn/client/test/TestClient_7_1.vcproj
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="TestClient"
+ ProjectGUID="{73151749-13F0-4093-97F1-A6952ECECDBF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestClient.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/TestClient.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\TestClient.cxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/TestClient_8_0.vcproj b/reTurn/client/test/TestClient_8_0.vcproj
new file mode 100644
index 0000000..e76b773
--- /dev/null
+++ b/reTurn/client/test/TestClient_8_0.vcproj
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="TestClient"
+ ProjectGUID="{73151749-13F0-4093-97F1-A6952ECECDBF}"
+ RootNamespace="TestClient"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestClient.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/TestClient.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\TestClient.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/TestClient_9_0.vcproj b/reTurn/client/test/TestClient_9_0.vcproj
new file mode 100644
index 0000000..01328fe
--- /dev/null
+++ b/reTurn/client/test/TestClient_9_0.vcproj
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="TestClient"
+ ProjectGUID="{73151749-13F0-4093-97F1-A6952ECECDBF}"
+ RootNamespace="TestClient"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;LEAK_CHECK;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0500;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestClient.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/TestClient.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-TestClient.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../contrib/asio;../../../contrib/boost_1_34_1;../../../;../../../contrib/OpenSSL/include;../../../contrib/OpenSSL/inc32"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_ALL_NO_LIB;_WIN32_WINNT=0x0501;USE_SSL;LEAK_CHECK;ASIO_ENABLE_CANCELIO"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(OutDir)/TestClient.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" iphlpapi.lib"
+ OutputFile="$(OutDir)/TestClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ DependencyInformationFile="$(IntDir)\mt-TestClient.dep"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\TestClient.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/reTurn/client/test/TestRtpLoad.cxx b/reTurn/client/test/TestRtpLoad.cxx
new file mode 100644
index 0000000..3184405
--- /dev/null
+++ b/reTurn/client/test/TestRtpLoad.cxx
@@ -0,0 +1,377 @@
+#ifdef WIN32
+#pragma warning(disable : 4267)
+#endif
+
+#include <iostream>
+#include <string>
+#include <asio.hpp>
+#include <asio/ssl.hpp>
+#include <rutil/ThreadIf.hxx>
+
+#include "../../StunTuple.hxx"
+#include "../../StunMessage.hxx"
+#include "../TurnUdpSocket.hxx"
+#include "../TurnAsyncTcpSocket.hxx"
+#include "../TurnAsyncTlsSocket.hxx"
+#include "../TurnAsyncUdpSocket.hxx"
+#include "../TurnAsyncSocketHandler.hxx"
+#include <rutil/Timer.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace reTurn;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TEST
+
+static unsigned int NUM_RTP_PACKETS_TO_SIMULATE=1500; // 30 seconds worth of RTP data
+static unsigned int PACKET_TIME_TO_SIMULATE=20; // 20 ms
+
+// Test Config 1
+//#define RECEIVE_ONLY
+//#define ALLOC_PORT 50000
+//#define OTHER_PORT 50002
+
+// Test Config 2
+//#define SEND_ONLY
+//#define ALLOC_PORT 50002
+//#define OTHER_PORT 50000
+
+// Test Config 3
+//#define EXTERNAL_ECHO_SERVER
+//#define OTHER_HOST "192.168.1.69"
+//#define OTHER_PORT 2000
+
+// Test Config 4
+//#define ECHO_SERVER_ONLY
+
+resip::Data address = resip::DnsUtil::getLocalIpAddress();
+resip::Data turnAddress;
+char rtpPayloadData[172]; // 172 bytes of random data to simulate RTP payload
+resip::Data rtpPayload(rtpPayloadData, sizeof(rtpPayloadData));
+
+void sleepMS(unsigned int ms)
+{
+#ifdef WIN32
+ Sleep(ms);
+#else
+ usleep(ms*1000);
+#endif
+}
+
+// Simple UDP Echo Server
+class TurnPeer : public resip::ThreadIf
+{
+public:
+ TurnPeer() {}
+
+ virtual ~TurnPeer() {}
+
+ virtual void thread()
+ {
+ asio::error_code rc;
+ TurnUdpSocket turnSocket(asio::ip::address::from_string(address.c_str()), 2000);
+
+ char buffer[1024];
+ unsigned int size = sizeof(buffer);
+ asio::ip::address sourceAddress;
+ unsigned short sourcePort;
+ bool connected = false;
+
+ // Receive Data
+ rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort);
+ while((!rc || rc.value() == asio::error::operation_aborted) && !isShutdown())
+ {
+ if(!rc)
+ {
+ if(!connected)
+ {
+ turnSocket.connect(sourceAddress.to_string(), sourcePort);
+ connected = true;
+ }
+ //InfoLog(<< "PEER: Received data from " << sourceAddress << ":" << sourcePort << " - [" << resip::Data(buffer, size).c_str() << "]");
+ turnSocket.send(buffer, size);
+ }
+ size = sizeof(buffer);
+ rc=turnSocket.receive(buffer, size, 1000, &sourceAddress, &sourcePort);
+ }
+
+ if(rc)
+ {
+ if(rc.value() != asio::error::operation_aborted)
+ {
+ ErrLog(<< "PEER: Receive error: " << rc.message());
+ }
+ }
+ }
+private:
+};
+
+class MyTurnAsyncSocketHandler : public TurnAsyncSocketHandler
+{
+public:
+ MyTurnAsyncSocketHandler(asio::io_service& ioService) : mIOService(ioService), mTimer(ioService), mNumReceives(0), mNumSends(0) {}
+ virtual ~MyTurnAsyncSocketHandler() {}
+
+ void sendRtpSimPacket()
+ {
+ if(++mNumSends <= NUM_RTP_PACKETS_TO_SIMULATE)
+ {
+ mTimer.expires_from_now(boost::posix_time::milliseconds(PACKET_TIME_TO_SIMULATE));
+ mTimer.async_wait(boost::bind(&MyTurnAsyncSocketHandler::sendRtpSimPacket, this));
+ //InfoLog(<< "Sending packet " << mNumReceives << "...");
+ mTurnAsyncSocket->send(rtpPayload.data(), rtpPayload.size());
+ }
+ else
+ {
+ InfoLog(<< "Done sending " << NUM_RTP_PACKETS_TO_SIMULATE << " packets (" << mNumReceives << " receives have already been completed).");
+#ifdef SEND_ONLY
+ mTurnAsyncSocket->destroyAllocation();
+#endif
+ }
+ }
+
+ virtual void onConnectSuccess(unsigned int socketDesc, const asio::ip::address& address, unsigned short port)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onConnectSuccess: socketDest=" << socketDesc << ", address=" << address.to_string() << ", port=" << port);
+ mTurnAsyncSocket->bindRequest();
+ }
+ virtual void onConnectFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onConnectFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onSharedSecretSuccess(unsigned int socketDesc, const char* username, unsigned int usernameSize, const char* password, unsigned int passwordSize)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSharedSecretSuccess: socketDest=" << socketDesc << ", username=" << username << ", password=" << password);
+ }
+
+ virtual void onSharedSecretFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSharedSecretFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onBindSuccess(unsigned int socketDesc, const StunTuple& reflexiveTuple)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onBindingSuccess: socketDest=" << socketDesc << ", reflexive=" << reflexiveTuple);
+ mTurnAsyncSocket->createAllocation(30, // TurnSocket::UnspecifiedLifetime,
+ TurnSocket::UnspecifiedBandwidth,
+ StunMessage::PropsPortPair,
+ TurnAsyncSocket::UnspecifiedToken,
+ StunTuple::UDP);
+ }
+ virtual void onBindFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onBindingFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onAllocationSuccess(unsigned int socketDesc, const StunTuple& reflexiveTuple, const StunTuple& relayTuple, unsigned int lifetime, unsigned int bandwidth, UInt64 reservationToken)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onAllocationSuccess: socketDest=" << socketDesc <<
+ ", reflexive=" << reflexiveTuple <<
+ ", relay=" << relayTuple <<
+ ", lifetime=" << lifetime <<
+ ", bandwidth=" << bandwidth <<
+ ", reservationToken=" << reservationToken);
+
+#ifdef RECEIVE_ONLY
+ // Send one packet of data so that it opens permission
+ mTurnAsyncSocket->sendTo(asio::ip::address::from_string(turnAddress.c_str()), OTHER_PORT, rtpPayload.data(), rtpPayload.size());
+#else
+#ifdef SEND_ONLY
+ mTurnAsyncSocket->setActiveDestination(asio::ip::address::from_string(turnAddress.c_str()), OTHER_PORT);
+#else
+#ifdef EXTERNAL_ECHO_SERVER
+ mTurnAsyncSocket->setActiveDestination(asio::ip::address::from_string(OTHER_HOST), OTHER_PORT);
+#else
+ mTurnAsyncSocket->setActiveDestination(asio::ip::address::from_string(address.c_str()), 2000);
+#endif
+#endif
+#endif
+ }
+ virtual void onAllocationFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onAllocationFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+ virtual void onRefreshSuccess(unsigned int socketDesc, unsigned int lifetime)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onRefreshSuccess: socketDest=" << socketDesc << ", lifetime=" << lifetime);
+ if(lifetime == 0)
+ {
+ InfoLog(<< "It took " << (time(0) - mStartTime) << " seconds to do " << NUM_RTP_PACKETS_TO_SIMULATE << " receives paced at " << PACKET_TIME_TO_SIMULATE << "ms apart.");
+
+ mTurnAsyncSocket->close();
+ }
+ }
+ virtual void onRefreshFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onRefreshFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onSetActiveDestinationSuccess(unsigned int socketDesc)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSetActiveDestinationSuccess: socketDest=" << socketDesc);
+ InfoLog(<< "Sending RTP payload...");
+ mStartTime = time(0);
+ sendRtpSimPacket();
+ }
+ virtual void onSetActiveDestinationFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSetActiveDestinationFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+ virtual void onClearActiveDestinationSuccess(unsigned int socketDesc)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onClearActiveDestinationSuccess: socketDest=" << socketDesc);
+ }
+ virtual void onClearActiveDestinationFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onClearActiveDestinationFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onSendSuccess(unsigned int socketDesc)
+ {
+ //InfoLog( << "MyTurnAsyncSocketHandler::onSendSuccess: socketDest=" << socketDesc);
+ }
+ virtual void onSendFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onSendFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ virtual void onReceiveSuccess(unsigned int socketDesc, const asio::ip::address& address, unsigned short port, boost::shared_ptr<DataBuffer>& data)
+ {
+ //InfoLog( << "MyTurnAsyncSocketHandler::onReceiveSuccess: socketDest=" << socketDesc << ", fromAddress=" << address << ", fromPort=" << port << ", size=" << data->size() << ", data=" << data->data());
+ if(++mNumReceives == NUM_RTP_PACKETS_TO_SIMULATE)
+ {
+ InfoLog(<< "Done receiving " << NUM_RTP_PACKETS_TO_SIMULATE << " packets.");
+ mTurnAsyncSocket->destroyAllocation();
+ }
+ }
+ virtual void onReceiveFailure(unsigned int socketDesc, const asio::error_code& e)
+ {
+ InfoLog( << "MyTurnAsyncSocketHandler::onReceiveFailure: socketDest=" << socketDesc << " error=" << e.value() << "(" << e.message() << ").");
+ }
+
+ void setTurnAsyncSocket(TurnAsyncSocket* turnAsyncSocket) { mTurnAsyncSocket = turnAsyncSocket; }
+
+private:
+ asio::io_service& mIOService;
+ asio::deadline_timer mTimer;
+ TurnAsyncSocket* mTurnAsyncSocket;
+ unsigned int mNumReceives;
+ unsigned int mNumSends;
+ time_t mStartTime;
+ UInt64 mRTPSendTime;
+};
+
+int main(int argc, char* argv[])
+{
+#ifdef WIN32
+ resip::FindMemoryLeaks fml;
+#endif
+ try
+ {
+ //if (argc == 2)
+ //{
+ // InfoLog(<< "Starting Echo server only...");
+ // TurnPeer turnPeer;
+ // turnPeer.run();
+ // turnPeer.join();
+ // return 0;
+ //}
+
+ if (argc < 3)
+ {
+ std::cerr << "Usage: stunTestClient <host> <port> [<PacketTime>]\n";
+ return 1;
+ }
+ turnAddress = argv[1];
+ unsigned int port = resip::Data(argv[2]).convertUnsignedLong();
+
+ if(argc == 4)
+ {
+ PACKET_TIME_TO_SIMULATE = atoi(argv[3]);
+ }
+ InfoLog(<< "Using " << address << " as local IP address.");
+
+ asio::error_code rc;
+ char username[256] = "test";
+ char password[256] = "1234";
+#ifndef OTHER_PORT
+ TurnPeer turnPeer;
+ turnPeer.run();
+#endif
+
+#ifndef ECHO_SERVER_ONLY
+ asio::io_service ioService;
+ MyTurnAsyncSocketHandler handler(ioService);
+
+ asio::ssl::context sslContext(ioService, asio::ssl::context::tlsv1);
+ // Setup SSL context
+ sslContext.set_verify_mode(asio::ssl::context::verify_peer);
+ sslContext.load_verify_file("ca.pem");
+
+ boost::shared_ptr<TurnAsyncSocket> turnSocket(new TurnAsyncUdpSocket(ioService, &handler, asio::ip::address::from_string(address.c_str()), 0));
+ //boost::shared_ptr<TurnAsyncSocket> turnSocket(new TurnAsyncTcpSocket(ioService, &handler, asio::ip::address::from_string(address.c_str()), 0));
+ //boost::shared_ptr<TurnAsyncSocket> turnSocket(new TurnAsyncTlsSocket(ioService, sslContext, &handler, asio::ip::address::from_string(address.c_str()), 0)); port++;
+
+ handler.setTurnAsyncSocket(turnSocket.get());
+
+ // Connect to Stun/Turn Server
+ turnSocket->connect(turnAddress.c_str(), port);
+
+ // Set the username and password
+ turnSocket->setUsernameAndPassword(username, password);
+
+ ioService.run();
+
+#ifndef OTHER_PORT
+ turnPeer.shutdown();
+ turnPeer.join();
+#endif
+#else
+ turnPeer.join();
+#endif
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, Plantronics, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Plantronics nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/reTurn/client/test/ca.pem b/reTurn/client/test/ca.pem
new file mode 100644
index 0000000..083de37
--- /dev/null
+++ b/reTurn/client/test/ca.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDJDCCAo2gAwIBAgIBADANBgkqhkiG9w0BAQUFADBwMQswCQYDVQQGEwJVUzET
+MBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIU2FuIEpvc2UxDjAMBgNVBAoT
+BXNpcGl0MSkwJwYDVQQLEyBTaXBpdCBUZXN0IENlcnRpZmljYXRlIEF1dGhvcml0
+eTAeFw0wMzA3MTgxMjIxNTJaFw0xMzA3MTUxMjIxNTJaMHAxCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEOMAwGA1UE
+ChMFc2lwaXQxKTAnBgNVBAsTIFNpcGl0IFRlc3QgQ2VydGlmaWNhdGUgQXV0aG9y
+aXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDIh6DkcUDLDyK9BEUxkud
++nJ4xrCVGKfgjHm6XaSuHiEtnfELHM+9WymzkBNzZpJu30yzsxwfKoIKugdNUrD4
+N3viCicwcN35LgP/KnbN34cavXHr4ZlqxH+OdKB3hQTpQa38A7YXdaoz6goW2ft5
+Mi74z03GNKP/G9BoKOGd5QIDAQABo4HNMIHKMB0GA1UdDgQWBBRrRhcU6pR2JYBU
+bhNU2qHjVBShtjCBmgYDVR0jBIGSMIGPgBRrRhcU6pR2JYBUbhNU2qHjVBShtqF0
+pHIwcDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcT
+CFNhbiBKb3NlMQ4wDAYDVQQKEwVzaXBpdDEpMCcGA1UECxMgU2lwaXQgVGVzdCBD
+ZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B
+AQUFAAOBgQCWbRvv1ZGTRXxbH8/EqkdSCzSoUPrs+rQqR0xdQac9wNY/nlZbkR3O
+qAezG6Sfmklvf+DOg5RxQq/+Y6I03LRepc7KeVDpaplMFGnpfKsibETMipwzayNQ
+QgUf4cKBiF+65Ue7hZuDJa2EMv8qW4twEhGDYclpFU9YozyS1OhvUg==
+-----END CERTIFICATE-----
diff --git a/reTurn/test/Makefile.am b/reTurn/test/Makefile.am
index 33986fa..6b445cc 100644
--- a/reTurn/test/Makefile.am
+++ b/reTurn/test/Makefile.am
@@ -5,27 +5,17 @@ EXTRA_DIST += *.vcproj
#AM_CXXFLAGS = -DUSE_ARES
-LDADD = ../../rutil/librutil.la
-#LDADD += ../../contrib/ares/libares.a
+LDADD = ../client/libreTurnClient.la
+LDADD += ../../rutil/librutil.la
LDADD += $(LIBSSL_LIBADD) -lpthread
-#
-# This doesn't work because the Stun classes for reTurn are built
-# into a binary rather than a library.
-#
-# Strategy:
-# - take common classes for reTurn client and server, make a library for
-# out of them
-# - use the library for building the client and server
-# - use the library for building this test case again
-#
-#TESTS = \
-# stunTestVectors
+TESTS = \
+ stunTestVectors
-#check_PROGRAMS = \
-# stunTestVectors
+check_PROGRAMS = \
+ stunTestVectors
-#stunTestVectors_SOURCES = stunTestVectors.cxx
+stunTestVectors_SOURCES = stunTestVectors.cxx
##############################################################################
#
diff --git a/reTurn/test/Makefile.in b/reTurn/test/Makefile.in
index 84be34f..760a8e3 100644
--- a/reTurn/test/Makefile.in
+++ b/reTurn/test/Makefile.in
@@ -35,6 +35,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+TESTS = stunTestVectors$(EXEEXT)
+check_PROGRAMS = stunTestVectors$(EXEEXT)
subdir = reTurn/test
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -49,8 +51,31 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
+am_stunTestVectors_OBJECTS = stunTestVectors.$(OBJEXT)
+stunTestVectors_OBJECTS = $(am_stunTestVectors_OBJECTS)
+stunTestVectors_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+stunTestVectors_DEPENDENCIES = ../client/libreTurnClient.la \
+ ../../rutil/librutil.la $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(stunTestVectors_SOURCES)
+DIST_SOURCES = $(stunTestVectors_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -182,11 +207,13 @@ EXTRA_DIST = stunTestVectors_10_0.vcxproj \
stunTestVectors_10_0.vcxproj.filters *.vcproj
#AM_CXXFLAGS = -DUSE_ARES
-#LDADD += ../../contrib/ares/libares.a
-LDADD = ../../rutil/librutil.la $(LIBSSL_LIBADD) -lpthread
+LDADD = ../client/libreTurnClient.la ../../rutil/librutil.la \
+ $(LIBSSL_LIBADD) -lpthread
+stunTestVectors_SOURCES = stunTestVectors.cxx
all: all-am
.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -218,17 +245,196 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+stunTestVectors$(EXEEXT): $(stunTestVectors_OBJECTS) $(stunTestVectors_DEPENDENCIES)
+ @rm -f stunTestVectors$(EXEEXT)
+ $(CXXLINK) $(stunTestVectors_OBJECTS) $(stunTestVectors_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/stunTestVectors.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
tags: TAGS
-TAGS:
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
ctags: CTAGS
-CTAGS:
-
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -261,6 +467,8 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
@@ -291,11 +499,14 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -338,12 +549,14 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
pdf: pdf-am
@@ -355,37 +568,22 @@ ps-am:
uninstall-am:
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-#
-# This doesn't work because the Stun classes for reTurn are built
-# into a binary rather than a library.
-#
-# Strategy:
-# - take common classes for reTurn client and server, make a library for
-# out of them
-# - use the library for building the client and server
-# - use the library for building this test case again
-#
-#TESTS = \
-# stunTestVectors
-
-#check_PROGRAMS = \
-# stunTestVectors
-
-#stunTestVectors_SOURCES = stunTestVectors.cxx
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
##############################################################################
#
diff --git a/reTurn/test/stunTestVectors.cxx b/reTurn/test/stunTestVectors.cxx
new file mode 100644
index 0000000..c662192
--- /dev/null
+++ b/reTurn/test/stunTestVectors.cxx
@@ -0,0 +1,194 @@
+// This file implements test vectors from: draft-ietf-behave-stun-test-vectors-04
+
+#include <iostream>
+#include <string>
+#include <asio.hpp>
+
+#include "../StunTuple.hxx"
+#include "../StunMessage.hxx"
+#include <rutil/Logger.hxx>
+#include <rutil/DnsUtil.hxx>
+
+using namespace reTurn;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TEST
+
+int main(int argc, char* argv[])
+{
+ StunTuple local(StunTuple::UDP, asio::ip::address::from_string("10.0.0.1"), 5000);
+ StunTuple remote(StunTuple::UDP, asio::ip::address::from_string("10.0.0.2"), 5001);
+
+ resip::Log::initialize(resip::Log::Cout, resip::Log::Info, "");
+
+ const unsigned char req[] =
+ "\x00\x01\x00\x58"
+ "\x21\x12\xa4\x42"
+ "\xb7\xe7\xa7\x01\xbc\x34\xd6\x86\xfa\x87\xdf\xae"
+ "\x80\x22\x00\x10"
+ "STUN test client"
+ "\x00\x24\x00\x04"
+ "\x6e\x00\x01\xff"
+ "\x80\x29\x00\x08"
+ "\x93\x2f\xf9\xb1\x51\x26\x3b\x36"
+ "\x00\x06\x00\x09"
+ "\x65\x76\x74\x6a\x3a\x68\x36\x76\x59\x20\x20\x20"
+ "\x00\x08\x00\x14"
+ "\x9a\xea\xa7\x0c\xbf\xd8\xcb\x56\x78\x1e\xf2\xb5"
+ "\xb2\xd3\xf2\x49\xc1\xb5\x71\xa2"
+ "\x80\x28\x00\x04"
+ "\xe5\x7a\x3b\xcf";
+
+ StunMessage reqMessage(local, remote, (char*)req, sizeof(req)-1);
+
+ assert(reqMessage.isValid());
+ assert(reqMessage.mHasMagicCookie);
+ assert(reqMessage.mUnknownRequiredAttributes.numAttributes == 1); // Test vector includes comprehension required Priority ICE attribute - we don't support this yet
+ assert(reqMessage.mHasSoftware);
+ assert(*reqMessage.mSoftware == "STUN test client");
+ assert(reqMessage.mHasUsername);
+ assert(*reqMessage.mUsername == "evtj:h6vY");
+ assert(reqMessage.mHasMessageIntegrity);
+ assert(reqMessage.checkMessageIntegrity("VOkJxbRl1RmTxUk/WvJxBt"));
+ assert(reqMessage.mHasFingerprint);
+ assert(reqMessage.checkFingerprint());
+
+ const unsigned char respv4[] =
+ "\x01\x01\x00\x3c"
+ "\x21\x12\xa4\x42"
+ "\xb7\xe7\xa7\x01\xbc\x34\xd6\x86\xfa\x87\xdf\xae"
+ "\x80\x22\x00\x0b"
+ "\x74\x65\x73\x74\x20\x76\x65\x63\x74\x6f\x72\x20"
+ "\x00\x20\x00\x08"
+ "\x00\x01\xa1\x47\xe1\x12\xa6\x43"
+ "\x00\x08\x00\x14"
+ "\x2b\x91\xf5\x99\xfd\x9e\x90\xc3\x8c\x74\x89\xf9"
+ "\x2a\xf9\xba\x53\xf0\x6b\xe7\xd7"
+ "\x80\x28\x00\x04"
+ "\xc0\x7d\x4c\x96";
+
+ StunMessage respv4Message(local, remote, (char*)respv4, sizeof(respv4)-1);
+
+ assert(respv4Message.isValid());
+ assert(respv4Message.mHasMagicCookie);
+ assert(respv4Message.mHasSoftware);
+ assert(*respv4Message.mSoftware == "test vector");
+ assert(respv4Message.mHasXorMappedAddress);
+ assert(respv4Message.mXorMappedAddress.family == StunMessage::IPv4Family);
+ assert(respv4Message.mXorMappedAddress.port == 32853);
+ assert(respv4Message.mXorMappedAddress.addr.ipv4 == asio::ip::address::from_string("192.0.2.1").to_v4().to_ulong());
+ assert(respv4Message.mHasMessageIntegrity);
+ assert(respv4Message.checkMessageIntegrity("VOkJxbRl1RmTxUk/WvJxBt"));
+ assert(respv4Message.mHasFingerprint);
+ assert(respv4Message.checkFingerprint());
+
+ const unsigned char respv6[] =
+ "\x01\x01\x00\x48"
+ "\x21\x12\xa4\x42"
+ "\xb7\xe7\xa7\x01\xbc\x34\xd6\x86\xfa\x87\xdf\xae"
+ "\x80\x22\x00\x0b"
+ "\x74\x65\x73\x74\x20\x76\x65\x63\x74\x6f\x72\x20"
+ "\x00\x20\x00\x14"
+ "\x00\x02\xa1\x47"
+ "\x01\x13\xa9\xfa\xa5\xd3\xf1\x79"
+ "\xbc\x25\xf4\xb5\xbe\xd2\xb9\xd9"
+ "\x00\x08\x00\x14"
+ "\xa3\x82\x95\x4e\x4b\xe6\x7b\xf1\x17\x84\xc9\x7c"
+ "\x82\x92\xc2\x75\xbf\xe3\xed\x41"
+ "\x80\x28\x00\x04"
+ "\xc8\xfb\x0b\x4c";
+
+ StunMessage respv6Message(local, remote, (char*)respv6, sizeof(respv6)-1);
+
+ assert(respv6Message.isValid());
+ assert(respv6Message.mHasMagicCookie);
+ assert(respv6Message.mHasSoftware);
+ assert(*respv6Message.mSoftware == "test vector");
+ assert(respv6Message.mHasXorMappedAddress);
+ assert(respv6Message.mXorMappedAddress.family == StunMessage::IPv6Family);
+ assert(respv6Message.mXorMappedAddress.port == 32853);
+ asio::ip::address_v6::bytes_type v6addr = asio::ip::address::from_string("2001:db8:1234:5678:11:2233:4455:6677").to_v6().to_bytes();
+ assert(memcmp(&respv6Message.mXorMappedAddress.addr.ipv6, v6addr.data(), sizeof(respv6Message.mXorMappedAddress.addr.ipv6)) == 0);
+ assert(respv6Message.mHasMessageIntegrity);
+ assert(respv6Message.checkMessageIntegrity("VOkJxbRl1RmTxUk/WvJxBt"));
+ assert(respv6Message.mHasFingerprint);
+ assert(respv6Message.checkFingerprint());
+
+ const unsigned char reqltc[] =
+ "\x00\x01\x00\x60"
+ "\x21\x12\xa4\x42"
+ "\x78\xad\x34\x33\xc6\xad\x72\xc0\x29\xda\x41\x2e"
+ "\x00\x06\x00\x12"
+ "\xe3\x83\x9e\xe3\x83\x88\xe3\x83\xaa\xe3\x83\x83"
+ "\xe3\x82\xaf\xe3\x82\xb9\x00\x00"
+ "\x00\x15\x00\x1c"
+ "\x66\x2f\x2f\x34\x39\x39\x6b\x39\x35\x34\x64\x36"
+ "\x4f\x4c\x33\x34\x6f\x4c\x39\x46\x53\x54\x76\x79"
+ "\x36\x34\x73\x41"
+ "\x00\x14\x00\x0b"
+ "\x65\x78\x61\x6d\x70\x6c\x65\x2e\x6f\x72\x67\x00"
+ "\x00\x08\x00\x14"
+ "\xf6\x70\x24\x65\x6d\xd6\x4a\x3e\x02\xb8\xe0\x71"
+ "\x2e\x85\xc9\xa2\x8c\xa8\x96\x66";
+
+ StunMessage reqltcMessage(local, remote, (char*)reqltc, sizeof(reqltc)-1);
+
+ // Username: "<U+30DE><U+30C8><U+30EA><U+30C3><U+30AF><U+30B9>"
+ // (without quotes) unaffected by SASLprep[RFC4013] processing
+ char username[] = "\xe3\x83\x9e\xe3\x83\x88\xe3\x83\xaa\xe3\x83\x83\xe3\x82\xaf\xe3\x82\xb9";
+
+ // Password: "The<U+00AD>M<U+00AA>tr<U+2168>" resp "TheMatrIX" (without
+ // quotes) before resp after SASLprep processing
+ char password[] = "TheMatrIX";
+
+ assert(reqltcMessage.isValid());
+ assert(reqltcMessage.mHasMagicCookie);
+ assert(reqltcMessage.mHasUsername);
+ assert(*reqltcMessage.mUsername == username);
+ assert(reqltcMessage.mHasRealm);
+ assert(*reqltcMessage.mRealm == "example.org");
+ assert(reqltcMessage.mHasNonce);
+ assert(*reqltcMessage.mNonce == "f//499k954d6OL34oL9FSTvy64sA");
+ assert(reqltcMessage.mHasMessageIntegrity);
+ resip::Data hmacKey;
+ reqltcMessage.calculateHmacKey(hmacKey, password);
+ assert(reqltcMessage.checkMessageIntegrity(hmacKey));
+
+ InfoLog(<< "All tests passed!");
+ return 0;
+}
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/repro/AsyncProcessor.hxx b/repro/AsyncProcessor.hxx
index 96a089e..1dfeb5d 100644
--- a/repro/AsyncProcessor.hxx
+++ b/repro/AsyncProcessor.hxx
@@ -11,13 +11,13 @@ namespace repro
{
class AsyncProcessorMessage;
-// This class is used to create Processors that needs to accomplish blocking
+// This class is used to create Processors that need to accomplish blocking
// tasks, such as database access. The request/event is delivered to this
// Processor, like any other via the virtual method:
// virtual processor_action_t process(RequestContext &)
//
// When a blocking task is required, it can be queued up for the thread pool
-// of workers, that are implemented in the passed in asyncDispatcher, by
+// of workers, that are implemented in the constructor provided asyncDispatcher, by
// constructing a new AsyncProcessorMessage and calling mAsyncDispatcher->post
// AsyncProcessorMessage implementations should contain any data needed by the
// threads and contain any members required to hold the blocking functions
@@ -27,79 +27,80 @@ class AsyncProcessorMessage;
// virtual void asyncProcess(AsyncProcessorMessage* msg)
// The implementation of this method should perform the actual blocking function
// calls - ie. database access call. If there is any data to return it should be
-// set in the passed AsycnProcessorMessage before returning from asyncProcess.
+// set in the provided AsyncProcessorMessage before returning from asyncProcess.
//
// The dispatcher will then queue this message up to be sent back to the
// AsyncProcessor, via the virtual method:
// virtual processor_action_t process(RequestContext &)
-// This virutal method will need to examine the event type to see if the event is
-// a new request or an asyncrouns result message (AsyncProcessorMessage).
+// This virtual method will need to examine the event type to see if the event is
+// a new request or an asynchronous result message (AsyncProcessorMessage).
//
-// Example:
-//class MyAsyncProcessorAsyncMessage : public AsyncProcessorMessage
-//{
-//public:
-// MyAsyncProcessorAsyncMessage(AsyncProcessor& proc,
-// const resip::Data& tid,
-// resip::TransactionUser* passedtu):
-// AsyncProcessorMessage(proc,tid,passedtu)
-// {
-// }
-//
-// virtual EncodeStream& encode(EncodeStream& strm) const { strm << "MyAsyncProcessorAsyncMessage(tid="<<mTid<<")"; return strm; }
-//
-// Data mDataRequiredToCallBlockingFunction;
-// Data mDataReturnedFromBlockingFunction;
-//};
-//
-//class MyAsyncProcessor : public AsyncProcessor
-//{
-// public:
-// MyAsyncProcessor(ProxyConfig& config, Dispatcher* asyncDispatcher) :
-// AsyncProcessor("MyAsyncProcessor", asyncDispatcher) {}
-// ~MyAsyncProcessor() {}
-//
-// // Processor virutal method
-// virtual processor_action_t process(RequestContext &rc)
-// {
-// Message *message = rc.getCurrentEvent();
-//
-// MyAsyncProcessorAsyncMessage *async = dynamic_cast<MyAsyncProcessorAsyncMessage*>(message);
-// if (async)
-// {
-// // Async Function is complete - do something with results and continue
-// InfoLog(<< "Async function is complete, results are: " << async->mDataReturnedFromBlockingFunction);
-// return Continue;
-// }
-// else
-// {
-// // Control enters here when request arrives and is passed through process chain
-// // Dispatch async request to worker thread pool
-// MyAsyncProcessorAsyncMessage* async = new MyAsyncProcessorAsyncMessage(*this, rc.getTransactionId(), &rc.getProxy());
-// async->mDataRequiredToCallBlockingFunction = "foo";
-// mAsyncDispatcher->post(std::auto_ptr<ApplicationMessage>(async));
-// return WaitingForEvent;
-// }
-// }
-//
-// // Virtual method called from WorkerThreads - return true to queue to stack when complete,
-// // false when no response is required
-// virtual bool asyncProcess(AsyncProcessorMessage* msg)
-// {
-// MyAsyncProcessorAsyncMessage* async = dynamic_cast<MyAsyncProcessorAsyncMessage*>(msg);
-// if(async)
-// {
-// // Running inside a worker thread here, do blocking work here
-// // set any results in MyAsyncProcessorAsyncMessage and return control to Dispatcher
-// // that will queue this message back to this processor.
-// async->mDataReturnedFromBlockingFunction = "bar";
-// }
-// }
-//
-// private:
-//};
-//
-//
+
+/* Example:
+class MyAsyncProcessorAsyncMessage : public AsyncProcessorMessage
+{
+public:
+ MyAsyncProcessorAsyncMessage(AsyncProcessor& proc,
+ const resip::Data& tid,
+ resip::TransactionUser* passedtu):
+ AsyncProcessorMessage(proc,tid,passedtu) { }
+
+ virtual EncodeStream& encode(EncodeStream& strm) const
+ {
+ strm << "MyAsyncProcessorAsyncMessage(tid="<<mTid<<")"; return strm;
+ }
+
+ Data mDataRequiredToCallBlockingFunction;
+ Data mDataReturnedFromBlockingFunction;
+};
+
+class MyAsyncProcessor : public AsyncProcessor
+{
+ public:
+ MyAsyncProcessor(ProxyConfig& config, Dispatcher* asyncDispatcher) :
+ AsyncProcessor("MyAsyncProcessor", asyncDispatcher) {}
+ ~MyAsyncProcessor() {}
+
+ // Processor virtual method
+ virtual processor_action_t process(RequestContext &rc)
+ {
+ Message *message = rc.getCurrentEvent();
+
+ MyAsyncProcessorAsyncMessage *async = dynamic_cast<MyAsyncProcessorAsyncMessage*>(message);
+ if (async)
+ {
+ // Async Function is complete - do something with results and continue
+ InfoLog(<< "Async function is complete, results are: " << async->mDataReturnedFromBlockingFunction);
+ return Continue;
+ }
+ else
+ {
+ // Control enters here when request arrives and is passed through process chain
+ // Dispatch async request to worker thread pool
+ MyAsyncProcessorAsyncMessage* async = new MyAsyncProcessorAsyncMessage(*this, rc.getTransactionId(), &rc.getProxy());
+ async->mDataRequiredToCallBlockingFunction = "foo";
+ mAsyncDispatcher->post(std::auto_ptr<ApplicationMessage>(async));
+ return WaitingForEvent;
+ }
+ }
+
+ // Virtual method called from WorkerThreads - return true to queue to stack when complete,
+ // false when no response is required
+ virtual bool asyncProcess(AsyncProcessorMessage* msg)
+ {
+ MyAsyncProcessorAsyncMessage* async = dynamic_cast<MyAsyncProcessorAsyncMessage*>(msg);
+ if(async)
+ {
+ // Running inside a worker thread here, do blocking work here
+ // set any results in MyAsyncProcessorAsyncMessage and return control to Dispatcher
+ // that will queue this message back to this processor.
+ async->mDataReturnedFromBlockingFunction = "bar";
+ }
+ }
+
+ private:
+};
+*/
class AsyncProcessor : public Processor
diff --git a/repro/MySqlDb.cxx b/repro/MySqlDb.cxx
index 26e6d1c..eb65cf9 100644
--- a/repro/MySqlDb.cxx
+++ b/repro/MySqlDb.cxx
@@ -157,7 +157,7 @@ MySqlDb::connectToDatabase() const
mDBName.c_str(), // DB
mDBPort, // port
0, // unix socket file
- 0); // client flags
+ CLIENT_MULTI_RESULTS); // client flags (enable multiple results, since some custom stored procedures might require this)
if (ret == 0)
{
diff --git a/repro/UserStore.cxx b/repro/UserStore.cxx
index 1ce3322..eddd629 100644
--- a/repro/UserStore.cxx
+++ b/repro/UserStore.cxx
@@ -52,10 +52,10 @@ UserStore::addUser( const Data& username,
const Data& domain,
const Data& realm,
const Data& password,
- const Data& passwordHashAlt,
bool applyA1HashToPassword,
const Data& fullName,
- const Data& emailAddress )
+ const Data& emailAddress,
+ const Data& passwordHashAlt)
{
AbstractDb::UserRecord rec;
rec.user = username;
@@ -109,14 +109,14 @@ UserStore::updateUser( const Key& originalKey,
const resip::Data& domain,
const resip::Data& realm,
const resip::Data& password,
- const resip::Data& passwordHashAlt,
bool applyA1HashToPassword,
const resip::Data& fullName,
- const resip::Data& emailAddress )
+ const resip::Data& emailAddress,
+ const resip::Data& passwordHashAlt)
{
Key newkey = buildKey(user, domain);
- bool ret = addUser(user, domain, realm, password, passwordHashAlt, applyA1HashToPassword, fullName, emailAddress);
+ bool ret = addUser(user, domain, realm, password, applyA1HashToPassword, fullName, emailAddress, passwordHashAlt);
if ( newkey != originalKey )
{
eraseUser(originalKey);
diff --git a/repro/UserStore.hxx b/repro/UserStore.hxx
index af285b0..154aaf7 100644
--- a/repro/UserStore.hxx
+++ b/repro/UserStore.hxx
@@ -35,11 +35,11 @@ class UserStore
const resip::Data& domain,
const resip::Data& realm,
const resip::Data& password,
- const resip::Data& passwordHashAlt,
bool applyA1HashToPassword,
const resip::Data& fullName,
- const resip::Data& emailAddress );
-
+ const resip::Data& emailAddress,
+ const resip::Data& passwordHashAlt = resip::Data::Empty); // Only required if applyA1HashToPassword is false
+
void eraseUser( const Key& key );
bool updateUser( const Key& originalKey,
@@ -47,10 +47,10 @@ class UserStore
const resip::Data& domain,
const resip::Data& realm,
const resip::Data& password,
- const resip::Data& passwordHashAlt,
bool applyA1HashToPassword,
const resip::Data& fullName,
- const resip::Data& emailAddress );
+ const resip::Data& emailAddress,
+ const resip::Data& passwordHashAlt = resip::Data::Empty); // Only required if applyA1HashToPassword is false
Key getFirstKey();// return empty if no more
Key getNextKey(); // return empty if no more
diff --git a/repro/WebAdmin.cxx b/repro/WebAdmin.cxx
index 00f7860..4c4de19 100644
--- a/repro/WebAdmin.cxx
+++ b/repro/WebAdmin.cxx
@@ -96,7 +96,6 @@ WebAdmin::WebAdmin( Proxy& proxy,
Data::Empty, // domain
Data::Empty, // realm
(adminPassword==""?Data("admin"):adminPassword), // password
- Data::Empty,
true, // applyA1HashToPassword
Data::Empty, // name
Data::Empty ); // email
@@ -114,7 +113,6 @@ WebAdmin::WebAdmin( Proxy& proxy,
Data::Empty,
Data::Empty,
adminPassword,
- Data::Empty,
true, // applyA1HashToPassword
Data::Empty,
Data::Empty);
@@ -586,7 +584,7 @@ WebAdmin::buildAddUserSubPage( DataStream& s)
// realm = mHttpParams["domain"];
// }
- if(mStore.mUserStore.addUser(user,domain,domain,mHttpParams["password"],Data::Empty,true,mHttpParams["name"],mHttpParams["email"]))
+ if(mStore.mUserStore.addUser(user,domain,domain,mHttpParams["password"],true,mHttpParams["name"],mHttpParams["email"]))
{
s << "<p><em>Added:</em> " << user << "@" << domain << "</p>\n";
}
@@ -790,7 +788,7 @@ WebAdmin::buildShowUsersSubPage(DataStream& s)
applyA1HashToPassword = false;
}
// write out the updated record to the database now
- if(mStore.mUserStore.updateUser(key, user, domain, realm, password, passwordHashAlt, applyA1HashToPassword, name, email))
+ if(mStore.mUserStore.updateUser(key, user, domain, realm, password, applyA1HashToPassword, name, email, passwordHashAlt))
{
s << "<p><em>Updated:</em> " << key << "</p>" << endl;
}
diff --git a/repro/monkeys/GeoProximityTargetSorter.cxx b/repro/monkeys/GeoProximityTargetSorter.cxx
index 6ecb8e3..2e24781 100644
--- a/repro/monkeys/GeoProximityTargetSorter.cxx
+++ b/repro/monkeys/GeoProximityTargetSorter.cxx
@@ -281,7 +281,7 @@ GeoProximityTargetSorter::process(RequestContext &rc)
sort(flatTargetList.begin(), flatTargetList.end(), GeoProximityTargetContainer::instanceCompare);
}
- // Rebuild targetCollection - Note: All batches are split up to invidual / serial targets
+ // Rebuild targetCollection - Note: All batches are split up to individual / serial targets
targetCollection.clear();
std::vector<GeoProximityTargetContainer>::iterator it = flatTargetList.begin();
outerCounter=1;
diff --git a/resip.spec b/resip.spec
index b31b961..ad2a897 100644
--- a/resip.spec
+++ b/resip.spec
@@ -1,5 +1,5 @@
Name: resiprocate
-Version: 1.8.1
+Version: 1.8.2
Release: 1
Summary: Resiprocate SIP Stack
License: Vovida Software License http://opensource.org/licenses/vovidapl.php
diff --git a/resip/recon/MOHParkServer/ActiveCallInfo.hxx b/resip/recon/MOHParkServer/ActiveCallInfo.hxx
new file mode 100644
index 0000000..333bcba
--- /dev/null
+++ b/resip/recon/MOHParkServer/ActiveCallInfo.hxx
@@ -0,0 +1,69 @@
+#if !defined(ActiveCallInfo_hxx)
+#define ActiveCallInfo_hxx
+
+#include <list>
+#include <resip/stack/Uri.hxx>
+#include <rutil/Data.hxx>
+
+namespace mohparkserver
+{
+
+class ActiveCallInfo
+{
+public:
+ ActiveCallInfo(const resip::Uri& heldUri,
+ const resip::Uri& invokingUri,
+ const resip::Data& holdType,
+ unsigned int participantId,
+ unsigned int conversationId) :
+ mHeldUri(heldUri),
+ mInvokingUri(invokingUri),
+ mHoldType(holdType),
+ mParticipantId(participantId),
+ mConversationId(conversationId) {}
+ resip::Uri mHeldUri;
+ resip::Uri mInvokingUri;
+ resip::Data mHoldType;
+ unsigned int mParticipantId;
+ unsigned int mConversationId;
+};
+typedef std::list<ActiveCallInfo> CallInfoList;
+
+}
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/AppSubsystem.cxx b/resip/recon/MOHParkServer/AppSubsystem.cxx
new file mode 100644
index 0000000..fa6a02b
--- /dev/null
+++ b/resip/recon/MOHParkServer/AppSubsystem.cxx
@@ -0,0 +1,38 @@
+#include "AppSubsystem.hxx"
+
+AppSubsystem AppSubsystem::MOHPARKSERVER("MOHPARKSERVER");
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/AppSubsystem.hxx b/resip/recon/MOHParkServer/AppSubsystem.hxx
new file mode 100644
index 0000000..c43d1db
--- /dev/null
+++ b/resip/recon/MOHParkServer/AppSubsystem.hxx
@@ -0,0 +1,61 @@
+#if !defined(AppSubsystem_hxx)
+#define AppSubsystem_hxx
+
+#include <iostream>
+#include <rutil/Subsystem.hxx>
+
+/**
+ This class is used in the logging subsystem to identify
+ logging messages generated from the MOHPark server.
+
+ Author: Scott Godin (sgodin AT SipSpectrum DOT com)
+*/
+
+class AppSubsystem : public resip::Subsystem
+{
+ public:
+ // Add new systems below
+ static AppSubsystem MOHPARKSERVER;
+
+ private:
+ explicit AppSubsystem(const char* rhs) : resip::Subsystem(rhs) {};
+ explicit AppSubsystem(const resip::Data& rhs);
+ AppSubsystem& operator=(const resip::Data& rhs);
+};
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/ConfigParser.cxx b/resip/recon/MOHParkServer/ConfigParser.cxx
new file mode 100644
index 0000000..c9f174b
--- /dev/null
+++ b/resip/recon/MOHParkServer/ConfigParser.cxx
@@ -0,0 +1,428 @@
+#include "ConfigParser.hxx"
+
+#include "AppSubsystem.hxx"
+
+#include <iostream>
+#include <fstream>
+#include <iterator>
+
+#include <rutil/DnsUtil.hxx>
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/WinLeakCheck.hxx>
+#include <resip/stack/Tuple.hxx>
+
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+namespace mohparkserver
+{
+
+ConfigParser::ConfigParser(int argc, char** argv) :
+ // Defaults
+ mMOHUri("sip:moh at server.com"),
+ mMOHRegistrationTime(3600),
+ mMOHFilenameUrl("file:music.wav;repeat"),
+ mParkUri("sip:park at server.com"),
+ mParkRegistrationTime(3600),
+ mParkMOHFilenameUrl("file:music.wav;repeat"),
+ mParkOrbitRangeStart(6000),
+ mParkNumOrbits(10),
+ mParkOrbitRegistrationTime(3600),
+ mMaxParkTime(600), // 600 seconds = 10 mins
+ mUdpPort(0),
+ mTcpPort(0),
+ mTlsPort(0),
+ mTlsDomain(DnsUtil::getLocalHostName()),
+ mKeepAlives(true),
+ mMediaPortRangeStart(50000),
+ mMediaPortRangeSize(100),
+ mHttpPort(5082),
+ mLogLevel("INFO"),
+ mLogFilename("mohparkserver.log"),
+ mLogFileMaxBytes(5000000), // about 5Mb size
+ mSocketFunc(0)
+{
+ //mAddress = DnsUtil::getLocalIpAddress();
+
+ // Parse config file first
+ parseConfigFile("mohparkserver.config");
+
+ // Parse command line options
+ // Note: command line overrides config file setting
+ parseCommandLine(argc, argv);
+}
+
+ConfigParser::ConfigParser() :
+ // Defaults
+ mMOHUri("sip:moh at server.com"),
+ mMOHRegistrationTime(3600),
+ mMOHFilenameUrl("file:music.wav;repeat"),
+ mParkUri("sip:park at server.com"),
+ mParkRegistrationTime(3600),
+ mParkMOHFilenameUrl("file:music.wav;repeat"),
+ mParkOrbitRangeStart(6000),
+ mParkNumOrbits(10),
+ mParkOrbitRegistrationTime(3600),
+ mMaxParkTime(600), // 600 seconds = 10 mins
+ mUdpPort(0),
+ mTcpPort(0),
+ mTlsPort(0),
+ mTlsDomain(DnsUtil::getLocalHostName()),
+ mKeepAlives(true),
+ mMediaPortRangeStart(50000),
+ mMediaPortRangeSize(100),
+ mHttpPort(5082),
+ mLogLevel("INFO"),
+ mLogFilename("mohparkserver.log"),
+ mLogFileMaxBytes(5000000) // about 5Mb size
+{
+}
+
+ConfigParser::~ConfigParser()
+{
+}
+
+void
+ConfigParser::parseCommandLine(int argc, char** argv)
+{
+ // Loop through command line arguments and process them
+ for(int i = 1; i < argc; i++)
+ {
+ Data commandName(argv[i]);
+
+ // Process all commandNames that don't take values
+ if(isEqualNoCase(commandName, "-?") ||
+ isEqualNoCase(commandName, "--?") ||
+ isEqualNoCase(commandName, "--help") ||
+ isEqualNoCase(commandName, "/?"))
+ {
+ cout << "Command line options are:" << endl;
+ cout << " -a <IP Address> - bind SIP transports to this IP address" << endl;
+ cout << " -d <DNS servers> - comma seperated list of DNS servers, overrides OS detected list" << endl;
+ cout << " -up <port num> - local port number to use for UDP SIP messaging" << endl;
+ cout << " -tp <port num> - local port number to use for TCP SIP messaging" << endl;
+ cout << " -sp <port num> - local port number to use for TLS SIP messaging" << endl;
+ cout << " -td <domain name> - domain name to use for TLS server connections" << endl;
+ cout << " -nk - no keepalives, set this to disable sending of keepalives" << endl;
+ cout << " -op <SIP URI> - URI of a proxy server to use a SIP outbound proxy" << endl;
+ cout << " -l <NONE|ERR|WARNING|INFO|DEBUG|STACK> - logging level" << endl;
+ cout << endl;
+ cout << "Sample Command line:" << endl;
+ cout << "MOHParkServer -a 192.168.1.100 -l DEBUG" << endl;
+ exit(0);
+ }
+ else if(isEqualNoCase(commandName, "-nk"))
+ {
+ mKeepAlives = false;
+ }
+ else if(commandName.at(0) == '-')
+ {
+ commandName = commandName.substr(1); // Remove -
+
+ // Process commands that have values
+ Data commandValue(i+1 < argc ? argv[i+1] : Data::Empty);
+ if(commandValue.empty() || commandValue.at(0) == '-')
+ {
+ cerr << "Invalid command line parameters!" << endl;
+ exit(-1);
+ }
+ i++; // increment argument
+
+ //cout << "Command Line Name='" << commandName << "' value='" << commandValue << "'" << endl;
+ if(!processOption(commandName.lowercase(), commandValue))
+ {
+ cerr << "Invalid command line parameters!" << endl;
+ exit(-1);
+ }
+ }
+ else
+ {
+ cerr << "Invalid command line parameters!" << endl;
+ exit(-1);
+ }
+ }
+}
+
+void
+ConfigParser::parseConfigFile(const Data& filename)
+{
+ ifstream configFile(filename.c_str());
+
+ string sline;
+ while(getline(configFile, sline))
+ {
+ Data line(sline);
+ Data name;
+ Data value;
+ ParseBuffer pb(line);
+
+ pb.skipWhitespace();
+ const char * anchor = pb.position();
+ if(pb.eof() || *anchor == '#') continue; // if line is a comment or blank then skip it
+ // Look for =
+ pb.skipToOneOf("= \t");
+ if(!pb.eof())
+ {
+ pb.data(name,anchor);
+ if(*pb.position()!='=')
+ {
+ pb.skipToChar('=');
+ }
+ pb.skipChar('=');
+ pb.skipWhitespace();
+ anchor = pb.position();
+ if(!pb.eof())
+ {
+ pb.skipToEnd();
+ pb.data(value, anchor);
+ }
+ //cout << "Config file Name='" << name << "' value='" << value << "'" << endl;
+ processOption(name.lowercase(), value);
+ }
+ }
+}
+
+bool
+ConfigParser::processOption(const Data& name, const Data& value)
+{
+ bool result = true;
+ if(name == "mohuri")
+ {
+ result = assignNameAddr("MOH Uri", value, mMOHUri);
+ }
+ else if(name == "mohpassword")
+ {
+ mMOHPassword = value;
+ }
+ else if(name == "mohregistrationtime")
+ {
+ mMOHRegistrationTime = value.convertUnsignedLong();
+ }
+ else if(name == "mohfilename")
+ {
+ Uri url("file:music.wav;repeat");
+ Data urlData;
+ if(value.find("http://") != Data::npos ||
+ value.find("file:") != Data::npos)
+ {
+ // URL was specified - add repeat parameter
+ urlData = value + ";repeat";
+ }
+ else
+ {
+ urlData = "file:" + value + ";repeat";
+ }
+ try
+ {
+ Uri temp(urlData);
+ url = temp;
+ }
+ catch(BaseException& e)
+ {
+ cerr << "Invalid MOHFilename format=" << value << ": " << e << endl;
+ cerr << "Using " << url << " instead." << endl;
+ }
+ mMOHFilenameUrl = url;
+ }
+ else if(name == "parkuri")
+ {
+ result = assignNameAddr("Park Uri", value, mParkUri);
+ }
+ else if(name == "parkpassword")
+ {
+ mParkPassword = value;
+ }
+ else if(name == "parkregistrationtime")
+ {
+ mParkRegistrationTime = value.convertUnsignedLong();
+ }
+ else if(name == "parkmohfilename")
+ {
+ Uri url("file:music.wav;repeat");
+ Data urlData;
+ if(value.find("http://") != Data::npos ||
+ value.find("file:") != Data::npos)
+ {
+ // URL was specified - add repeat parameter
+ urlData = value + ";repeat";
+ }
+ else
+ {
+ urlData = "file:" + value + ";repeat";
+ }
+ try
+ {
+ Uri temp(urlData);
+ url = temp;
+ }
+ catch(BaseException& e)
+ {
+ cerr << "Invalid Park MOHFilename format=" << value << ": " << e << endl;
+ cerr << "Using " << url << " instead." << endl;
+ }
+ mParkMOHFilenameUrl = url;
+ }
+ else if(name == "parkorbitrangestart")
+ {
+ mParkOrbitRangeStart = value.convertUnsignedLong();
+ }
+ else if(name == "parknumorbits")
+ {
+ mParkNumOrbits = value.convertUnsignedLong();
+ }
+ else if(name == "parkorbitregistrationtime")
+ {
+ mParkOrbitRegistrationTime = value.convertUnsignedLong();
+ }
+ else if(name == "parkorbitpassword")
+ {
+ mParkOrbitPassword = value;
+ }
+ else if(name == "maxparktime")
+ {
+ mMaxParkTime = value.convertUnsignedLong();
+ }
+ else if(name == "a" || name == "ipaddress")
+ {
+ if(!value.empty())
+ {
+ mAddress = value;
+ }
+ }
+ else if(name == "d" || name == "dnsservers")
+ {
+ mDnsServers = value;
+ }
+ else if(name == "up" || name == "udpport")
+ {
+ mUdpPort = (unsigned short)value.convertUnsignedLong();
+ }
+ else if(name == "tp" || name == "tcpport")
+ {
+ mTcpPort = (unsigned short)value.convertUnsignedLong();
+ }
+ else if(name == "sp" || name == "tlsport")
+ {
+ mTlsPort = (unsigned short)value.convertUnsignedLong();
+ }
+ else if(name == "td" || name == "tlsdomain")
+ {
+ mTlsDomain = value;
+ }
+ else if(name == "keepalives")
+ {
+ if(value == "1" || value == "true" || value == "on" || value == "enable")
+ {
+ mKeepAlives = true;
+ }
+ else if(value == "0" || value == "false" || value == "off" || value == "disable")
+ {
+ mKeepAlives = false;
+ }
+ }
+ else if(name == "op" || name == "outboundproxy")
+ {
+ result = assignNameAddr("outbound proxy", value, mOutboundProxy);
+ }
+ else if(name == "mediaportrangestart")
+ {
+ mMediaPortRangeStart = (unsigned short)value.convertUnsignedLong();
+ }
+ else if(name == "mediaportrangesize")
+ {
+ mMediaPortRangeSize = (unsigned short)value.convertUnsignedLong();
+ }
+ else if(name == "httpport")
+ {
+ mHttpPort = (unsigned short)value.convertUnsignedLong();
+ }
+ else if(name == "sipxlogfilename")
+ {
+ mSipXLogFilename = value;
+ }
+ else if(name == "l" || name == "loglevel")
+ {
+ mLogLevel = value;
+ }
+ else if(name == "logfilename")
+ {
+ mLogFilename = value;
+ }
+ else if(name == "logfilemaxbytes")
+ {
+ mLogFileMaxBytes = value.convertUnsignedLong();
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+}
+
+bool
+ConfigParser::assignNameAddr(const Data& settingName, const Data& settingValue, NameAddr& nameAddr)
+{
+ try
+ {
+ if(!settingValue.empty())
+ {
+ NameAddr tempNameAddr(settingValue);
+ nameAddr = tempNameAddr;
+ }
+ }
+ catch(resip::BaseException& e)
+ {
+ // Try adding sip: to address to see if it will be valid
+ try
+ {
+ NameAddr tempNameAddr(Data("sip:" + settingValue));
+ nameAddr = tempNameAddr;
+ }
+ catch(resip::BaseException&)
+ {
+ cerr << "Invalid " << settingName << " NameAddr format=" << settingValue << ": " << e << endl;
+ return false;
+ }
+ }
+ return true;
+}
+
+}
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/ConfigParser.hxx b/resip/recon/MOHParkServer/ConfigParser.hxx
new file mode 100644
index 0000000..6c0d2e1
--- /dev/null
+++ b/resip/recon/MOHParkServer/ConfigParser.hxx
@@ -0,0 +1,103 @@
+#if !defined(ConfigParser_hxx)
+#define ConfigParser_hxx
+
+#include <list>
+#include <rutil/Data.hxx>
+#include <rutil/Socket.hxx>
+#include <resip/stack/NameAddr.hxx>
+
+namespace mohparkserver
+{
+
+class ConfigParser
+{
+public:
+ ConfigParser(int argc, char** argv); // Use this constructor to parse command line arguments and read configuration file from disk
+ ConfigParser(); // If you use this constructor you must manually set all configuration values
+ virtual ~ConfigParser();
+
+ void parseCommandLine(int argc, char** argv);
+ void parseConfigFile(const resip::Data& filename);
+ bool processOption(const resip::Data& name, const resip::Data& value);
+ bool assignNameAddr(const resip::Data& settingName, const resip::Data& settingValue, resip::NameAddr& nameAddr);
+
+ // MOH Settings
+ resip::NameAddr mMOHUri;
+ resip::Data mMOHPassword;
+ unsigned long mMOHRegistrationTime;
+ resip::Uri mMOHFilenameUrl;
+
+ // Park Settings
+ resip::NameAddr mParkUri;
+ resip::Data mParkPassword;
+ unsigned long mParkRegistrationTime;
+ resip::Uri mParkMOHFilenameUrl;
+ unsigned long mParkOrbitRangeStart;
+ unsigned long mParkNumOrbits;
+ unsigned long mParkOrbitRegistrationTime;
+ resip::Data mParkOrbitPassword;
+ unsigned long mMaxParkTime;
+
+ // SIP Settings
+ resip::Data mAddress;
+ resip::Data mDnsServers;
+ unsigned short mUdpPort;
+ unsigned short mTcpPort;
+ unsigned short mTlsPort;
+ resip::Data mTlsDomain;
+ resip::NameAddr mOutboundProxy;
+ bool mKeepAlives;
+
+ // Media Settings
+ unsigned short mMediaPortRangeStart;
+ unsigned short mMediaPortRangeSize;
+ resip::Data mSipXLogFilename;
+
+ // General Settings
+ unsigned short mHttpPort;
+ resip::Data mLogLevel;
+ resip::Data mLogFilename;
+ unsigned int mLogFileMaxBytes;
+
+ // Store pointer to after socket creation fn - can be used for QOS
+ resip::AfterSocketCreationFuncPtr mSocketFunc;
+};
+
+}
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/HttpBase.cxx b/resip/recon/MOHParkServer/HttpBase.cxx
new file mode 100644
index 0000000..17a8e79
--- /dev/null
+++ b/resip/recon/MOHParkServer/HttpBase.cxx
@@ -0,0 +1,267 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <cassert>
+
+#include <rutil/Data.hxx>
+#include <rutil/Socket.hxx>
+#include <resip/stack/Symbols.hxx>
+#include <rutil/TransportType.hxx>
+#include <rutil/Logger.hxx>
+#include <resip/stack/Tuple.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/ParseBuffer.hxx>
+#include <resip/stack/Transport.hxx>
+
+#include "AppSubsystem.hxx"
+#include "HttpBase.hxx"
+#include "HttpConnection.hxx"
+#include "WebAdmin.hxx"
+#include "rutil/WinLeakCheck.hxx"
+
+
+using namespace resip;
+using namespace mohparkserver;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+
+HttpBase::~HttpBase()
+{
+#if defined(WIN32)
+ closesocket(mFd);
+#else
+ close(mFd);
+#endif
+ mFd=0;
+ for( int i=0; i<MaxConnections; i++)
+ {
+ if ( mConnection[i] )
+ {
+ delete mConnection[i] ; mConnection[i]=0;
+ }
+ }
+}
+
+
+HttpBase::HttpBase( int port, IpVersion ipVer, const Data& realm ):
+ mRealm(realm),
+ nextConnection(0),
+ mTuple(Data::Empty,port,ipVer,TCP,Data::Empty)
+{
+ sane = true;
+
+ for ( int i=0 ; i<MaxConnections; i++)
+ {
+ mConnection[i]=0;
+ }
+
+#ifdef USE_IPV6
+ mFd = ::socket(ipVer == V4 ? PF_INET : PF_INET6, SOCK_STREAM, 0);
+#else
+ mFd = ::socket(PF_INET, SOCK_STREAM, 0);
+#endif
+
+ if ( mFd == INVALID_SOCKET )
+ {
+ int e = getErrno();
+ ErrLog (<< "Failed to create socket: " << strerror(e));
+ sane = false;
+ return;
+ }
+
+ DebugLog (<< "Creating fd=" << (int)mFd
+ << (ipVer == V4 ? " V4/" : " V6/") );
+
+ int on = 1;
+#if !defined(WIN32)
+ if ( ::setsockopt ( mFd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) )
+#else
+ if ( ::setsockopt ( mFd, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)) )
+#endif
+ {
+ int e = getErrno();
+ ErrLog (<< "Couldn't set sockoptions SO_REUSEPORT | SO_REUSEADDR: " << strerror(e));
+ sane = false;
+ return;
+ }
+
+ DebugLog (<< "Binding to " << Tuple::inet_ntop(mTuple));
+
+ if ( ::bind( mFd, &mTuple.getMutableSockaddr(), mTuple.length()) == SOCKET_ERROR )
+ {
+ int e = getErrno();
+ if ( e == EADDRINUSE )
+ {
+ ErrLog (<< mTuple << " already in use ");
+ }
+ else
+ {
+ ErrLog (<< "Could not bind to " << mTuple);
+ }
+ sane = false;
+ return;
+ }
+
+ bool ok = makeSocketNonBlocking(mFd);
+ if ( !ok )
+ {
+ ErrLog (<< "Could not make HTTP socket non-blocking " << port );
+ sane = false;
+ return;
+ }
+
+ // do the listen, seting the maximum queue size for compeletly established
+ // sockets -- on linux, tcp_max_syn_backlog should be used for the incomplete
+ // queue size(see man listen)
+ int e = listen(mFd,5 );
+
+ if (e != 0 )
+ {
+ int e = getErrno();
+ InfoLog (<< "Failed listen " << strerror(e));
+ sane = false;
+ return;
+ }
+}
+
+
+void
+HttpBase::buildFdSet(FdSet& fdset)
+{
+ fdset.setRead( mFd );
+
+ for( int i=0; i<MaxConnections; i++)
+ {
+ if ( mConnection[i] )
+ {
+ mConnection[i]->buildFdSet(fdset);
+ }
+ }
+}
+
+
+void
+HttpBase::process(FdSet& fdset)
+{
+ if (fdset.readyToRead(mFd))
+ {
+ Tuple tuple(mTuple);
+ struct sockaddr& peer = tuple.getMutableSockaddr();
+ socklen_t peerLen = tuple.length();
+ Socket sock = accept( mFd, &peer, &peerLen);
+ if ( sock == SOCKET_ERROR )
+ {
+ int e = getErrno();
+ switch (e)
+ {
+ case EWOULDBLOCK:
+ // !jf! this can not be ready in some cases
+ return;
+ default:
+ ErrLog(<< "Some error reading from socket: " << e);
+ // .bwc. This is almost certainly a bad assert that a nefarious
+ // endpoint could hit.
+ // assert(0); // Transport::error(e);
+ }
+ return;
+ }
+ makeSocketNonBlocking(sock);
+
+ int c = nextConnection;
+ nextConnection = ( nextConnection+1 ) % MaxConnections;
+
+ if ( mConnection[c] )
+ {
+ delete mConnection[c]; mConnection[c] = 0;
+ }
+
+ mConnection[c] = new HttpConnection(*this,sock);
+
+ DebugLog (<< "Received TCP connection as connection=" << c << " fd=" << (int)sock);
+ }
+
+ for( int i=0; i<MaxConnections; i++)
+ {
+ if ( mConnection[i] )
+ {
+ bool ok = mConnection[i]->process(fdset);
+ if ( !ok )
+ {
+ delete mConnection[i]; mConnection[i]=0;
+ }
+ }
+ }
+}
+
+
+void HttpBase::setPage( const Data& page, int pageNumber, int response, const Mime& type )
+{
+ for ( int i=0 ; i<MaxConnections; i++)
+ {
+ if ( mConnection[i] )
+ {
+ if ( mConnection[i]->mPageNumber == pageNumber )
+ {
+ mConnection[i]->setPage( page,response,type );
+ }
+ }
+ }
+}
+
+bool HttpBase::isSane()
+{
+ return sane;
+}
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/HttpBase.hxx b/resip/recon/MOHParkServer/HttpBase.hxx
new file mode 100644
index 0000000..c22b2c2
--- /dev/null
+++ b/resip/recon/MOHParkServer/HttpBase.hxx
@@ -0,0 +1,104 @@
+#if !defined(MOHPARK_HTTPBASE_HXX)
+#define MOHPARK_HTTPBASE_HXX
+
+#include <rutil/Data.hxx>
+#include <rutil/Socket.hxx>
+#include <rutil/TransportType.hxx>
+#include <resip/stack/Tuple.hxx>
+#include <resip/stack/Mime.hxx>
+
+namespace mohparkserver
+{
+class HttpConnection;
+
+class HttpBase
+{
+ friend class HttpConnection;
+
+ public:
+ HttpBase( int port, resip::IpVersion version, const resip::Data& realm );
+ virtual ~HttpBase();
+
+ void buildFdSet(resip::FdSet& fdset);
+ void process(resip::FdSet& fdset);
+
+ bool isSane();
+
+ protected:
+ virtual void buildPage( const resip::Data& uri,
+ int pageNumber,
+ const resip::Data& user,
+ const resip::Data& password )=0;
+ void setPage( const resip::Data& page,
+ int pageNumber,
+ int response=200,
+ const resip::Mime& pType = resip::Mime("text","html") );
+
+ const resip::Data mRealm;
+
+ private:
+ static const int MaxConnections = 30;
+
+ resip::Socket mFd;
+ int nextConnection;
+ resip::Tuple mTuple;
+
+ bool sane;
+
+ HttpConnection* mConnection[MaxConnections];
+
+};
+
+}
+
+#endif
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/HttpConnection.cxx b/resip/recon/MOHParkServer/HttpConnection.cxx
new file mode 100644
index 0000000..f7db2bc
--- /dev/null
+++ b/resip/recon/MOHParkServer/HttpConnection.cxx
@@ -0,0 +1,419 @@
+#include <cassert>
+
+#include <rutil/Data.hxx>
+#include <rutil/Socket.hxx>
+#include <resip/stack/Symbols.hxx>
+#include <rutil/TransportType.hxx>
+#include <rutil/Logger.hxx>
+#include <resip/stack/Tuple.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/ParseBuffer.hxx>
+
+#include "AppSubsystem.hxx"
+#include "HttpBase.hxx"
+#include "HttpConnection.hxx"
+
+using namespace resip;
+using namespace mohparkserver;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+int HttpConnection::nextPageNumber=1;
+
+
+HttpConnection::HttpConnection( HttpBase& base, Socket pSock ):
+ mHttpBase( base ),
+ mPageNumber(nextPageNumber++),
+ mSock(pSock),
+ mParsedRequest(false)
+{
+ assert( mSock > 0 );
+}
+
+
+HttpConnection::~HttpConnection()
+{
+ assert( mSock > 0 );
+#ifdef WIN32
+ closesocket(mSock); mSock=0;
+#else
+ close(mSock); mSock=0;
+#endif
+}
+
+
+void
+HttpConnection::buildFdSet(FdSet& fdset)
+{
+ if ( !mTxBuffer.empty() )
+ {
+ fdset.setWrite(mSock);
+ }
+ fdset.setRead(mSock);
+}
+
+
+bool
+HttpConnection::process(FdSet& fdset)
+{
+ if ( fdset.hasException(mSock) )
+ {
+ int errNum = 0;
+ int errNumSize = sizeof(errNum);
+ getsockopt(mSock,SOL_SOCKET,SO_ERROR,(char *)&errNum,(socklen_t *)&errNumSize);
+ InfoLog (<< "Exception reading from socket "
+ << (int)mSock << " code: " << errNum << "; closing connection");
+ return false;
+ }
+
+ if ( fdset.readyToRead( mSock ) )
+ {
+ bool ok = processSomeReads();
+ if ( !ok )
+ {
+ return false;
+ }
+ }
+ if ( (!mTxBuffer.empty()) && fdset.readyToWrite( mSock ) )
+ {
+ bool ok = processSomeWrites();
+ if ( !ok )
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+void
+HttpConnection::setPage(const Data& pPage,int response,const Mime& pType)
+{
+ Data page(pPage);
+
+ switch (response)
+ {
+ case 401:
+ {
+ mTxBuffer += "HTTP/1.0 401 Unauthorized"; mTxBuffer += Symbols::CRLF;
+
+ page = ("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
+ "<html><head>"
+ "<title>401 Unauthorized</title>"
+ "</head><body>"
+ "<h1>Unauthorized</h1>"
+ "</body></html>" );
+ }
+ break;
+
+ case 404:
+ {
+ mTxBuffer += "HTTP/1.0 404 Not Found"; mTxBuffer += Symbols::CRLF;
+
+ page = ("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
+ "<html><head>"
+ "<title>404 Not Found</title>"
+ "</head><body>"
+ "<h1>Unauthorized</h1>"
+ "</body></html>" );
+ }
+ break;
+
+ case 301:
+ {
+ mTxBuffer += "HTTP/1.0 301 Moved Permanently"; mTxBuffer += Symbols::CRLF;
+ mTxBuffer += "Location: http:/activecalls.html"; mTxBuffer += Symbols::CRLF;
+
+ page = ("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
+ "<html><head>"
+ "<title>301 Moved Permanently</title>"
+ "</head><body>"
+ "<h1>Moved</h1>"
+ "</body></html>" );
+ }
+ break;
+
+ case 200:
+ {
+ mTxBuffer += "HTTP/1.0 200 OK" ; mTxBuffer += Symbols::CRLF;
+ }
+ break;
+
+ default:
+ {
+ assert(0);
+
+ Data resp;
+ {
+ DataStream s(resp);
+ s << response;
+ s.flush();
+ }
+
+ mTxBuffer += "HTTP/1.0 ";
+ mTxBuffer += resp;
+ mTxBuffer += "OK" ; mTxBuffer += Symbols::CRLF;
+ }
+ break;
+ }
+
+ Data len;
+ {
+ DataStream s(len);
+ s << page.size();
+ s.flush();
+ }
+
+ mTxBuffer += "WWW-Authenticate: Basic realm=\"";
+ if ( mHttpBase.mRealm.empty() )
+ {
+ mTxBuffer += resip::DnsUtil::getLocalHostName();
+ }
+ else
+ {
+ mTxBuffer += mHttpBase.mRealm;
+ }
+ mTxBuffer += "\" ";
+ mTxBuffer += Symbols::CRLF;
+
+ mTxBuffer += "Server: Console RFSS " ;
+// mTxBuffer += Data(VersionUtils::instance().displayVersion());
+ mTxBuffer += Symbols::CRLF;
+ mTxBuffer += "Mime-version: 1.0 " ; mTxBuffer += Symbols::CRLF;
+ mTxBuffer += "Pragma: no-cache " ; mTxBuffer += Symbols::CRLF;
+ mTxBuffer += "Content-Length: "; mTxBuffer += len; mTxBuffer += Symbols::CRLF;
+
+ mTxBuffer += "Content-Type: " ;
+ mTxBuffer += pType.type() ;
+ mTxBuffer +="/" ;
+ mTxBuffer += pType.subType() ; mTxBuffer += Symbols::CRLF;
+
+ mTxBuffer += Symbols::CRLF;
+
+ mTxBuffer += page;
+}
+
+
+bool
+HttpConnection::processSomeReads()
+{
+ const int bufSize = 8000;
+ char buf[bufSize];
+
+
+#if defined(WIN32)
+ int bytesRead = ::recv(mSock, buf, bufSize, 0);
+#else
+ int bytesRead = ::read(mSock, buf, bufSize);
+#endif
+
+ if (bytesRead == INVALID_SOCKET)
+ {
+ int e = getErrno();
+ switch (e)
+ {
+ case EAGAIN:
+ InfoLog (<< "No data ready to read");
+ return true;
+ case EINTR:
+ InfoLog (<< "The call was interrupted by a signal before any data was read.");
+ break;
+ case EIO:
+ InfoLog (<< "I/O error");
+ break;
+ case EBADF:
+ InfoLog (<< "fd is not a valid file descriptor or is not open for reading.");
+ break;
+ case EINVAL:
+ InfoLog (<< "fd is attached to an object which is unsuitable for reading.");
+ break;
+ case EFAULT:
+ InfoLog (<< "buf is outside your accessible address space.");
+ break;
+ default:
+ InfoLog (<< "Some other error");
+ break;
+ }
+ InfoLog (<< "Failed read on " << (int)mSock << " " << strerror(e));
+ return false;
+ }
+ else if (bytesRead == 0)
+ {
+ InfoLog (<< "Connection closed by remote " );
+ return false;
+ }
+
+ //DebugLog (<< "HttpConnection::processSomeReads() "
+ // << " read=" << bytesRead);
+
+ mRxBuffer += Data( buf, bytesRead );
+
+ tryParse();
+
+ return true;
+}
+
+
+void
+HttpConnection::tryParse()
+{
+ //DebugLog (<< "parse " << mRxBuffer );
+
+ ParseBuffer pb(mRxBuffer);
+
+ pb.skipToChar(Symbols::SPACE[0]);
+ const char* start = pb.skipWhitespace();
+ pb.skipToChar(Symbols::SPACE[0]);
+
+ if (pb.eof())
+ {
+ // parse failed - just return
+ return;
+ }
+
+ Data uri;
+ pb.data( uri, start );
+
+ DebugLog (<< "parse found URI " << uri );
+ mParsedRequest = true;
+
+
+ Data user;
+ Data password;
+
+ try
+ {
+ pb.skipToChars( "Authorization" );
+ if ( !pb.eof() )
+ {
+ if ( pb.eof() ) DebugLog( << "Did not find Authorization header" );
+ pb.skipToChars( "Basic" ); pb.skipN(6);
+ if ( pb.eof() ) DebugLog( << "Did not find Authorization basic " );
+ pb.skipWhitespace();
+ if ( pb.eof() ) DebugLog( << "Something weird in Auhtorization header " );
+ if ( !pb.eof() )
+ {
+ const char* a = pb.position();
+ pb.skipNonWhitespace();
+ Data buf = pb.data(a);
+
+ DebugLog (<< "parse found basic base64 auth data of " << buf );
+ Data auth = buf.base64decode();
+
+ //DebugLog (<< "parse found basic auth data of " << auth );
+
+ ParseBuffer p(auth);
+ const char* a1 = p.position();
+ p.skipToChar(':');
+ user = p.data(a1);
+ const char* a2 = p.skipChar(':');
+ p.skipToEnd();
+ password = p.data(a2);
+
+ //DebugLog (<< "parse found basic auth data with user=" << user
+ // << " password=" << password );
+ }
+ }
+ }
+ catch ( ... )
+ {
+ ErrLog (<< "Some problem finding Authorization header in HTTP request" );
+ }
+
+ mHttpBase.buildPage(uri,mPageNumber,user,password);
+}
+
+
+bool
+HttpConnection::processSomeWrites()
+{
+ if ( mTxBuffer.empty() )
+ {
+ return true;
+ }
+
+ //DebugLog (<< "Writing " << mTxBuffer );
+
+#if defined(WIN32)
+ int bytesWritten = ::send( mSock, mTxBuffer.data(), mTxBuffer.size(), 0);
+#else
+ int bytesWritten = ::write(mSock, mTxBuffer.data(), mTxBuffer.size() );
+#endif
+
+ if (bytesWritten == INVALID_SOCKET)
+ {
+ int e = getErrno();
+ InfoLog (<< "HttpConnection failed write on " << mSock << " " << strerror(e));
+
+ return false;
+ }
+
+ if (bytesWritten == (int)mTxBuffer.size() )
+ {
+ DebugLog (<< "Wrote it all" );
+ mTxBuffer = Data::Empty;
+
+ return false; // return false causes connection to close and clean up
+ }
+ else
+ {
+ Data rest = mTxBuffer.substr(bytesWritten);
+ mTxBuffer = rest;
+ DebugLog( << "Wrote " << bytesWritten << " bytes - still need to do " << mTxBuffer );
+ }
+
+ return true;
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/HttpConnection.hxx b/resip/recon/MOHParkServer/HttpConnection.hxx
new file mode 100644
index 0000000..1f72c3a
--- /dev/null
+++ b/resip/recon/MOHParkServer/HttpConnection.hxx
@@ -0,0 +1,98 @@
+#if !defined(MOHPARK_HTTPCONNECTION_HXX)
+#define MOHPARK_HTTPCONNECTION_HXX
+
+#include <rutil/Data.hxx>
+#include <rutil/Socket.hxx>
+#include <rutil/TransportType.hxx>
+#include <resip/stack/Tuple.hxx>
+#include <resip/stack/Mime.hxx>
+
+#include <repro/UserStore.hxx>
+#include "HttpBase.hxx"
+
+namespace mohparkserver
+{
+
+class HttpConnection
+{
+ friend class HttpBase;
+
+ public:
+ HttpConnection( HttpBase& webAdmin, resip::Socket pSock );
+ ~HttpConnection();
+
+ void buildFdSet(resip::FdSet& fdset);
+ bool process(resip::FdSet& fdset);
+
+ void setPage(const resip::Data& page,
+ int response,
+ const resip::Mime& pType );
+
+ private:
+ bool processSomeReads();
+ bool processSomeWrites();
+ void tryParse();
+
+ HttpBase& mHttpBase;
+ const int mPageNumber;
+ static int nextPageNumber;
+
+ resip::Socket mSock;
+ resip::Data mRxBuffer;
+ resip::Data mTxBuffer;
+ bool mParsedRequest;
+};
+
+}
+
+#endif
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/MOHManager.cxx b/resip/recon/MOHParkServer/MOHManager.cxx
new file mode 100644
index 0000000..1bc92ac
--- /dev/null
+++ b/resip/recon/MOHParkServer/MOHManager.cxx
@@ -0,0 +1,278 @@
+#include "AppSubsystem.hxx"
+#include "MOHManager.hxx"
+#include "Server.hxx"
+#include "../UserAgent.hxx"
+
+#include <resip/stack/ExtensionParameter.hxx>
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+static const resip::ExtensionParameter p_automaton("automaton");
+static const resip::ExtensionParameter p_byeless("+sip.byeless");
+static const resip::ExtensionParameter p_rendering("+sip.rendering");
+
+namespace mohparkserver
+{
+
+MOHManager::MOHManager(Server& server) :
+ mServer(server),
+ mConversationProfileHandle(0),
+ mMusicFilenameChanged(false)
+{
+}
+
+MOHManager::~MOHManager()
+{
+}
+
+void
+MOHManager::startup()
+{
+ // Initialize settings
+ initializeSettings(mServer.mConfig.mMOHFilenameUrl);
+
+ // Setup ConversationProfile
+ initializeConversationProfile(mServer.mConfig.mMOHUri, mServer.mConfig.mMOHPassword, mServer.mConfig.mMOHRegistrationTime, mServer.mConfig.mOutboundProxy);
+
+ // Create an initial conversation and start music
+ ConversationHandle convHandle = mServer.createConversation(true /* broadcast only*/);
+ mServer.createMediaResourceParticipant(convHandle, mServer.mConfig.mMOHFilenameUrl); // Play Music
+ mConversations[convHandle];
+ mMusicFilenameChanged = false;
+}
+
+void
+MOHManager::initializeConversationProfile(const NameAddr& uri, const Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy)
+{
+ if(mConversationProfileHandle)
+ {
+ mServer.mMyUserAgent->destroyConversationProfile(mConversationProfileHandle);
+ mConversationProfileHandle = 0;
+ }
+
+ // Setup ConversationProfile
+ SharedPtr<ConversationProfile> mohConversationProfile = SharedPtr<ConversationProfile>(new ConversationProfile(mServer.mUserAgentMasterProfile));
+ mohConversationProfile->setDefaultRegistrationTime(registrationTime);
+ mohConversationProfile->setDefaultRegistrationRetryTime(120); // 2 mins
+ mohConversationProfile->setDefaultFrom(uri);
+ mohConversationProfile->setDigestCredential(uri.uri().host(), uri.uri().user(), password);
+ if(!outboundProxy.uri().host().empty())
+ {
+ mohConversationProfile->setOutboundProxy(outboundProxy.uri());
+ }
+ mohConversationProfile->challengeOODReferRequests() = false;
+ mohConversationProfile->setExtraHeadersInReferNotifySipFragEnabled(true); // Enable dialog identifying headers in SipFrag bodies of Refer Notifies - required for a music on hold server
+ NameAddr capabilities;
+ capabilities.param(p_automaton);
+ capabilities.param(p_byeless);
+ capabilities.param(p_rendering) = "\"no\"";
+ mohConversationProfile->setUserAgentCapabilities(capabilities);
+ mohConversationProfile->natTraversalMode() = ConversationProfile::NoNatTraversal;
+ mohConversationProfile->secureMediaMode() = ConversationProfile::NoSecureMedia;
+ mServer.buildSessionCapabilities(mohConversationProfile->sessionCaps());
+ mConversationProfileHandle = mServer.mMyUserAgent->addConversationProfile(mohConversationProfile);
+}
+
+void
+MOHManager::initializeSettings(const resip::Uri& musicFilename)
+{
+ Lock lock(mMutex);
+ mMusicFilename = musicFilename;
+ // If there is a single conversation with no participants, then there are no
+ // current parties on hold - re-create the conversation with new music
+ if(mConversations.size() == 1 && mConversations.begin()->second.size() == 0)
+ {
+ mServer.destroyConversation(mConversations.begin()->first);
+ mConversations.clear();
+
+ // re-create an initial conversation and start music
+ ConversationHandle convHandle = mServer.createConversation(true /* broadcast only*/);
+ mServer.createMediaResourceParticipant(convHandle, mMusicFilename); // Play Music
+ mConversations[convHandle];
+ }
+ else
+ {
+ mMusicFilenameChanged = true;
+ }
+}
+
+void
+MOHManager::shutdown(bool shuttingDownServer)
+{
+ Lock lock(mMutex);
+ // Destroy all conversations
+ ConversationMap::iterator it = mConversations.begin();
+ for(; it != mConversations.end(); it++)
+ {
+ // Clean up participant memory
+ ParticipantMap::iterator partIt = it->second.begin();
+ for(;partIt!= it->second.end(); partIt++)
+ {
+ delete partIt->second;
+ }
+ it->second.clear();
+
+ mServer.destroyConversation(it->first);
+ }
+ mConversations.clear();
+
+ // If shutting down server, then we shouldn't remove the conversation profiles here
+ // shutting down the ConversationManager will take care of this. We need to be sure
+ // we don't remove all conversation profiles when we are still processing SipMessages,
+ // since recon requires at least one to be present for inbound processing.
+ if(mConversationProfileHandle && !shuttingDownServer)
+ {
+ mServer.mMyUserAgent->destroyConversationProfile(mConversationProfileHandle);
+ mConversationProfileHandle = 0;
+ }
+}
+
+bool
+MOHManager::isMyProfile(recon::ConversationProfile& profile)
+{
+ Lock lock(mMutex);
+ return profile.getHandle() == mConversationProfileHandle;
+}
+
+void
+MOHManager::addParticipant(ParticipantHandle participantHandle, const Uri& heldUri, const Uri& holdingUri)
+{
+ Lock lock(mMutex);
+ ConversationHandle conversationToUse = 0;
+ // Check if we have an existing conversation with room to add this party
+ ConversationMap::iterator it = mConversations.begin();
+ for(; it != mConversations.end(); it++)
+ {
+ if(it->second.size() < DEFAULT_BRIDGE_MAX_IN_OUTPUTS-3)
+ {
+ // Found an existing conversation with room - add the participant here
+ conversationToUse = it->first;
+ break;
+ }
+ }
+
+ // No conversation found that we can use - create a new one
+ if(!conversationToUse)
+ {
+ conversationToUse = mServer.createConversation(true /* broadcast only*/);
+ InfoLog(<< "MOHManager::addParticipant created new conversation for music on hold, id=" << conversationToUse);
+
+ // Play Music
+ mServer.createMediaResourceParticipant(conversationToUse, mMusicFilename);
+ }
+
+ assert(conversationToUse);
+
+ mServer.addParticipant(conversationToUse, participantHandle);
+ mServer.modifyParticipantContribution(conversationToUse, participantHandle, 100, 0 /* Mute participant */);
+ mServer.answerParticipant(participantHandle);
+ mConversations[conversationToUse].insert(std::make_pair(participantHandle, new ParticipantMOHInfo(participantHandle, heldUri, holdingUri)));
+}
+
+bool
+MOHManager::removeParticipant(ParticipantHandle participantHandle)
+{
+ Lock lock(mMutex);
+ // Find Conversation that participant is in
+ ConversationMap::iterator it = mConversations.begin();
+ for(; it != mConversations.end(); it++)
+ {
+ ParticipantMap::iterator partIt = it->second.find(participantHandle);
+ if(partIt != it->second.end())
+ {
+ InfoLog(<< "MOHManager::removeParticipant found in conversation id=" << it->first << ", size=" << it->second.size());
+
+ // Found! Remove from conversation
+ delete partIt->second;
+ it->second.erase(partIt);
+
+ // Check if conversation is now empty, and it's not the last conversation
+ if(it->second.size() == 0)
+ {
+ if(mConversations.size() > 1)
+ {
+ // Destroy conversation (and containing media participant)
+ mServer.destroyConversation(it->first);
+
+ // Remove Conversation from Map
+ mConversations.erase(it);
+
+ InfoLog(<< "MOHManager::removeParticipant last participant in conversation, destroying conversation, num conversations now=" << mConversations.size());
+ }
+ else if(mConversations.size() == 1 && mMusicFilenameChanged) // If the initial conversation is empty, and the music filename setting changed, then restart it
+ {
+ mServer.destroyConversation(mConversations.begin()->first);
+ mConversations.clear();
+
+ // re-create an initial conversation and start music
+ ConversationHandle convHandle = mServer.createConversation(true /* broadcast only*/);
+ mServer.createMediaResourceParticipant(convHandle, mMusicFilename); // Play Music
+ mConversations[convHandle];
+ mMusicFilenameChanged = false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+void
+MOHManager::getActiveCallsInfo(CallInfoList& callInfos)
+{
+ Lock lock(mMutex);
+ // Find Conversation that participant is in
+ ConversationMap::iterator it = mConversations.begin();
+ for(; it != mConversations.end(); it++)
+ {
+ ParticipantMap::iterator partIt = it->second.begin();
+ for(; partIt != it->second.end(); partIt++)
+ {
+ callInfos.push_back(ActiveCallInfo(partIt->second->mHeldUri, partIt->second->mHoldingUri, "MOH", partIt->first, it->first));
+ }
+ }
+}
+
+}
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/MOHManager.hxx b/resip/recon/MOHParkServer/MOHManager.hxx
new file mode 100644
index 0000000..c6d3b4c
--- /dev/null
+++ b/resip/recon/MOHParkServer/MOHManager.hxx
@@ -0,0 +1,90 @@
+#if !defined(MOHManager_hxx)
+#define MOHManager_hxx
+
+#include <map>
+#include <set>
+#include "ActiveCallInfo.hxx"
+#include "../UserAgent.hxx"
+#include "../HandleTypes.hxx"
+
+namespace mohparkserver
+{
+class Server;
+
+class ParticipantMOHInfo
+{
+public:
+ ParticipantMOHInfo(recon::ParticipantHandle participantHandle, const resip::Uri& heldUri, const resip::Uri& holdingUri) :
+ mParticipantHandle(participantHandle), mHeldUri(heldUri), mHoldingUri(holdingUri) {}
+ recon::ParticipantHandle mParticipantHandle;
+ resip::Uri mHeldUri;
+ resip::Uri mHoldingUri;
+};
+
+class MOHManager
+{
+public:
+ MOHManager(Server& server);
+ virtual ~MOHManager();
+
+ void startup();
+ void initializeConversationProfile(const resip::NameAddr& uri, const resip::Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy);
+ void initializeSettings(const resip::Uri& musicFilename);
+
+ void shutdown(bool shuttingDownServer);
+
+ bool isMyProfile(recon::ConversationProfile& profile);
+ void addParticipant(recon::ParticipantHandle participantHandle, const resip::Uri& heldUri, const resip::Uri& holdingUri);
+ bool removeParticipant(recon::ParticipantHandle participantHandle);
+ void getActiveCallsInfo(CallInfoList& callInfos);
+
+private:
+ resip::Mutex mMutex;
+ Server& mServer;
+ volatile recon::ConversationProfileHandle mConversationProfileHandle;
+ resip::Uri mMusicFilename;
+ volatile bool mMusicFilenameChanged;
+
+ typedef std::map<recon::ParticipantHandle, ParticipantMOHInfo*> ParticipantMap;
+ typedef std::map<recon::ConversationHandle, ParticipantMap> ConversationMap;
+ ConversationMap mConversations;
+};
+
+}
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/MOHParkServer.config b/resip/recon/MOHParkServer/MOHParkServer.config
new file mode 100644
index 0000000..fdb2581
--- /dev/null
+++ b/resip/recon/MOHParkServer/MOHParkServer.config
@@ -0,0 +1,145 @@
+########################################################
+# MOH / Park Server configuration file
+########################################################
+
+
+########################################################
+# MOH settings
+########################################################
+
+# URI that SIP user agents use to communicate with the MOH server. If a display name
+# is desired on calls placed by the MOH server then it can be provided here using the
+# following format: "{displayName}"<sip:{user}@{domain}>
+# Example: "Music-On-Hold"<sip:moh at server.com>
+MOHUri = "Music-On-Hold"<sip:moh at blitzzgod.com>
+
+# Registration Time in seconds - set to 0 to disable registration
+MOHRegistrationTime = 3600
+
+# The password that is used if registration is enabled (ie. MOHRegistrationTime is
+# greater than 0), and the registrar requires a password for the user specified in
+# the MOHUri.
+MOHPassword = 123
+
+# The audio filename to play for music-on-hold. Audio files may be AU, WAV or RAW
+# formats. Audiofiles should be 16bit mono, 8khz, PCM to avoid runtime conversion.
+MOHFilename = music.wav
+
+
+########################################################
+# Park settings
+########################################################
+
+# URI that SIP user agents use to communicate with the Park server. If a display name
+# is desired on calls placed by the Park server then it can be provided here using the
+# following format: "{displayName}"<sip:{user}@{domain}>
+# Example: "Parked"<sip:park at server.com>
+ParkUri = "Parked"<sip:park at blitzzgod.com>
+
+# Registration Time in seconds - set to 0 to disable registration
+ParkRegistrationTime = 3600
+
+# The password that is used if registration is enabled (ie. ParkRegistrationTime is
+# greater than 0), and the registrar requires a password for the user specified in
+# the ParkUri.
+ParkPassword = 123
+
+# The audio filename to play for music-on-hold. Audio files may be AU, WAV or RAW
+# formats. Audiofiles should be 16bit mono, 8khz, PCM to avoid runtime conversion.
+ParkMOHFilename = music.wav
+
+# A number specifying the starting number of the park orbit range. Orbit numbers
+# are treated as integers, thus this number must be 9 digits or less.
+ParkOrbitRangeStart = 6000
+
+# The number of park orbits to allocate and potentially register. For example, if
+# ParkOrbitRangeStart is specified as 6000 and ParkNumOrbits is 10, then the number
+# range 6000-6009 will be used for park orbits.
+ParkNumOrbits = 10
+
+# The registration period, in seconds, to use when registering the orbit retrieval
+# identities. Specify this setting as 0 to disable registration of the park orbit
+# URIs.
+# Note: Park orbit URI’s are formed by taking the park orbit number as the SIP user
+# and the domain from the ParkUri setting. For example, if the ParkUri is specified
+# as sip:park at server.com and the ParkOrbitRangeStart is 6000, then the first park orbit
+# Uri will be: sip:6000 at server.com
+ParkOrbitRegistrationTime = 3600
+
+# The password that is used if orbit registration is enabled (ie.
+# ParkOrbitRegistrationTime is greater than 0), and the registrar requires a password
+# for the park orbit user.
+ParkOrbitPassword = 123
+
+# The number of seconds the park server will allow a call to stay parked. If a call is
+# not retrieved within this time, it will ring back the party that originally parked the
+# call (set to 0 to disable).
+MaxParkTime = 600
+
+
+########################################################
+# SIP settings
+########################################################
+
+# Local IP Address to bind SIP transports to. If left blank
+# MOHParkServer will bind to all adapters.
+#IPAddress = 192.168.1.106
+#IPAddress = 2001:5c0:1000:a::6d
+IPAddress =
+
+# Comma separated list of DNS servers, overrides default OS detected list (leave blank for default)
+DNSServers = 192.168.1.105
+
+# Local port to listen on for SIP messages over UDP
+UDPPort = 5072
+
+# Local port to listen on for SIP messages over TCP
+TCPPort = 5072
+
+# Local port to listen on for SIP messages over TLS
+TLSPort = 5073
+
+# TLS domain name for this server (note: domain cert for this domain must be present)
+TLSDomainName =
+
+# Enable/Disable TCP/UDP CRLFCRLF keepalive packets for SIP endpoints
+# 1|true|on|enable to enable, 0|false|off|disable to disable
+KeepAlives = enable
+
+# URI of a proxy server to use a SIP outbound proxy. This setting should not be required if
+# proper DNS based SIP routing is operational.
+OutboundProxy =
+
+
+########################################################
+# Media settings
+########################################################
+
+# Specifies the start of the range of UDP port numbers to be used to send RTP traffic.
+MediaPortRangeStart = 50000
+
+# Specifies the size of the range of UDP port numbers to be used to send RTP traffic.
+# Calls will be rejected when the media ports are depleted. A SIP call requires 2 media
+# ports for each call (RTP and RTCP). For example: a setting of 800 will limit the server
+# to a maximum of 400 calls.
+MediaPortRangeSize = 800
+
+# Log Filename - leave blank to disable sipXtapi logging
+sipXLogFilename = sipXtapi.log
+
+
+########################################################
+# General settings
+########################################################
+
+# Port number for HTTP Server to run on that shows all active calls
+HttpPort = 5082
+
+# Logging level: NONE|ERR|WARNING|INFO|DEBUG|STACK
+LogLevel = WARNING
+
+# Log Filename
+LogFilename = MOHParkServer.log
+
+# Log file Max Bytes
+LogFileMaxBytes = 5000000
diff --git a/resip/recon/MOHParkServer/MOHParkServer.cxx b/resip/recon/MOHParkServer/MOHParkServer.cxx
new file mode 100644
index 0000000..abe1ea4
--- /dev/null
+++ b/resip/recon/MOHParkServer/MOHParkServer.cxx
@@ -0,0 +1,126 @@
+#include <signal.h>
+
+#include "AppSubsystem.hxx"
+#include "Server.hxx"
+
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/BaseException.hxx>
+#include <resip/stack/NameAddr.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace mohparkserver;
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+void sleepSeconds(unsigned int seconds)
+{
+#ifdef WIN32
+ Sleep(seconds*1000);
+#else
+ sleep(seconds);
+#endif
+}
+
+static bool finished = false;
+
+static void
+signalHandler(int signo)
+{
+ std::cerr << "Shutting down..." << endl;
+ finished = true;
+}
+
+int
+main (int argc, char** argv)
+{
+#ifndef _WIN32
+ if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
+ {
+ cerr << "Couldn't install signal handler for SIGPIPE" << endl;
+ exit(-1);
+ }
+#else
+#if defined(_DEBUG) && defined(LEAK_CHECK)
+ resip::FindMemoryLeaks fml;
+#endif
+#endif
+
+ if ( signal( SIGINT, signalHandler ) == SIG_ERR )
+ {
+ cerr << "Couldn't install signal handler for SIGINT" << endl;
+ exit( -1 );
+ }
+
+ if ( signal( SIGTERM, signalHandler ) == SIG_ERR )
+ {
+ cerr << "Couldn't install signal handler for SIGTERM" << endl;
+ exit( -1 );
+ }
+
+ initNetwork();
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Create Server
+ //////////////////////////////////////////////////////////////////////////////
+ {
+ ConfigParser config(argc, argv);
+ Server server(config);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Startup and run...
+ //////////////////////////////////////////////////////////////////////////////
+
+ server.startup();
+
+ while(true)
+ {
+ server.process(500);
+ if(finished) break;
+ }
+
+ server.shutdown();
+ }
+
+ InfoLog(<< "MOHParkServer is shutdown.");
+ sleepSeconds(2);
+}
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/MOHParkServer_9_0.vcproj b/resip/recon/MOHParkServer/MOHParkServer_9_0.vcproj
new file mode 100644
index 0000000..e2564c7
--- /dev/null
+++ b/resip/recon/MOHParkServer/MOHParkServer_9_0.vcproj
@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="MOHParkServer"
+ ProjectGUID="{74D896AB-C35B-4BB3-9418-D18D509C8D22}"
+ RootNamespace="MOHParkServer"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-MOHParkServer.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/MOHParkServer.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/MOHParkServer.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MOHParkServer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-MOHParkServer.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\MOHParkServer.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/MOHParkServer.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MOHParkServer.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-MOHParkServer.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/MOHParkServer.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/MOHParkServer.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MOHParkServer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-MOHParkServer.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\MOHParkServer.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/MOHParkServer.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MOHParkServer.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath=".\AppSubsystem.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ConfigParser.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\HttpBase.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\HttpConnection.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\MOHManager.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\MOHParkServer.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ParkManager.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ParkOrbit.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\Server.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\WebAdmin.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\WebAdminThread.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ <File
+ RelativePath=".\ActiveCallInfo.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\AppSubsystem.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ConfigParser.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\HttpBase.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\HttpConnection.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\MOHManager.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ParkManager.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\ParkOrbit.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\Server.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\WebAdmin.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\WebAdminThread.hxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath=".\MOHParkServer.config"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/resip/recon/MOHParkServer/Makefile.am b/resip/recon/MOHParkServer/Makefile.am
new file mode 100644
index 0000000..725019f
--- /dev/null
+++ b/resip/recon/MOHParkServer/Makefile.am
@@ -0,0 +1,46 @@
+
+# WARNING
+#
+# This is not a final version of Makefile.am
+#
+# it has just been created to ensure the files are part of the
+# distribution tarball so that they build on Windows
+#
+
+EXTRA_DIST = ca.pem
+EXTRA_DIST += doc
+EXTRA_DIST += *.vcproj
+EXTRA_DIST += MOHParkServer.config
+EXTRA_DIST += music.wav
+
+LDADD = ../librecon.la
+#LDADD += ../../........whatever
+
+sbin_PROGRAMS = MOHParkServer
+
+MOHParkServer_SOURCES = \
+ AppSubsystem.cxx \
+ ConfigParser.cxx \
+ HttpBase.cxx \
+ HttpConnection.cxx \
+ MOHManager.cxx \
+ MOHParkServer.cxx \
+ ParkManager.cxx \
+ ParkOrbit.cxx \
+ Server.cxx \
+ WebAdmin.cxx \
+ WebAdminThread.cxx
+
+noinst_HEADERS = \
+ ActiveCallInfo.hxx \
+ AppSubsystem.hxx \
+ ConfigParser.hxx \
+ HttpBase.hxx \
+ HttpConnection.hxx \
+ MOHManager.hxx \
+ ParkManager.hxx \
+ ParkOrbit.hxx \
+ Server.hxx \
+ WebAdmin.hxx \
+ WebAdminThread.hxx
+
diff --git a/resip/recon/MOHParkServer/Makefile.in b/resip/recon/MOHParkServer/Makefile.in
new file mode 100644
index 0000000..d709341
--- /dev/null
+++ b/resip/recon/MOHParkServer/Makefile.in
@@ -0,0 +1,576 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# WARNING
+#
+# This is not a final version of Makefile.am
+#
+# it has just been created to ensure the files are part of the
+# distribution tarball so that they build on Windows
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+sbin_PROGRAMS = MOHParkServer$(EXEEXT)
+subdir = resip/recon/MOHParkServer
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_epoll.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am_MOHParkServer_OBJECTS = AppSubsystem.$(OBJEXT) \
+ ConfigParser.$(OBJEXT) HttpBase.$(OBJEXT) \
+ HttpConnection.$(OBJEXT) MOHManager.$(OBJEXT) \
+ MOHParkServer.$(OBJEXT) ParkManager.$(OBJEXT) \
+ ParkOrbit.$(OBJEXT) Server.$(OBJEXT) WebAdmin.$(OBJEXT) \
+ WebAdminThread.$(OBJEXT)
+MOHParkServer_OBJECTS = $(am_MOHParkServer_OBJECTS)
+MOHParkServer_LDADD = $(LDADD)
+MOHParkServer_DEPENDENCIES = ../librecon.la
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(MOHParkServer_SOURCES)
+DIST_SOURCES = $(MOHParkServer_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GPERF = @GPERF@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBARES_LIBADD = @LIBARES_LIBADD@
+LIBGEOIP_LIBADD = @LIBGEOIP_LIBADD@
+LIBMYSQL_LIBADD = @LIBMYSQL_LIBADD@
+LIBOBJS = @LIBOBJS@
+LIBPOPT_LIBADD = @LIBPOPT_LIBADD@
+LIBRADIUS_LIBADD = @LIBRADIUS_LIBADD@
+LIBS = @LIBS@
+LIBSSL_LIBADD = @LIBSSL_LIBADD@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_RELEASE = @LIBTOOL_VERSION_RELEASE@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SO_RELEASE = @SO_RELEASE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = ca.pem doc *.vcproj MOHParkServer.config music.wav
+LDADD = ../librecon.la
+MOHParkServer_SOURCES = \
+ AppSubsystem.cxx \
+ ConfigParser.cxx \
+ HttpBase.cxx \
+ HttpConnection.cxx \
+ MOHManager.cxx \
+ MOHParkServer.cxx \
+ ParkManager.cxx \
+ ParkOrbit.cxx \
+ Server.cxx \
+ WebAdmin.cxx \
+ WebAdminThread.cxx
+
+noinst_HEADERS = \
+ ActiveCallInfo.hxx \
+ AppSubsystem.hxx \
+ ConfigParser.hxx \
+ HttpBase.hxx \
+ HttpConnection.hxx \
+ MOHManager.hxx \
+ ParkManager.hxx \
+ ParkOrbit.hxx \
+ Server.hxx \
+ WebAdmin.hxx \
+ WebAdminThread.hxx
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu resip/recon/MOHParkServer/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu resip/recon/MOHParkServer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+ @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+MOHParkServer$(EXEEXT): $(MOHParkServer_OBJECTS) $(MOHParkServer_DEPENDENCIES)
+ @rm -f MOHParkServer$(EXEEXT)
+ $(CXXLINK) $(MOHParkServer_OBJECTS) $(MOHParkServer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AppSubsystem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ConfigParser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/HttpBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/HttpConnection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MOHManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MOHParkServer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ParkManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ParkOrbit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Server.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/WebAdmin.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/WebAdminThread.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(sbindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-sbinPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-sbinPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinPROGRAMS install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-sbinPROGRAMS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/resip/recon/MOHParkServer/ParkManager.cxx b/resip/recon/MOHParkServer/ParkManager.cxx
new file mode 100644
index 0000000..e500a3b
--- /dev/null
+++ b/resip/recon/MOHParkServer/ParkManager.cxx
@@ -0,0 +1,467 @@
+#include "AppSubsystem.hxx"
+#include "ParkManager.hxx"
+#include "ParkOrbit.hxx"
+#include "Server.hxx"
+#include "../UserAgent.hxx"
+
+#include <resip/stack/ExtensionParameter.hxx>
+#include <resip/stack/SipMessage.hxx>
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+static const resip::ExtensionParameter p_orbit("orbit");
+static const resip::ExtensionParameter p_automaton("automaton");
+static const resip::ExtensionParameter p_byeless("+sip.byeless");
+static const resip::ExtensionParameter p_rendering("+sip.rendering");
+
+namespace mohparkserver
+{
+
+ParkManager::ParkManager(Server& server) :
+ mServer(server),
+ mConversationProfileHandle(0),
+ mOrbitRangeStart(0),
+ mNumOrbits(0),
+ mMaxParkTime(0)
+{
+}
+
+ParkManager::~ParkManager()
+{
+}
+
+void
+ParkManager::startup()
+{
+ // Initialize park settings
+ initializeParkSettings(mServer.mConfig.mMaxParkTime, mServer.mConfig.mParkMOHFilenameUrl);
+
+ // Setup Park ConversationProfile
+ initializeConversationProfile(mServer.mConfig.mParkUri, mServer.mConfig.mParkPassword, mServer.mConfig.mParkRegistrationTime, mServer.mConfig.mOutboundProxy);
+
+ // Create Orbit Profiles
+ initializeOrbitConversationProfiles(mServer.mConfig.mParkOrbitRangeStart, mServer.mConfig.mParkNumOrbits, mServer.mConfig.mParkUri, mServer.mConfig.mParkOrbitPassword, mServer.mConfig.mParkOrbitRegistrationTime, mServer.mConfig.mOutboundProxy);
+}
+
+void
+ParkManager::initializeConversationProfile(const NameAddr& uri, const Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy)
+{
+ Lock lock(mMutex);
+
+ if(mConversationProfileHandle)
+ {
+ mServer.mMyUserAgent->destroyConversationProfile(mConversationProfileHandle);
+ mConversationProfileHandle = 0;
+ }
+
+ SharedPtr<ConversationProfile> parkConversationProfile = SharedPtr<ConversationProfile>(new ConversationProfile(mServer.mUserAgentMasterProfile));
+ parkConversationProfile->setDefaultRegistrationTime(registrationTime);
+ parkConversationProfile->setDefaultRegistrationRetryTime(120); // 2 mins
+ parkConversationProfile->setDefaultFrom(uri);
+ parkConversationProfile->setDigestCredential(uri.uri().host(), uri.uri().user(), password);
+ if(!outboundProxy.uri().host().empty())
+ {
+ parkConversationProfile->setOutboundProxy(outboundProxy.uri());
+ }
+ parkConversationProfile->challengeOODReferRequests() = false;
+ parkConversationProfile->setExtraHeadersInReferNotifySipFragEnabled(true); // Enable dialog identifying headers in SipFrag bodies of Refer Notifies
+ NameAddr capabilities;
+ capabilities.param(p_automaton);
+ capabilities.param(p_byeless);
+ capabilities.param(p_rendering) = "\"no\"";
+ parkConversationProfile->setUserAgentCapabilities(capabilities); // Same as above
+ parkConversationProfile->natTraversalMode() = ConversationProfile::NoNatTraversal;
+ parkConversationProfile->secureMediaMode() = ConversationProfile::NoSecureMedia;
+ mServer.buildSessionCapabilities(parkConversationProfile->sessionCaps());
+ mConversationProfileHandle = mServer.mMyUserAgent->addConversationProfile(parkConversationProfile);
+ mParkUri = uri;
+}
+
+void
+ParkManager::initializeOrbitConversationProfiles(unsigned long orbitStart,
+ unsigned long numOrbits,
+ const NameAddr& uri,
+ const Data& password,
+ unsigned long registrationTime,
+ const resip::NameAddr& outboundProxy)
+{
+ Lock lock(mMutex);
+
+ // Remove current Profiles (if set)
+ OrbitProfileMap::iterator itOrbit = mOrbitProfiles.begin();
+ for(;itOrbit!=mOrbitProfiles.end();itOrbit++)
+ {
+ mServer.mMyUserAgent->destroyConversationProfile(itOrbit->second);
+ }
+ mOrbitProfiles.clear();
+
+ // Store orbit range values
+ mOrbitRangeStart = orbitStart;
+ mNumOrbits = numOrbits;
+
+ // Clear free list and rebuild it
+ mFreeOrbitList.clear();
+
+ for(unsigned long orbit = mOrbitRangeStart; orbit < mOrbitRangeStart + mNumOrbits; orbit++)
+ {
+ SharedPtr<ConversationProfile> orbitConversationProfile = SharedPtr<ConversationProfile>(new ConversationProfile(mServer.mUserAgentMasterProfile));
+ Data orbitData(orbit);
+ orbitConversationProfile->setDefaultRegistrationTime(registrationTime);
+ orbitConversationProfile->setDefaultRegistrationRetryTime(120); // 2 mins
+ orbitConversationProfile->setDefaultFrom(uri);
+ orbitConversationProfile->getDefaultFrom().uri().user() = orbitData;
+ orbitConversationProfile->setDigestCredential(uri.uri().host(), orbitData, password);
+ if(!outboundProxy.uri().host().empty())
+ {
+ orbitConversationProfile->setOutboundProxy(outboundProxy.uri());
+ }
+ orbitConversationProfile->challengeOODReferRequests() = false;
+ orbitConversationProfile->setExtraHeadersInReferNotifySipFragEnabled(true); // Enable dialog identifying headers in SipFrag bodies of Refer Notifies
+ NameAddr capabilities;
+ capabilities.param(p_automaton);
+ capabilities.param(p_byeless);
+ capabilities.param(p_rendering) = "\"no\"";
+ orbitConversationProfile->setUserAgentCapabilities(capabilities); // Same as above
+ orbitConversationProfile->natTraversalMode() = ConversationProfile::NoNatTraversal;
+ orbitConversationProfile->secureMediaMode() = ConversationProfile::NoSecureMedia;
+ mServer.buildSessionCapabilities(orbitConversationProfile->sessionCaps());
+ mOrbitProfiles[orbit] = mServer.mMyUserAgent->addConversationProfile(orbitConversationProfile);
+
+ // If orbit is free - add to free list
+ if(mOrbits.find(orbit) == mOrbits.end())
+ {
+ mFreeOrbitList.push_back(orbit);
+ }
+ }
+}
+
+void
+ParkManager::initializeParkSettings(unsigned long maxParkTime, const resip::Uri& musicFilename)
+{
+ Lock lock(mMutex);
+ mMaxParkTime = maxParkTime;
+ mMusicFilename = musicFilename;
+}
+
+void
+ParkManager::shutdown(bool shuttingDownServer)
+{
+ Lock lock(mMutex);
+ OrbitMap::iterator it = mOrbits.begin();
+ for(;it!=mOrbits.end();it++)
+ {
+ // Delete all Orbit objects
+ delete it->second;
+ }
+ mOrbits.clear();
+ mOrbitsByParticipant.clear();
+
+ // If shutting down server, then we shouldn't remove the conversation profiles here
+ // shutting down the ConversationManager will take care of this. We need to be sure
+ // we don't remove all conversation profiles when we are still processing SipMessages,
+ // since recon requires at least one to be present for inbound processing.
+ if(!shuttingDownServer)
+ {
+ // Destroy main Park profile
+ if(mConversationProfileHandle)
+ {
+ mServer.mMyUserAgent->destroyConversationProfile(mConversationProfileHandle);
+ mConversationProfileHandle = 0;
+ }
+
+ // Destroy Orbit Profiles
+ OrbitProfileMap::iterator itOrbit = mOrbitProfiles.begin();
+ for(;itOrbit!=mOrbitProfiles.end();itOrbit++)
+ {
+ mServer.mMyUserAgent->destroyConversationProfile(itOrbit->second);
+ }
+ mOrbitProfiles.clear();
+ }
+}
+
+bool
+ParkManager::isMyProfile(recon::ConversationProfile& profile)
+{
+ Lock lock(mMutex);
+ if(profile.getHandle() == mConversationProfileHandle)
+ {
+ return true;
+ }
+ else
+ {
+ // check orbit profiles
+ OrbitProfileMap::iterator it = mOrbitProfiles.begin();
+ for(;it!=mOrbitProfiles.end();it++)
+ {
+ if(profile.getHandle() == it->second)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+ParkOrbit*
+ParkManager::getOrbit(unsigned long orbit)
+{
+ assert((orbit >= mOrbitRangeStart) &&
+ (orbit < (mOrbitRangeStart + mNumOrbits)));
+
+ // Check if Orbit is created or not yet
+ OrbitMap::iterator it = mOrbits.find(orbit);
+ ParkOrbit* parkOrbit = 0;
+ if(it == mOrbits.end())
+ {
+ // Create Orbit
+ parkOrbit = new ParkOrbit(mServer, orbit, mMaxParkTime, mMusicFilename);
+ mOrbits[orbit] = parkOrbit;
+
+ // Remove from free list
+ std::deque<unsigned long>::iterator itFree = mFreeOrbitList.begin();
+ for(;itFree!=mFreeOrbitList.end();itFree++)
+ {
+ if(orbit == *itFree)
+ {
+ mFreeOrbitList.erase(itFree);
+ break;
+ }
+ }
+ }
+ else
+ {
+ // Use existing
+ parkOrbit = it->second;
+ }
+ return parkOrbit;
+}
+
+ParkOrbit*
+ParkManager::getOrbitByParticipant(recon::ParticipantHandle participantHandle)
+{
+ OrbitsByParticipantMap::iterator it = mOrbitsByParticipant.find(participantHandle);
+ if(it != mOrbitsByParticipant.end())
+ {
+ return it->second;
+ }
+ return 0;
+}
+
+bool
+ParkManager::addParticipantToOrbit(ParkOrbit* orbit, recon::ParticipantHandle participantHandle, const resip::Uri& parkedUri, const resip::Uri& parkerUri)
+{
+ if(orbit->addParticipant(participantHandle, parkedUri, parkerUri))
+ {
+ mOrbitsByParticipant[participantHandle] = orbit; // add participant to orbit index
+ return true;
+ }
+ return false;
+}
+
+void
+ParkManager::parkParticipant(ParticipantHandle participantHandle, const SipMessage& msg)
+{
+ Lock lock(mMutex);
+
+ unsigned long orbit = 0;
+ assert(msg.method() == REFER);
+
+ // Check if Orbit parameter has been specified on the To header
+ if(msg.header(h_To).uri().exists(p_orbit))
+ {
+ orbit = msg.header(h_To).uri().param(p_orbit).convertUnsignedLong();
+ }
+
+ if((orbit >= mOrbitRangeStart) &&
+ (orbit < (mOrbitRangeStart + mNumOrbits)))
+ {
+ // Park call at specified orbit
+ ParkOrbit* parkOrbit = getOrbit(orbit);
+ assert(parkOrbit);
+ addParticipantToOrbit(parkOrbit, participantHandle, msg.header(h_ReferTo).uri().getAorAsUri(), msg.header(h_From).uri());
+ }
+ else
+ {
+ // If no orbit was specified, or specified number is bad - select a free orbit, and redirect request to use newly allocated orbit
+ if(mFreeOrbitList.size() > 0)
+ {
+ unsigned long freeorbit = mFreeOrbitList.front();
+ // Move free item to end of list, to reduce chance it will be double allocated
+ mFreeOrbitList.pop_front();
+ mFreeOrbitList.push_back(freeorbit);
+ InfoLog(<< "ParkManager::parkParticipant no valid orbit specified (orbit=" << orbit << ") redirecting to free orbit=" << freeorbit);
+ NameAddr destination(mParkUri);
+ destination.uri().param(p_orbit) = Data(freeorbit);
+ mServer.redirectParticipant(participantHandle, destination);
+ }
+ else
+ {
+ // No free orbits
+ WarningLog(<< "ParkManager::parkParticipant no free orbits available, rejecing with 486 busy.");
+ mServer.rejectParticipant(participantHandle, 486 /* Busy */);
+ }
+ }
+}
+
+void
+ParkManager::incomingParticipant(ParticipantHandle participantHandle, const SipMessage& msg)
+{
+ Lock lock(mMutex);
+
+ // Get orbit number, either from To Uri parameter, or To user
+ unsigned long orbit = 0;
+ if(msg.header(h_To).uri().exists(p_orbit))
+ {
+ orbit = msg.header(h_To).uri().param(p_orbit).convertUnsignedLong();
+ }
+ else
+ {
+ orbit = msg.header(h_To).uri().user().convertUnsignedLong();
+ }
+ if((orbit >= mOrbitRangeStart) &&
+ (orbit < (mOrbitRangeStart + mNumOrbits)))
+ {
+ // Check if this is a direct call, or a transferred call. We will allow transferred calls to be parked, as an alternative parking method
+ if(msg.exists(h_ReferredBy))
+ {
+ // If a Referred-By header is present then this was a transferred call - park it
+ // Park call at specified orbit
+ ParkOrbit* parkOrbit = getOrbit(orbit);
+ assert(parkOrbit);
+ addParticipantToOrbit(parkOrbit, participantHandle, msg.header(h_From).uri(), msg.header(h_ReferredBy).uri());
+ }
+ else // Direct call - retrieval attempt
+ {
+ // Orbit is valid - see if we have a call parked there
+ OrbitMap::iterator it = mOrbits.find(orbit);
+ ParticipantHandle participantToRetrieve = 0;
+ if(it!=mOrbits.end() && (participantToRetrieve = it->second->getNextQueuedParticipant()) != 0)
+ {
+ // Answer incoming call and then immediately redirect to parked call
+ mServer.addParticipant(it->second->getConversationHandle(), participantHandle);
+ mServer.modifyParticipantContribution(it->second->getConversationHandle(), participantHandle, 0, 0 /* Mute participant */);
+ mServer.answerParticipant(participantHandle);
+ mServer.redirectToParticipant(participantHandle, participantToRetrieve);
+
+ InfoLog(<< "ParkManager::incomingParticipant retrieving participant " << participantToRetrieve << " from orbit " << orbit);
+ }
+ else
+ {
+ WarningLog(<< "ParkManager::incomingParticipant orbit " << orbit << " has no call to retrieve, rejecting with 404.");
+ mServer.rejectParticipant(participantHandle, 404 /* Not Found */);
+ }
+ }
+ }
+ else
+ {
+ WarningLog(<< "ParkManager::incomingParticipant valid orbit not found in To header (" << msg.header(h_To).uri() << "), rejecting with 404.");
+ mServer.rejectParticipant(participantHandle, 404 /* Not Found */);
+ }
+}
+
+bool
+ParkManager::removeParticipant(ParticipantHandle participantHandle)
+{
+ Lock lock(mMutex);
+ ParkOrbit* orbit = getOrbitByParticipant(participantHandle);
+ if(orbit)
+ {
+ mOrbitsByParticipant.erase(participantHandle); // Remove participant from orbit index
+ if(orbit->removeParticipant(participantHandle))
+ {
+ if(orbit->getNumParticipants() == 0)
+ {
+ // Last participant just left orbit - destroy it
+ unsigned long orbitNum = orbit->getOrbit();
+ if((orbitNum >= mOrbitRangeStart) &&
+ (orbitNum < (mOrbitRangeStart + mNumOrbits)))
+ {
+ // Only add back to free list, if in currently configured range
+ mFreeOrbitList.push_back(orbitNum);
+ }
+ delete orbit;
+ mOrbits.erase(orbitNum);
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+void
+ParkManager::getActiveCallsInfo(CallInfoList& callInfos)
+{
+ Lock lock(mMutex);
+
+ OrbitMap::iterator it = mOrbits.begin();
+ for(; it != mOrbits.end(); it++)
+ {
+ ParkOrbit::ParticipantQueue::iterator it2 = it->second->mParticipants.begin();
+ for(; it2 != it->second->mParticipants.end(); it2++)
+ {
+ callInfos.push_back(ActiveCallInfo((*it2)->mParkedUri,
+ (*it2)->mParkerUri,
+ Data("Parked at " + Data(it->first)),
+ (*it2)->mParticipantHandle,
+ it->second->mConversationHandle));
+ }
+ }
+}
+
+void
+ParkManager::onMaxParkTimeout(recon::ParticipantHandle participantHandle)
+{
+ Lock lock(mMutex);
+
+ // Try to see if participant is still around
+ ParkOrbit* orbit = getOrbitByParticipant(participantHandle);
+ if(orbit)
+ {
+ orbit->onMaxParkTimeout(participantHandle);
+ }
+}
+
+
+}
+
+/* ====================================================================
+
+ Copyright (c) 2011, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/ParkManager.hxx b/resip/recon/MOHParkServer/ParkManager.hxx
new file mode 100644
index 0000000..a4b2f87
--- /dev/null
+++ b/resip/recon/MOHParkServer/ParkManager.hxx
@@ -0,0 +1,104 @@
+#if !defined(ParkManager_hxx)
+#define ParkManager_hxx
+
+#include <map>
+#include <deque>
+#include "ActiveCallInfo.hxx"
+#include "../UserAgent.hxx"
+#include "../HandleTypes.hxx"
+
+namespace resip
+{
+class SipMessage;
+}
+
+namespace mohparkserver
+{
+class Server;
+class ParkOrbit;
+
+class ParkManager
+{
+public:
+ ParkManager(Server& server);
+ virtual ~ParkManager();
+
+ void startup();
+ void initializeConversationProfile(const resip::NameAddr& uri, const resip::Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy);
+ void initializeOrbitConversationProfiles(unsigned long orbitStart, unsigned long numOrbits, const resip::NameAddr& uri, const resip::Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy);
+ void initializeParkSettings(unsigned long maxParkTime, const resip::Uri& musicFilename);
+ void shutdown(bool shuttingDownServer);
+
+ bool isMyProfile(recon::ConversationProfile& profile);
+ void parkParticipant(recon::ParticipantHandle participantHandle, const resip::SipMessage& msg);
+ void incomingParticipant(recon::ParticipantHandle participantHandle, const resip::SipMessage& msg);
+ bool removeParticipant(recon::ParticipantHandle participantHandle);
+ void getActiveCallsInfo(CallInfoList& callInfos);
+
+ void onMaxParkTimeout(recon::ParticipantHandle participantHandle);
+
+private:
+ resip::Mutex mMutex;
+ Server& mServer;
+ volatile recon::ConversationProfileHandle mConversationProfileHandle;
+ resip::NameAddr mParkUri;
+ unsigned long mOrbitRangeStart;
+ unsigned long mNumOrbits;
+ unsigned long mMaxParkTime;
+ resip::Uri mMusicFilename;
+ std::deque<unsigned long> mFreeOrbitList;
+
+ // Orbit by orbit number
+ ParkOrbit* getOrbit(unsigned long orbit);
+ typedef std::map<unsigned long, ParkOrbit*> OrbitMap;
+ OrbitMap mOrbits;
+
+ // index on orbits for fast access
+ ParkOrbit* getOrbitByParticipant(recon::ParticipantHandle participantHandle);
+ typedef std::map<recon::ParticipantHandle, ParkOrbit*> OrbitsByParticipantMap;
+ OrbitsByParticipantMap mOrbitsByParticipant;
+
+ bool addParticipantToOrbit(ParkOrbit* orbit, recon::ParticipantHandle participantHandle, const resip::Uri& parkedUri, const resip::Uri& parkerUri);
+
+ typedef std::map<unsigned long, recon::ConversationProfileHandle> OrbitProfileMap;
+ OrbitProfileMap mOrbitProfiles;
+};
+
+}
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2011, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/ParkOrbit.cxx b/resip/recon/MOHParkServer/ParkOrbit.cxx
new file mode 100644
index 0000000..f17a9ab
--- /dev/null
+++ b/resip/recon/MOHParkServer/ParkOrbit.cxx
@@ -0,0 +1,156 @@
+#include "AppSubsystem.hxx"
+#include "ParkOrbit.hxx"
+#include "Server.hxx"
+
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+#define ALLOCATIONTIME 32 // The number of seconds to condsider a participant allocated, when a retreival is attempted
+ // If the call fails to retrieve, it will still be available to be retrieved by
+ // another attempt after this time expires.
+namespace mohparkserver
+{
+
+ParkOrbit::ParkOrbit(Server& server, unsigned long orbit, unsigned long maxParkTime, const resip::Uri& musicFilename) :
+ mServer(server),
+ mOrbit(orbit),
+ mMaxParkTime(maxParkTime)
+{
+ // Create an initial conversation and start music
+ mConversationHandle = mServer.createConversation(true /* broadcast only*/);
+
+ // Play Music
+ mServer.createMediaResourceParticipant(mConversationHandle, musicFilename);
+
+ InfoLog(<< "ParkOrbit::ParkOrbit created orbit " << mOrbit);
+}
+
+ParkOrbit::~ParkOrbit()
+{
+ mServer.destroyConversation(mConversationHandle);
+ InfoLog(<< "ParkOrbit::~ParkOrbit destroyed orbit " << mOrbit);
+}
+
+bool
+ParkOrbit::addParticipant(recon::ParticipantHandle participantHandle, const Uri& parkedUri, const Uri& parkerUri)
+{
+ if(mParticipants.size() < DEFAULT_BRIDGE_MAX_IN_OUTPUTS-3)
+ {
+ mServer.addParticipant(mConversationHandle, participantHandle);
+ mServer.modifyParticipantContribution(mConversationHandle, participantHandle, 100, 0 /* Mute participant */);
+ mServer.answerParticipant(participantHandle);
+
+ if(mMaxParkTime != 0)
+ {
+ mServer.getMyUserAgent()->startApplicationTimer(MAXPARKTIMEOUT, mMaxParkTime*1000, participantHandle);
+ }
+
+ mParticipants.push_back(new ParticipantOrbitInfo(participantHandle, parkedUri, parkerUri));
+ InfoLog(<< "ParkOrbit::addParticipant added participant=" << participantHandle << " to orbit " << mOrbit << " (size=" << mParticipants.size() << "), parkedUri=" << parkedUri << ", parkerUri=" << parkerUri);
+ return true;
+ }
+ else
+ {
+ mServer.rejectParticipant(participantHandle, 486);
+ WarningLog(<< "ParkOrbit::addParticipant cannot add participant=" << participantHandle << " to full orbit " << mOrbit << " (size=" << mParticipants.size() << ")");
+ return false;
+ }
+}
+
+bool
+ParkOrbit::removeParticipant(recon::ParticipantHandle participantHandle)
+{
+ ParticipantQueue::iterator it = mParticipants.begin();
+ for(;it!=mParticipants.end();it++)
+ {
+ if((*it)->mParticipantHandle == participantHandle)
+ {
+ delete *it;
+ mParticipants.erase(it);
+ InfoLog(<< "ParkOrbit::removeParticipant removed participant=" << participantHandle << " from orbit " << mOrbit << " (size=" << mParticipants.size() << ")");
+ return true;
+ }
+ }
+ return false;
+}
+
+ParticipantHandle
+ParkOrbit::getNextQueuedParticipant()
+{
+ ParticipantHandle participantHandle = 0;
+ if(!mParticipants.empty())
+ {
+ UInt64 now = resip::Timer::getTimeSecs();
+ if(now - mParticipants.front()->mAllocationTime > ALLOCATIONTIME)
+ {
+ participantHandle = mParticipants.front()->mParticipantHandle;
+ mParticipants.front()->mAllocationTime = now;
+ // Move to back of queue
+ mParticipants.push_back(mParticipants.front());
+ mParticipants.pop_front();
+ InfoLog(<< "ParkOrbit::getNextQueuedParticipant removed participant=" << participantHandle << " from orbit " << mOrbit << " (size=" << mParticipants.size() << ")");
+ }
+ }
+ return participantHandle;
+}
+
+bool
+ParkOrbit::onMaxParkTimeout(recon::ParticipantHandle participantHandle)
+{
+ ParticipantQueue::iterator it = mParticipants.begin();
+ for(;it!=mParticipants.end();it++)
+ {
+ if((*it)->mParticipantHandle == participantHandle)
+ {
+ InfoLog(<< "ParkOrbit::onMaxParkTimeout sending parked call back to " << (*it)->mParkerUri << ", participant=" << participantHandle << " from orbit " << mOrbit << " (size=" << mParticipants.size() << ")");
+ mServer.redirectParticipant(participantHandle, NameAddr((*it)->mParkerUri));
+ (*it)->mAllocationTime = resip::Timer::getTimeSecs(); // Ensure call can't be retrieved between now and destruction
+ mServer.destroyParticipant(participantHandle); // Fully blind transfer - don't wait for notifies
+ return true;
+ }
+ }
+ return false;
+}
+
+}
+
+/* ====================================================================
+
+ Copyright (c) 2011, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/ParkOrbit.hxx b/resip/recon/MOHParkServer/ParkOrbit.hxx
new file mode 100644
index 0000000..eda9f06
--- /dev/null
+++ b/resip/recon/MOHParkServer/ParkOrbit.hxx
@@ -0,0 +1,86 @@
+#if !defined(ParkOrbit_hxx)
+#define ParkOrbit_hxx
+
+#include <deque>
+#include <resip/stack/Uri.hxx>
+#include "../HandleTypes.hxx"
+
+namespace mohparkserver
+{
+class Server;
+
+class ParticipantOrbitInfo
+{
+public:
+ ParticipantOrbitInfo(recon::ParticipantHandle participantHandle, const resip::Uri& parkedUri, const resip::Uri& parkerUri) :
+ mParticipantHandle(participantHandle), mParkedUri(parkedUri), mParkerUri(parkerUri) {}
+ recon::ParticipantHandle mParticipantHandle;
+ UInt64 mAllocationTime;
+ resip::Uri mParkedUri;
+ resip::Uri mParkerUri;
+};
+
+class ParkOrbit
+{
+public:
+ ParkOrbit(Server& server, unsigned long orbit, unsigned long maxParkTime, const resip::Uri& musicFilename);
+ virtual ~ParkOrbit();
+
+ bool addParticipant(recon::ParticipantHandle participantHandle, const resip::Uri& parkedUri, const resip::Uri& parkerUri);
+ bool removeParticipant(recon::ParticipantHandle participantHandle);
+
+ recon::ParticipantHandle getNextQueuedParticipant();
+ unsigned long getOrbit() { return mOrbit; }
+ unsigned long getNumParticipants() { return (unsigned long)mParticipants.size(); }
+ recon::ConversationHandle getConversationHandle() { return mConversationHandle; }
+
+ bool onMaxParkTimeout(recon::ParticipantHandle participantHandle);
+
+private:
+ friend class ParkManager;
+ Server& mServer;
+ unsigned long mOrbit;
+ unsigned long mMaxParkTime;
+ recon::ConversationHandle mConversationHandle;
+ typedef std::deque<ParticipantOrbitInfo*> ParticipantQueue;
+ ParticipantQueue mParticipants;
+};
+
+}
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2011, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/Server.cxx b/resip/recon/MOHParkServer/Server.cxx
new file mode 100644
index 0000000..26416ab
--- /dev/null
+++ b/resip/recon/MOHParkServer/Server.cxx
@@ -0,0 +1,570 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef WIN32
+#include <process.h>
+#else
+#include <spawn.h>
+#endif
+
+#include "Server.hxx"
+#include "../UserAgent.hxx"
+#include "AppSubsystem.hxx"
+#include "WebAdmin.hxx"
+#include "WebAdminThread.hxx"
+
+#include <resip/stack/Tuple.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/ThreadIf.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+// sipX includes
+#include <os/OsSysLog.h>
+
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+namespace mohparkserver
+{
+
+class SdpMessageDecorator : public MessageDecorator
+{
+public:
+ virtual ~SdpMessageDecorator() {}
+ virtual void decorateMessage(SipMessage &msg,
+ const Tuple &source,
+ const Tuple &destination,
+ const Data& sigcompId)
+ {
+ SdpContents* sdp = dynamic_cast<SdpContents*>(msg.getContents());
+ if(sdp && sdp->session().media().size() > 0 && sdp->session().connection().getAddress() == "0.0.0.0")
+ {
+ // Fill in IP and Port from source
+ sdp->session().connection().setAddress(Tuple::inet_ntop(source), source.ipVersion() == V6 ? SdpContents::IP6 : SdpContents::IP4);
+ sdp->session().origin().setAddress(Tuple::inet_ntop(source), source.ipVersion() == V6 ? SdpContents::IP6 : SdpContents::IP4);
+ DebugLog( << "SdpMessageDecorator: src=" << source << ", dest=" << destination << ", msg=" << endl << msg.brief());
+ }
+ }
+ virtual void rollbackMessage(SipMessage& msg) {} // Nothing to do
+ virtual MessageDecorator* clone() const { return new SdpMessageDecorator; }
+};
+
+class MyUserAgent : public UserAgent
+{
+public:
+ MyUserAgent(Server& server, SharedPtr<UserAgentMasterProfile> profile, resip::AfterSocketCreationFuncPtr socketFunc) :
+ UserAgent(&server, profile, socketFunc),
+ mServer(server) {}
+
+ virtual void onApplicationTimer(unsigned int id, unsigned int durationMs, unsigned int seq)
+ {
+ if(id == MAXPARKTIMEOUT)
+ {
+ mServer.onMaxParkTimeout((ParticipantHandle)seq);
+ }
+ else
+ {
+ InfoLog(<< "onApplicationTimeout: id=" << id << " dur=" << durationMs << " seq=" << seq);
+ }
+
+ }
+
+ virtual void onSubscriptionTerminated(SubscriptionHandle handle, unsigned int statusCode)
+ {
+ InfoLog(<< "onSubscriptionTerminated: handle=" << handle << " statusCode=" << statusCode);
+ }
+
+ virtual void onSubscriptionNotify(SubscriptionHandle handle, Data& notifyData)
+ {
+ InfoLog(<< "onSubscriptionNotify: handle=" << handle << " data=" << endl << notifyData);
+ }
+private:
+ Server& mServer;
+};
+
+class MOHParkServerLogger : public ExternalLogger
+{
+public:
+ virtual ~MOHParkServerLogger() {}
+ /** return true to also do default logging, false to supress default logging. */
+ virtual bool operator()(Log::Level level,
+ const Subsystem& subsystem,
+ const Data& appName,
+ const char* file,
+ int line,
+ const Data& message,
+ const Data& messageWithHeaders)
+ {
+ // Log any warnings/errors to the screen and all MOHParkServer logging messages
+ if(level <= Log::Warning || subsystem.getSubsystem() == AppSubsystem::MOHPARKSERVER.getSubsystem())
+ {
+ resipCout << messageWithHeaders << endl;
+ }
+ return true;
+ }
+};
+MOHParkServerLogger g_MOHParkServerLogger;
+
+Server::Server(ConfigParser& config) :
+ ConversationManager(false /* local audio? */, ConversationManager::sipXConversationMediaInterfaceMode),
+ mConfig(config),
+ mIsV6Avail(false),
+ mMyUserAgent(0),
+ mMOHManager(*this),
+ mParkManager(*this),
+ mWebAdmin(0),
+ mWebAdminThread(0)
+{
+ // Initialize loggers
+ initializeResipLogging(mConfig.mLogFileMaxBytes, mConfig.mLogLevel, mConfig.mLogFilename);
+ if(!mConfig.mSipXLogFilename.empty())
+ {
+ //enableConsoleOutput(TRUE); // Allow sipX console output
+ OsSysLog::initialize(0, "MOHParkServer");
+ OsSysLog::setOutputFile(0, mConfig.mSipXLogFilename.c_str()) ;
+ }
+
+ InfoLog( << "MOHParkServer settings:");
+ InfoLog( << " MOH URI = " << mConfig.mMOHUri);
+ InfoLog( << " MOH Registration Time = " << mConfig.mMOHRegistrationTime);
+ InfoLog( << " MOH Filename URL = " << mConfig.mMOHFilenameUrl);
+ InfoLog( << " Park URI = " << mConfig.mParkUri);
+ InfoLog( << " Park Registration Time = " << mConfig.mParkRegistrationTime);
+ InfoLog( << " Park MOH Filename URL = " << mConfig.mParkMOHFilenameUrl);
+ InfoLog( << " Park Orbit Range Start = " << mConfig.mParkOrbitRangeStart);
+ InfoLog( << " Park Number of Orbits = " << mConfig.mParkNumOrbits);
+ InfoLog( << " Park Orbit Registration Time = " << mConfig.mParkOrbitRegistrationTime);
+ InfoLog( << " Local IP Address = " << mConfig.mAddress);
+ InfoLog( << " Override DNS Servers = " << mConfig.mDnsServers);
+ InfoLog( << " UDP Port = " << mConfig.mUdpPort);
+ InfoLog( << " TCP Port = " << mConfig.mTcpPort);
+ InfoLog( << " TLS Port = " << mConfig.mTlsPort);
+ InfoLog( << " TLS Domain = " << mConfig.mTlsDomain);
+ InfoLog( << " Keepalives = " << (mConfig.mKeepAlives ? "enabled" : "disabled"));
+ InfoLog( << " Outbound Proxy = " << mConfig.mOutboundProxy);
+ InfoLog( << " Media Port Range Start = " << mConfig.mMediaPortRangeStart);
+ InfoLog( << " Media Port Range Size = " << mConfig.mMediaPortRangeSize);
+ InfoLog( << " Log Level = " << mConfig.mLogLevel);
+
+ resip::Data ;
+
+ if(!mConfig.mAddress.empty())
+ {
+ // If address is specified in config file, then just use this address only
+ Tuple myTuple(mConfig.mAddress, mConfig.mUdpPort, UDP);
+ if(myTuple.ipVersion() == V6)
+ {
+ mIsV6Avail = true;
+ }
+ }
+ else
+ {
+ // If address in config is empty - query network interface info
+ std::list<std::pair<Data,Data> > interfaces = DnsUtil::getInterfaces();
+ std::list<std::pair<Data,Data> >::iterator itInt = interfaces.begin();
+ for(;itInt != interfaces.end(); itInt++)
+ {
+ Tuple myTuple(itInt->second, mConfig.mUdpPort, UDP);
+ if(myTuple.ipVersion() == V6)
+ {
+ mIsV6Avail = true;
+ }
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Setup UserAgentMasterProfile
+ //////////////////////////////////////////////////////////////////////////////
+
+ SharedPtr<UserAgentMasterProfile> profile(new UserAgentMasterProfile);
+
+ // Add transports
+ try
+ {
+ if(mConfig.mUdpPort == (unsigned short)-1
+#ifdef USE_SSL
+ && mConfig.mTlsPort == (unsigned short)-1
+#endif
+ && mConfig.mTcpPort == (unsigned short)-1)
+ {
+ // Ensure there is at least one transport enabled - if all are disabled, then enable UDP on an OS selected port
+ mConfig.mUdpPort = 0;
+ }
+ if(mConfig.mUdpPort != (unsigned short)-1)
+ {
+ profile->addTransport(UDP, mConfig.mUdpPort, V4, mConfig.mAddress);
+ if(mIsV6Avail)
+ {
+ profile->addTransport(UDP, mConfig.mUdpPort, V6, mConfig.mAddress);
+ }
+ }
+ if(mConfig.mTcpPort != (unsigned short)-1)
+ {
+ profile->addTransport(TCP, mConfig.mTcpPort, V4, mConfig.mAddress);
+ if(mIsV6Avail)
+ {
+ profile->addTransport(TCP, mConfig.mTcpPort, V6, mConfig.mAddress);
+ }
+ }
+#ifdef USE_SSL
+ if(mConfig.mTlsPort != (unsigned short)-1)
+ {
+ profile->addTransport(TLS, mConfig.mTlsPort, V4, mConfig.mAddress, mConfig.mTlsDomain);
+ if(mIsV6Avail)
+ {
+ profile->addTransport(TLS, mConfig.mTlsPort, V6, mConfig.mAddress, mConfig.mTlsDomain);
+ }
+ }
+#endif
+ }
+ catch (BaseException& e)
+ {
+ std::cerr << "Cannot start a transport, likely a port is already in use" << endl;
+ InfoLog (<< "Caught: " << e);
+ exit(-1);
+ }
+
+ // DNS Servers
+ ParseBuffer pb(mConfig.mDnsServers);
+ Data dnsServer;
+ while(!mConfig.mDnsServers.empty() && !pb.eof())
+ {
+ pb.skipWhitespace();
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace, ";,"); // allow white space
+ pb.data(dnsServer, start);
+ if(DnsUtil::isIpV4Address(dnsServer))
+ {
+ InfoLog( << "Adding DNS Server: " << dnsServer);
+ profile->addAdditionalDnsServer(dnsServer);
+ }
+ else
+ {
+ ErrLog( << "Tried to add dns server, but invalid format: " << dnsServer);
+ }
+ if(!pb.eof())
+ {
+ pb.skipChar();
+ }
+ }
+
+ // Disable Statisitics Manager
+ profile->statisticsManagerEnabled() = false;
+
+ if(mConfig.mKeepAlives)
+ {
+ profile->setKeepAliveTimeForDatagram(30);
+ profile->setKeepAliveTimeForStream(180);
+ }
+
+ // Support Methods, etc.
+ profile->validateContentEnabled() = false;
+ profile->validateContentLanguageEnabled() = false;
+ profile->validateAcceptEnabled() = false;
+
+ profile->clearSupportedLanguages();
+ profile->addSupportedLanguage(Token("en"));
+
+ profile->clearSupportedMimeTypes();
+ profile->addSupportedMimeType(INVITE, Mime("application", "sdp"));
+ profile->addSupportedMimeType(INVITE, Mime("multipart", "mixed"));
+ profile->addSupportedMimeType(INVITE, Mime("multipart", "signed"));
+ profile->addSupportedMimeType(INVITE, Mime("multipart", "alternative"));
+ profile->addSupportedMimeType(OPTIONS,Mime("application", "sdp"));
+ profile->addSupportedMimeType(OPTIONS,Mime("multipart", "mixed"));
+ profile->addSupportedMimeType(OPTIONS, Mime("multipart", "signed"));
+ profile->addSupportedMimeType(OPTIONS, Mime("multipart", "alternative"));
+ profile->addSupportedMimeType(NOTIFY, Mime("message", "sipfrag"));
+
+ profile->clearSupportedMethods();
+ profile->addSupportedMethod(INVITE);
+ profile->addSupportedMethod(ACK);
+ profile->addSupportedMethod(CANCEL);
+ profile->addSupportedMethod(OPTIONS);
+ profile->addSupportedMethod(BYE);
+ profile->addSupportedMethod(REFER);
+ profile->addSupportedMethod(NOTIFY);
+ profile->addSupportedMethod(SUBSCRIBE);
+
+ profile->clearSupportedOptionTags();
+ profile->addSupportedOptionTag(Token(Symbols::Replaces));
+ profile->addSupportedOptionTag(Token(Symbols::Timer));
+ profile->addSupportedOptionTag(Token(Symbols::NoReferSub));
+ profile->addSupportedOptionTag(Token(Symbols::AnswerMode));
+ profile->addSupportedOptionTag(Token(Symbols::TargetDialog));
+
+ profile->setUacReliableProvisionalMode(MasterProfile::Never);
+
+ profile->clearSupportedSchemes();
+ profile->addSupportedScheme("sip");
+#ifdef USE_SSL
+ profile->addSupportedScheme("sips");
+#endif
+
+ // Have stack add Allow/Supported/Accept headers to INVITE dialog establishment messages
+ profile->clearAdvertisedCapabilities(); // Remove Profile Defaults, then add our preferences
+ profile->addAdvertisedCapability(Headers::Allow);
+ //profile->addAdvertisedCapability(Headers::AcceptEncoding); // This can be misleading - it might specify what is expected in response
+ profile->addAdvertisedCapability(Headers::AcceptLanguage);
+ profile->addAdvertisedCapability(Headers::Supported);
+ profile->setMethodsParamEnabled(true);
+
+ profile->setUserAgent("MOHParkServer");
+ profile->rtpPortRangeMin() = mConfig.mMediaPortRangeStart;
+ profile->rtpPortRangeMax() = mConfig.mMediaPortRangeStart + mConfig.mMediaPortRangeSize-1;
+
+ // Install Sdp Message Decorator
+ SharedPtr<MessageDecorator> outboundDecorator(new SdpMessageDecorator);
+ profile->setOutboundDecorator(outboundDecorator);
+
+ mUserAgentMasterProfile = profile;
+
+ // Create UserAgent
+ mMyUserAgent = new MyUserAgent(*this, profile, mConfig.mSocketFunc);
+
+ if(mConfig.mHttpPort != 0)
+ {
+ // Create WebAdmin
+ mWebAdmin = new WebAdmin(*this, true /* noWebChallenges */, Data::Empty, Data::Empty, mConfig.mHttpPort, resip::V4);
+ mWebAdminThread = new WebAdminThread(*mWebAdmin);
+ assert(mWebAdminThread && mWebAdmin);
+ mWebAdminThread->run();
+ }
+}
+
+Server::~Server()
+{
+ if(mWebAdminThread)
+ {
+ mWebAdminThread->shutdown();
+ mWebAdminThread->join();
+ delete mWebAdminThread;
+ mWebAdminThread = 0;
+ }
+ if(mWebAdmin)
+ {
+ delete mWebAdmin;
+ mWebAdmin = 0;
+ }
+
+ shutdown();
+ delete mMyUserAgent;
+}
+
+void
+Server::initializeResipLogging(unsigned int maxByteCount, const Data& level, const Data& resipFilename)
+{
+ // Initialize loggers
+ GenericLogImpl::MaxByteCount = maxByteCount;
+ Log::initialize("file", level.c_str(), "", resipFilename.c_str(), &g_MOHParkServerLogger);
+}
+
+void
+Server::startup()
+{
+ assert(mMyUserAgent);
+ mMyUserAgent->startup();
+ mMOHManager.startup();
+ mParkManager.startup();
+}
+
+void
+Server::process(int timeoutMs)
+{
+ assert(mMyUserAgent);
+ mMyUserAgent->process(timeoutMs);
+}
+
+void
+Server::shutdown()
+{
+ mMOHManager.shutdown(true /*shuttingDownServer*/);
+ mParkManager.shutdown(true /*shuttingDownServer*/);
+ assert(mMyUserAgent);
+ mMyUserAgent->shutdown();
+ OsSysLog::shutdown();
+}
+
+void
+Server::buildSessionCapabilities(resip::SdpContents& sessionCaps)
+{
+ unsigned int codecIds[] = { SdpCodec::SDP_CODEC_PCMU /* 0 - pcmu */,
+ SdpCodec::SDP_CODEC_PCMA /* 8 - pcma */,
+ SdpCodec::SDP_CODEC_SPEEX /* 96 - speex NB 8,000bps */,
+ SdpCodec::SDP_CODEC_SPEEX_15 /* 98 - speex NB 15,000bps */,
+ SdpCodec::SDP_CODEC_SPEEX_24 /* 99 - speex NB 24,600bps */,
+ SdpCodec::SDP_CODEC_L16_44100_MONO /* PCM 16 bit/sample 44100 samples/sec. */,
+ SdpCodec::SDP_CODEC_G726_16,
+ SdpCodec::SDP_CODEC_G726_24,
+ SdpCodec::SDP_CODEC_G726_32,
+ SdpCodec::SDP_CODEC_G726_40,
+ SdpCodec::SDP_CODEC_ILBC /* 108 - iLBC */,
+ SdpCodec::SDP_CODEC_ILBC_20MS /* 109 - Internet Low Bit Rate Codec, 20ms (RFC3951) */,
+ SdpCodec::SDP_CODEC_SPEEX_5 /* 97 - speex NB 5,950bps */,
+ SdpCodec::SDP_CODEC_GSM /* 3 - GSM */,
+ SdpCodec::SDP_CODEC_TONES /* 110 - telephone-event */};
+ unsigned int numCodecIds = sizeof(codecIds) / sizeof(codecIds[0]);
+ ConversationManager::buildSessionCapabilities(mConfig.mAddress, numCodecIds, codecIds, sessionCaps);
+}
+
+void
+Server::getActiveCallsInfo(std::list<ActiveCallInfo>& callInfos)
+{
+ callInfos.clear();
+ mMOHManager.getActiveCallsInfo(callInfos);
+ mParkManager.getActiveCallsInfo(callInfos);
+}
+
+void
+Server::onConversationDestroyed(ConversationHandle convHandle)
+{
+ InfoLog(<< "onConversationDestroyed: handle=" << convHandle);
+}
+
+void
+Server::onParticipantDestroyed(ParticipantHandle partHandle)
+{
+ InfoLog(<< "onParticipantDestroyed: handle=" << partHandle);
+ if(!mMOHManager.removeParticipant(partHandle))
+ {
+ mParkManager.removeParticipant(partHandle);
+ }
+}
+
+void
+Server::onDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up)
+{
+ InfoLog(<< "onDtmfEvent: handle=" << partHandle << " tone=" << dtmf << " dur=" << duration << " up=" << up);
+}
+
+void
+Server::onIncomingParticipant(ParticipantHandle partHandle, const SipMessage& msg, bool autoAnswer, ConversationProfile& conversationProfile)
+{
+ InfoLog(<< "onIncomingParticipant: handle=" << partHandle << " auto=" << autoAnswer << " msg=" << msg.brief());
+
+ if(mMOHManager.isMyProfile(conversationProfile))
+ {
+ mMOHManager.addParticipant(partHandle, msg.header(h_From).uri(), msg.header(h_From).uri());
+ }
+ else if(mParkManager.isMyProfile(conversationProfile))
+ {
+ mParkManager.incomingParticipant(partHandle, msg);
+ }
+ else
+ {
+ rejectParticipant(partHandle, 404);
+ }
+}
+
+void
+Server::onRequestOutgoingParticipant(ParticipantHandle partHandle, const SipMessage& msg, ConversationProfile& conversationProfile)
+{
+ InfoLog(<< "onRequestOutgoingParticipant: handle=" << partHandle << " msg=" << msg.brief());
+ if(mMOHManager.isMyProfile(conversationProfile))
+ {
+ mMOHManager.addParticipant(partHandle, msg.header(h_ReferTo).uri().getAorAsUri(), msg.header(h_From).uri());
+ }
+ else if(mParkManager.isMyProfile(conversationProfile))
+ {
+ mParkManager.parkParticipant(partHandle, msg);
+ }
+ else
+ {
+ rejectParticipant(partHandle, 404);
+ }
+}
+
+void
+Server::onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode)
+{
+ InfoLog(<< "onParticipantTerminated: handle=" << partHandle);
+}
+
+void
+Server::onParticipantProceeding(ParticipantHandle partHandle, const SipMessage& msg)
+{
+ InfoLog(<< "onParticipantProceeding: handle=" << partHandle << " msg=" << msg.brief());
+}
+
+void
+Server::onRelatedConversation(ConversationHandle relatedConvHandle, ParticipantHandle relatedPartHandle,
+ ConversationHandle origConvHandle, ParticipantHandle origPartHandle)
+{
+ InfoLog(<< "onRelatedConversation: relatedConvHandle=" << relatedConvHandle << " relatedPartHandle=" << relatedPartHandle
+ << " origConvHandle=" << origConvHandle << " origPartHandle=" << origPartHandle);
+}
+
+void
+Server::onParticipantAlerting(ParticipantHandle partHandle, const SipMessage& msg)
+{
+ InfoLog(<< "onParticipantAlerting: handle=" << partHandle << " msg=" << msg.brief());
+}
+
+void
+Server::onParticipantConnected(ParticipantHandle partHandle, const SipMessage& msg)
+{
+ InfoLog(<< "onParticipantConnected: handle=" << partHandle << " msg=" << msg.brief());
+}
+
+void
+Server::onParticipantRedirectSuccess(ParticipantHandle partHandle)
+{
+ InfoLog(<< "onParticipantRedirectSuccess: handle=" << partHandle);
+ destroyParticipant(partHandle); // Transfer is successful - end participant
+}
+
+void
+Server::onParticipantRedirectFailure(ParticipantHandle partHandle, unsigned int statusCode)
+{
+ InfoLog(<< "onParticipantRedirectFailure: handle=" << partHandle << " statusCode=" << statusCode);
+}
+
+void
+Server::onMaxParkTimeout(recon::ParticipantHandle participantHandle)
+{
+ // Pass to ParkManager to see if participant is still around
+ mParkManager.onMaxParkTimeout(participantHandle);
+}
+
+}
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/Server.hxx b/resip/recon/MOHParkServer/Server.hxx
new file mode 100644
index 0000000..10c5a95
--- /dev/null
+++ b/resip/recon/MOHParkServer/Server.hxx
@@ -0,0 +1,136 @@
+#if !defined(Server_hxx)
+#define Server_hxx
+
+#include "ConfigParser.hxx"
+#include "MOHManager.hxx"
+#include "ParkManager.hxx"
+#include "ActiveCallInfo.hxx"
+#include "../UserAgent.hxx"
+#include "../HandleTypes.hxx"
+
+#ifdef WIN32
+ #define sleepMs(t) Sleep(t)
+#else
+ #define sleepMs(t) usleep(t*1000)
+#endif
+
+#define MAXPARKTIMEOUT 1
+
+namespace mohparkserver
+{
+class WebAdminThread;
+class WebAdmin;
+
+class Server : public recon::ConversationManager
+{
+public:
+ Server(ConfigParser& config);
+ virtual ~Server();
+
+ // Called in contructor, but can be used to modify logging at runtime
+ void initializeResipLogging(unsigned int maxByteCount, const resip::Data& level, const resip::Data& resipFilename);
+
+ /**
+ Starts the recon thread(s).
+
+ @note This should be called before calling process() in a loop
+ */
+ void startup();
+
+ /**
+ This should be called in a loop to give process cycles to the server.
+
+ @param timeoutMs Will return after timeoutMs if nothing to do.
+ Application can do some work, but should call
+ process again ASAP.
+ */
+ void process(int timeoutMs); // call this in a loop
+
+ /**
+ Used to initiate a shutdown of the server. This function blocks
+ until the shutdown is complete.
+
+ @note There should not be an active process request when this
+ is called.
+ */
+ void shutdown();
+
+ recon::UserAgent* getMyUserAgent() { return mMyUserAgent; }
+ MOHManager& getMOHManager() { return mMOHManager; }
+ ParkManager& getParkManager() { return mParkManager; }
+ void getActiveCallsInfo(CallInfoList& callInfos);
+
+ // Timer handler
+ virtual void onMaxParkTimeout(recon::ParticipantHandle participantHandle);
+
+ // Configuration Container
+ ConfigParser& mConfig;
+
+protected:
+ // Conversation Manager Handlers
+ virtual void onConversationDestroyed(recon::ConversationHandle convHandle);
+ virtual void onParticipantDestroyed(recon::ParticipantHandle partHandle);
+ virtual void onDtmfEvent(recon::ParticipantHandle partHandle, int dtmf, int duration, bool up);
+ virtual void onIncomingParticipant(recon::ParticipantHandle partHandle, const resip::SipMessage& msg, bool autoAnswer, recon::ConversationProfile& conversationProfile);
+ virtual void onRequestOutgoingParticipant(recon::ParticipantHandle partHandle, const resip::SipMessage& msg, recon::ConversationProfile& conversationProfile);
+ virtual void onParticipantTerminated(recon::ParticipantHandle partHandle, unsigned int statusCode);
+ virtual void onParticipantProceeding(recon::ParticipantHandle partHandle, const resip::SipMessage& msg);
+ virtual void onRelatedConversation(recon::ConversationHandle relatedConvHandle, recon::ParticipantHandle relatedPartHandle,
+ recon::ConversationHandle origConvHandle, recon::ParticipantHandle origPartHandle);
+ virtual void onParticipantAlerting(recon::ParticipantHandle partHandle, const resip::SipMessage& msg);
+ virtual void onParticipantConnected(recon::ParticipantHandle partHandle, const resip::SipMessage& msg);
+ virtual void onParticipantRedirectSuccess(recon::ParticipantHandle partHandle);
+ virtual void onParticipantRedirectFailure(recon::ParticipantHandle partHandle, unsigned int statusCode);
+
+private:
+ friend class MOHManager;
+ friend class ParkManager;
+ void buildSessionCapabilities(resip::SdpContents& sessionCaps);
+
+ bool mIsV6Avail;
+ recon::UserAgent* mMyUserAgent;
+ resip::SharedPtr<recon::UserAgentMasterProfile> mUserAgentMasterProfile;
+ MOHManager mMOHManager;
+ ParkManager mParkManager;
+ WebAdmin* mWebAdmin;
+ WebAdminThread* mWebAdminThread;
+};
+
+}
+
+#endif
+
+/* ====================================================================
+
+ Copyright (c) 2010, SIP Spectrum, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of SIP Spectrum nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
+
diff --git a/resip/recon/MOHParkServer/WebAdmin.cxx b/resip/recon/MOHParkServer/WebAdmin.cxx
new file mode 100644
index 0000000..ded1f5a
--- /dev/null
+++ b/resip/recon/MOHParkServer/WebAdmin.cxx
@@ -0,0 +1,305 @@
+#include <cassert>
+#include <time.h>
+
+#include <resip/stack/Symbols.hxx>
+#include <resip/stack/Tuple.hxx>
+#include <rutil/Data.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/MD5Stream.hxx>
+#include <rutil/ParseBuffer.hxx>
+#include <rutil/Socket.hxx>
+#include <rutil/Timer.hxx>
+#include <rutil/TransportType.hxx>
+
+#include "AppSubsystem.hxx"
+#include "HttpBase.hxx"
+#include "HttpConnection.hxx"
+#include "WebAdmin.hxx"
+#include "ActiveCallInfo.hxx"
+#include "Server.hxx"
+
+using namespace resip;
+using namespace mohparkserver;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+
+WebAdmin::RemoveKey::RemoveKey(const Data &key1, const Data &key2) : mKey1(key1), mKey2(key2)
+{
+};
+
+bool
+WebAdmin::RemoveKey::operator<(const RemoveKey& rhs) const
+{
+ if(mKey1 < rhs.mKey1)
+ {
+ return true;
+ }
+ else if(mKey1 == rhs.mKey1 && mKey2 < rhs.mKey2)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+WebAdmin::WebAdmin( Server& server,
+ bool noChal,
+ const Data& realm, // this realm is used for http challenges
+ const Data& adminPassword,
+ int port,
+ IpVersion version ):
+ HttpBase( port, version, realm ),
+ mServer(server),
+ mNoWebChallenges( noChal )
+{
+}
+
+
+void
+WebAdmin::buildPage( const Data& uri,
+ int pageNumber,
+ const resip::Data& pUser,
+ const resip::Data& pPassword )
+{
+ ParseBuffer pb(uri);
+
+ DebugLog (<< "Parsing URL" << uri );
+
+ const char* anchor = pb.skipChar('/');
+ pb.skipToChar('?');
+ Data pageName;
+ pb.data(pageName,anchor);
+
+ DebugLog (<< " got page name: " << pageName );
+
+ // if this is not a valid page, redirect it
+ if (pageName != Data("activecalls.html"))
+ {
+ setPage( resip::Data::Empty, pageNumber, 301 );
+ return;
+ }
+
+ // parse any URI tags from form entry
+ mRemoveSet.clear();
+ mHttpParams.clear();
+
+ if (!pb.eof())
+ {
+ pb.skipChar('?');
+
+ while ( !pb.eof() )
+ {
+ const char* anchor1 = pb.position();
+ pb.skipToChar('=');
+ Data key;
+ pb.data(key,anchor1);
+
+ const char* anchor2 = pb.skipChar('=');
+ pb.skipToChar('&');
+ Data value;
+ pb.data(value,anchor2);
+
+ if ( !pb.eof() )
+ {
+ pb.skipChar('&');
+ }
+
+ if ( key.prefix("remove.") ) // special case of parameters to delete one or more records
+ {
+ Data tmp = key.substr(7); // the ID is everything after the dot
+ if (!tmp.empty())
+ {
+ DebugLog (<< " remove key=" << tmp.urlDecoded());
+ mRemoveSet.insert(RemoveKey(tmp.urlDecoded(),value.urlDecoded())); // add to the set of records to remove
+ }
+ }
+ else if ( !key.empty() && !value.empty() ) // make sure both exist
+ {
+ DebugLog (<< " key=" << key << " value=" << value << " & unencoded form: " << value.urlDecoded() );
+ mHttpParams[key] = value.urlDecoded(); // add other parameters to the Map
+ }
+ }
+
+ }
+
+ Data page;
+ DataStream s(page);
+ buildPageOutlinePre(s);
+
+ if ( pageName == Data("activecalls.html"))
+ {
+ buildActiveCallsSubPage(s);
+ }
+ else
+ {
+ assert(false);
+ }
+ buildPageOutlinePost(s);
+ s.flush();
+
+ assert( !page.empty() );
+ setPage( page, pageNumber,200 );
+}
+
+
+void
+WebAdmin::buildActiveCallsSubPage(DataStream& s)
+{
+ if (!mRemoveSet.empty())
+ {
+ int j = 0;
+ for (set<RemoveKey>::iterator i = mRemoveSet.begin(); i != mRemoveSet.end(); ++i)
+ {
+ Uri aor(i->mKey1);
+ ContactInstanceRecord rec;
+ size_t bar1 = i->mKey2.find("|");
+ size_t bar2 = i->mKey2.find("|",bar1+1);
+
+ if(bar1==Data::npos || bar2 == Data::npos)
+ {
+ InfoLog(<< "Registration removal key was malformed: " << i->mKey2);
+ continue;
+ }
+
+ try
+ {
+ resip::Data rawNameAddr = i->mKey2.substr(0,bar1).urlDecoded();
+ rec.mContact = NameAddr(rawNameAddr);
+ rec.mInstance = i->mKey2.substr(bar1+1,bar2-bar1-1).urlDecoded();
+ rec.mRegId = i->mKey2.substr(bar2+1,Data::npos).convertInt();
+ //mRegDb.lockRecord(aor); // TODO
+ //mRegDb.removeContact(aor, rec);
+ //mRegDb.unlockRecord(aor);
+ ++j;
+ }
+ catch(resip::ParseBuffer::Exception& e)
+ {
+ InfoLog(<< "Registration removal key was malformed: " << e <<
+ " Key was: " << i->mKey2);
+ }
+
+ }
+ s << "<p><em>Removed:</em> " << j << " records</p>" << endl;
+ }
+
+ s <<
+ "<form id=\"showReg\" method=\"get\" action=\"registrations.html\" name=\"showReg\" enctype=\"application/x-www-form-urlencoded\">" << endl <<
+ //"<button name=\"removeAllReg\" value=\"\" type=\"button\">Remove All</button>" << endl <<
+ //"<hr/>" << endl <<
+
+ "<table border=\"1\" cellspacing=\"2\" cellpadding=\"0\" align=\"left\">" << endl <<
+
+ "<tr>" << endl <<
+ " <td>Held URI</td>" << endl <<
+ " <td>Invoking URI</td>" << endl <<
+ " <td>Hold Type</td>" << endl <<
+ " <td>Participant ID</td>" << endl <<
+ " <td>Conversation ID</td>" << endl <<
+ //" <td><input type=\"submit\" value=\"Remove\"/></td>" << endl << // TODO
+ "</tr>" << endl;
+
+ CallInfoList callInfos;
+ mServer.getActiveCallsInfo(callInfos);
+ for (CallInfoList::iterator it = callInfos.begin(); it != callInfos.end(); ++it )
+ {
+ s << "<tr>" << endl
+ << " <td>" << it->mHeldUri << "</td>" << endl
+ << " <td>" << it->mInvokingUri << "</td>" << endl
+ << " <td>" << it->mHoldType << "</td>" << endl
+ << " <td>" << it->mParticipantId << "</td>" << endl
+ << " <td>" << it->mConversationId << "</td>" << endl
+ //<< " <td><input type=\"checkbox\" name=\"remove." << it->mHeldUri << "\" value=\"" << it->mParticipantId << "\"/></td>" << endl // TODO
+ << "</tr>" << endl;
+ }
+
+ s << "</table>" << endl <<
+ "</form>" << endl;
+}
+
+void
+WebAdmin::buildPageOutlinePre(DataStream& s)
+{
+s << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+s << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
+s << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
+s << " <head>\n";
+s << " <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\" />\n";
+s << " <title>MOHParkServer Active Call List</title>\n";
+s << " </head>\n";
+s << " <style>\n";
+s << "body { bgcolor: white; font-size: 90%; font-family: Arial, Helvetica, sans-serif }\n";
+s << "h1 { font-size: 200%; font-weight: bold }\n";
+s << "h2 { font-size: 100%; font-weight: bold; text-transform: uppercase }\n";
+s << "h3 { font-size: 100%; font-weight: normal }\n";
+s << "h4 { font-size: 100%; font-style: oblique; font-weight: normal } \n";
+s << "hr { line-height: 2px; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; height: 10px }\n";
+s << "div.title { color: white; background-color: #395af6; padding-top: 10px; padding-bottom: 10px; padding-left: 10px }\n";
+s << "div.title h1 { text-transform: uppercase; margin-top: 0; margin-bottom: 0 } \n";
+s << "div.menu { color: black; background-color: #ff8d09; padding: 0 10px 10px; \n";
+s << " width: 9em; float: left; clear: none; overflow: hidden }\n";
+s << "div.menu p { font-weight: bold; text-transform: uppercase; list-style-type: none; \n";
+s << " margin-top: 0; margin-bottom: 0; margin-left: 10px }\n";
+s << "div.menu h2 { margin-top: 10px; margin-bottom: 0 ; text-transform: uppercase; }\n";
+s << "div.main { color: black; background-color: #dae1ed; margin-left: 11em }\n";
+s << "div.space { font-size: 5px; height: 10px }\n";
+s << " </style>\n";
+s << " <body>\n";
+}
+
+
+void
+WebAdmin::buildPageOutlinePost(DataStream& s)
+{
+s << " </body>\n";
+s << "</html>\n";
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ */
diff --git a/resip/recon/MOHParkServer/WebAdmin.hxx b/resip/recon/MOHParkServer/WebAdmin.hxx
new file mode 100644
index 0000000..3f51255
--- /dev/null
+++ b/resip/recon/MOHParkServer/WebAdmin.hxx
@@ -0,0 +1,120 @@
+#if !defined(MOHPARKSERVER_WEBADMIN_HXX)
+#define MOHPARKSERVER_WEBADMIN_HXX
+
+#include <rutil/Data.hxx>
+#include <rutil/TransportType.hxx>
+#include <resip/stack/Tuple.hxx>
+
+#include "HttpBase.hxx"
+
+#include <map>
+
+namespace resip
+{
+class DataStream;
+}
+
+
+namespace mohparkserver
+{
+
+class Server;
+typedef std::map<resip::Data, resip::Data> Dictionary;
+
+class WebAdmin: public HttpBase
+{
+ public:
+ WebAdmin( Server& server,
+ bool noWebChallenges,
+ const resip::Data& realm,
+ const resip::Data& adminPassword,
+ int port=5082,
+ resip::IpVersion version=resip::V4 );
+
+ protected:
+ virtual void buildPage( const resip::Data& uri,
+ int pageNumber,
+ const resip::Data& user,
+ const resip::Data& password);
+
+ private:
+ resip::Data buildDefaultPage();
+ resip::Data buildUserPage();
+
+ void buildPageOutlinePre(resip::DataStream& s);
+ void buildPageOutlinePost(resip::DataStream& s);
+
+ void buildActiveCallsSubPage(resip::DataStream& s);
+
+ bool mNoWebChallenges;
+
+ Dictionary mHttpParams;
+
+ // list of the keys of records that should be deleted
+ class RemoveKey
+ {
+ public:
+ RemoveKey(const resip::Data &key1, const resip::Data &key2);
+ bool operator<(const RemoveKey& rhs) const;
+ resip::Data mKey1;
+ resip::Data mKey2;
+ };
+ std::set<RemoveKey> mRemoveSet;
+ Server& mServer;
+};
+
+
+
+}
+
+#endif
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/WebAdminThread.cxx b/resip/recon/MOHParkServer/WebAdminThread.cxx
new file mode 100644
index 0000000..ec8a889
--- /dev/null
+++ b/resip/recon/MOHParkServer/WebAdminThread.cxx
@@ -0,0 +1,92 @@
+
+#include <rutil/Socket.hxx>
+#include <rutil/Logger.hxx>
+
+#include "AppSubsystem.hxx"
+#include "WebAdmin.hxx"
+#include "WebAdminThread.hxx"
+
+#define RESIPROCATE_SUBSYSTEM AppSubsystem::MOHPARKSERVER
+
+using namespace resip;
+using namespace mohparkserver;
+using namespace std;
+
+
+WebAdminThread::WebAdminThread(WebAdmin& web)
+ : mWeb(web)
+{
+}
+
+
+void
+WebAdminThread::thread()
+{
+ while (!isShutdown())
+ {
+ try
+ {
+ FdSet fdset;
+
+ mWeb.buildFdSet(fdset);
+ fdset.selectMilliSeconds( 2*1000 );
+
+ mWeb.process(fdset);
+ }
+ catch (...)
+ {
+ ErrLog (<< "Unhandled exception: " );
+ }
+ }
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/WebAdminThread.hxx b/resip/recon/MOHParkServer/WebAdminThread.hxx
new file mode 100644
index 0000000..fd8de52
--- /dev/null
+++ b/resip/recon/MOHParkServer/WebAdminThread.hxx
@@ -0,0 +1,80 @@
+#ifndef MOHPARK_WebAdminThread__hxx
+#define MOHPARK_WebAdminThread__hxx
+
+#include <rutil/ThreadIf.hxx>
+#include <rutil/Socket.hxx>
+
+namespace mohparkserver
+{
+
+class WebAdmin;
+
+class WebAdminThread : public resip::ThreadIf
+{
+ public:
+ WebAdminThread(WebAdmin& web);
+
+ virtual void thread();
+
+ protected:
+ // virtual void buildFdSet(FdSet& fdset);
+ // virtual unsigned int getTimeTillNextProcessMS() const;
+
+ private:
+ WebAdmin& mWeb;
+};
+
+}
+
+#endif
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ * and "Vovida Open Communication Application Library (VOCAL)" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact vocal at vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ * may "VOCAL" appear in their name, without prior written
+ * permission of Vovida Networks, Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc. For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
diff --git a/resip/recon/MOHParkServer/ca.pem b/resip/recon/MOHParkServer/ca.pem
new file mode 100644
index 0000000..9629b43
--- /dev/null
+++ b/resip/recon/MOHParkServer/ca.pem
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIB7TCCAVYCCQCxKhAUH1ygCDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJB
+VTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8w
+HhcNMDUxMTAyMTk0ODU1WhcNMTUxMTAyMTk0ODU1WjA7MQswCQYDVQQGEwJBVTEM
+MAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8wgZ8w
+DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMkNbM2RjFdm48Wy1nBA3+exfJL5fR6H
+guRFu/7MKf6pQZGRqhzxIWYRoYQDx16BggHwqFVVls5hgoQF0fUqoHfE8MLGwr6m
+T6rIYBrIAGnH8eMhfwMNy4I0emkoWI+grEXlw54IUSijh8LokLWorElyGuPmxhn3
+IgZkgGe8dCQTAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAdpHw+r3X4NwzKn9nQs3h
+mQK2WeH6DVQ1r7fWqEq1Lq10qBdobbjDRE9jpezWdGMThbYtle6/8wHUJeq189PR
+XwZWyRvnfcI+pqX832yNRh24Ujwuv3wlx3JOVByybCoJc05N1THaHo0Q7j//8HsX
+VS/RFHuq3muy47cV9gbsCIw=
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,EC6C715D9BC7AFF2
+
+bBOh4F/Ouq2cpaWYUqCvpVVTAkptsHCkUFZpjqruGMw1pQ6BY2eBzuHHNgOV+8BI
+4Md8LcvD9oRmkigXp10I6ELkPpvTqK5S/9iJBlR/XgYjuj2PkdLiT2t4dWrJP9Rq
+NdjybhKV0qqB/WiBKoSI/n0mYDxmrrHjmPAXi3BnivyQiUry42hs+Izxlkyt///D
+bDzkW/LqiMDwxOu9mCsxdN/iiFgKsPQBxvLbdG3p1GyERrnB85DeewYGF9fzp1Nz
+CXWQiPqEkf3arqgKBIjK+TDfmDluL7+nOyhSp0j9Rh1zba8ffmYZNXXLt0ludVdm
+8zbwqjbX6u4BZ+pSpnURFBp9um0TlxhpJ5F3q5ZyUa7l4tTlw37V8UkFP8KmBbuc
+PDnjbdlD5BtAbR/b/dDSAhU2y7aftcTsZCu22UOLQqWOm6jMk943ZfmG93rCeKNL
+qa4OPXsICSNqKivF0Ovyw5U7ODsFj0UTD8/VY+JWLz/bmJdpsBCNlkfQHGtTahfq
+QY4mG0K+cWmUiGvcWcU1pjI4e551dR05wNDmyfJMHHVzn2VnCrxKSKGEtJOMcyzi
+E42zQkGlYWVJyqDFHfxCe+1GJLJvW2oYGUUY/++XDzvxITT6Lq3wb1MGisoaC1Q7
+523SXpzVIU+FLlWxewrSnZOyTe13lgNK4OVnuRqz/LQExjfwUXtgqQkRp6A8jTmC
+6LWEaXQ6kC7QmwX0VQgtNi74ZMMrBsaxywaE+3oEibeJiXbVJCHDo3RufA9AJnpF
+HUmTFTnoBr4f8AUxN0Eyb5Yg16pzOBI5o4EzjKzJ4D0=
+-----END RSA PRIVATE KEY-----
diff --git a/resip/recon/MOHParkServer/doc/MOHParkServer_User_Documentation.doc b/resip/recon/MOHParkServer/doc/MOHParkServer_User_Documentation.doc
new file mode 100644
index 0000000..a092e08
Binary files /dev/null and b/resip/recon/MOHParkServer/doc/MOHParkServer_User_Documentation.doc differ
diff --git a/resip/recon/MOHParkServer/doc/MOHParkServer_User_Documentation.pdf b/resip/recon/MOHParkServer/doc/MOHParkServer_User_Documentation.pdf
new file mode 100644
index 0000000..6d80f23
Binary files /dev/null and b/resip/recon/MOHParkServer/doc/MOHParkServer_User_Documentation.pdf differ
diff --git a/resip/recon/MOHParkServer/music.wav b/resip/recon/MOHParkServer/music.wav
new file mode 100644
index 0000000..56ae56b
Binary files /dev/null and b/resip/recon/MOHParkServer/music.wav differ
diff --git a/resip/recon/Makefile.am b/resip/recon/Makefile.am
index bde209f..6d0c5d6 100644
--- a/resip/recon/Makefile.am
+++ b/resip/recon/Makefile.am
@@ -4,9 +4,11 @@ EXTRA_DIST = readme.txt
EXTRA_DIST += *.vcproj
EXTRA_DIST += *.sln
EXTRA_DIST += recon_10_0.vcxproj recon_10_0.vcxproj.filters
+EXTRA_DIST += doc
SUBDIRS = .
-#SUBDIRS += test
+SUBDIRS += test
+SUBDIRS += MOHParkServer
#AM_CXXFLAGS = -DUSE_ARES
diff --git a/resip/recon/Makefile.in b/resip/recon/Makefile.in
index d90a6b5..c73d477 100644
--- a/resip/recon/Makefile.in
+++ b/resip/recon/Makefile.in
@@ -278,9 +278,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = readme.txt *.vcproj *.sln recon_10_0.vcxproj \
- recon_10_0.vcxproj.filters
-SUBDIRS = .
-#SUBDIRS += test
+ recon_10_0.vcxproj.filters doc
+SUBDIRS = . test MOHParkServer
#AM_CXXFLAGS = -DUSE_ARES
lib_LTLIBRARIES = librecon.la
diff --git a/resip/recon/doc/ConvManSequence.pdf b/resip/recon/doc/ConvManSequence.pdf
new file mode 100644
index 0000000..5033961
Binary files /dev/null and b/resip/recon/doc/ConvManSequence.pdf differ
diff --git a/resip/recon/doc/ConvManSequence.png b/resip/recon/doc/ConvManSequence.png
new file mode 100644
index 0000000..0837213
Binary files /dev/null and b/resip/recon/doc/ConvManSequence.png differ
diff --git a/resip/recon/doc/ConvManSequence.vsd b/resip/recon/doc/ConvManSequence.vsd
new file mode 100644
index 0000000..8d64538
Binary files /dev/null and b/resip/recon/doc/ConvManSequence.vsd differ
diff --git a/resip/recon/doc/Conversation_Manager_API.doc b/resip/recon/doc/Conversation_Manager_API.doc
new file mode 100644
index 0000000..f99c901
Binary files /dev/null and b/resip/recon/doc/Conversation_Manager_API.doc differ
diff --git a/resip/recon/test/Makefile.am b/resip/recon/test/Makefile.am
new file mode 100644
index 0000000..57dd8d6
--- /dev/null
+++ b/resip/recon/test/Makefile.am
@@ -0,0 +1,58 @@
+
+EXTRA_DIST = ca.pem
+EXTRA_DIST += *.vcxproj *.vcxproj.filters
+EXTRA_DIST += *.vcproj
+EXTRA_DIST += testua_readme.txt
+
+LDADD = ../librecon.la
+LDADD += $(LIBSSL_LIBADD) -lpthread
+
+TESTS = \
+ testUA \
+ sdpTests \
+ unitTests
+
+check_PROGRAMS = \
+ testUA \
+ sdpTests \
+ unitTests
+
+testUA_SOURCES = testUA.cxx
+sdpTests_SOURCES = sdpTests.cxx
+unitTests_SOURCES = unitTests.cxx
+
+
+
+####################################################################
+#
+# Copyright (c) 2007-2008, Plantronics, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of Plantronics nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+####################################################################
diff --git a/resip/recon/test/Makefile.in b/resip/recon/test/Makefile.in
new file mode 100644
index 0000000..b393bfe
--- /dev/null
+++ b/resip/recon/test/Makefile.in
@@ -0,0 +1,637 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS = testUA$(EXEEXT) sdpTests$(EXEEXT) unitTests$(EXEEXT)
+check_PROGRAMS = testUA$(EXEEXT) sdpTests$(EXEEXT) unitTests$(EXEEXT)
+subdir = resip/recon/test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_epoll.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am_sdpTests_OBJECTS = sdpTests.$(OBJEXT)
+sdpTests_OBJECTS = $(am_sdpTests_OBJECTS)
+sdpTests_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+sdpTests_DEPENDENCIES = ../librecon.la $(am__DEPENDENCIES_1)
+am_testUA_OBJECTS = testUA.$(OBJEXT)
+testUA_OBJECTS = $(am_testUA_OBJECTS)
+testUA_LDADD = $(LDADD)
+testUA_DEPENDENCIES = ../librecon.la $(am__DEPENDENCIES_1)
+am_unitTests_OBJECTS = unitTests.$(OBJEXT)
+unitTests_OBJECTS = $(am_unitTests_OBJECTS)
+unitTests_LDADD = $(LDADD)
+unitTests_DEPENDENCIES = ../librecon.la $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(sdpTests_SOURCES) $(testUA_SOURCES) $(unitTests_SOURCES)
+DIST_SOURCES = $(sdpTests_SOURCES) $(testUA_SOURCES) \
+ $(unitTests_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GPERF = @GPERF@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBARES_LIBADD = @LIBARES_LIBADD@
+LIBGEOIP_LIBADD = @LIBGEOIP_LIBADD@
+LIBMYSQL_LIBADD = @LIBMYSQL_LIBADD@
+LIBOBJS = @LIBOBJS@
+LIBPOPT_LIBADD = @LIBPOPT_LIBADD@
+LIBRADIUS_LIBADD = @LIBRADIUS_LIBADD@
+LIBS = @LIBS@
+LIBSSL_LIBADD = @LIBSSL_LIBADD@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_RELEASE = @LIBTOOL_VERSION_RELEASE@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SO_RELEASE = @SO_RELEASE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = ca.pem *.vcxproj *.vcxproj.filters *.vcproj \
+ testua_readme.txt
+LDADD = ../librecon.la $(LIBSSL_LIBADD) -lpthread
+testUA_SOURCES = testUA.cxx
+sdpTests_SOURCES = sdpTests.cxx
+unitTests_SOURCES = unitTests.cxx
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu resip/recon/test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu resip/recon/test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+sdpTests$(EXEEXT): $(sdpTests_OBJECTS) $(sdpTests_DEPENDENCIES)
+ @rm -f sdpTests$(EXEEXT)
+ $(CXXLINK) $(sdpTests_OBJECTS) $(sdpTests_LDADD) $(LIBS)
+testUA$(EXEEXT): $(testUA_OBJECTS) $(testUA_DEPENDENCIES)
+ @rm -f testUA$(EXEEXT)
+ $(CXXLINK) $(testUA_OBJECTS) $(testUA_LDADD) $(LIBS)
+unitTests$(EXEEXT): $(unitTests_OBJECTS) $(unitTests_DEPENDENCIES)
+ @rm -f unitTests$(EXEEXT)
+ $(CXXLINK) $(unitTests_OBJECTS) $(unitTests_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdpTests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testUA.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/unitTests.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+####################################################################
+#
+# Copyright (c) 2007-2008, Plantronics, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of Plantronics nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+####################################################################
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/resip/recon/test/ca.pem b/resip/recon/test/ca.pem
new file mode 100644
index 0000000..9629b43
--- /dev/null
+++ b/resip/recon/test/ca.pem
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIB7TCCAVYCCQCxKhAUH1ygCDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJB
+VTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8w
+HhcNMDUxMTAyMTk0ODU1WhcNMTUxMTAyMTk0ODU1WjA7MQswCQYDVQQGEwJBVTEM
+MAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8wgZ8w
+DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMkNbM2RjFdm48Wy1nBA3+exfJL5fR6H
+guRFu/7MKf6pQZGRqhzxIWYRoYQDx16BggHwqFVVls5hgoQF0fUqoHfE8MLGwr6m
+T6rIYBrIAGnH8eMhfwMNy4I0emkoWI+grEXlw54IUSijh8LokLWorElyGuPmxhn3
+IgZkgGe8dCQTAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAdpHw+r3X4NwzKn9nQs3h
+mQK2WeH6DVQ1r7fWqEq1Lq10qBdobbjDRE9jpezWdGMThbYtle6/8wHUJeq189PR
+XwZWyRvnfcI+pqX832yNRh24Ujwuv3wlx3JOVByybCoJc05N1THaHo0Q7j//8HsX
+VS/RFHuq3muy47cV9gbsCIw=
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,EC6C715D9BC7AFF2
+
+bBOh4F/Ouq2cpaWYUqCvpVVTAkptsHCkUFZpjqruGMw1pQ6BY2eBzuHHNgOV+8BI
+4Md8LcvD9oRmkigXp10I6ELkPpvTqK5S/9iJBlR/XgYjuj2PkdLiT2t4dWrJP9Rq
+NdjybhKV0qqB/WiBKoSI/n0mYDxmrrHjmPAXi3BnivyQiUry42hs+Izxlkyt///D
+bDzkW/LqiMDwxOu9mCsxdN/iiFgKsPQBxvLbdG3p1GyERrnB85DeewYGF9fzp1Nz
+CXWQiPqEkf3arqgKBIjK+TDfmDluL7+nOyhSp0j9Rh1zba8ffmYZNXXLt0ludVdm
+8zbwqjbX6u4BZ+pSpnURFBp9um0TlxhpJ5F3q5ZyUa7l4tTlw37V8UkFP8KmBbuc
+PDnjbdlD5BtAbR/b/dDSAhU2y7aftcTsZCu22UOLQqWOm6jMk943ZfmG93rCeKNL
+qa4OPXsICSNqKivF0Ovyw5U7ODsFj0UTD8/VY+JWLz/bmJdpsBCNlkfQHGtTahfq
+QY4mG0K+cWmUiGvcWcU1pjI4e551dR05wNDmyfJMHHVzn2VnCrxKSKGEtJOMcyzi
+E42zQkGlYWVJyqDFHfxCe+1GJLJvW2oYGUUY/++XDzvxITT6Lq3wb1MGisoaC1Q7
+523SXpzVIU+FLlWxewrSnZOyTe13lgNK4OVnuRqz/LQExjfwUXtgqQkRp6A8jTmC
+6LWEaXQ6kC7QmwX0VQgtNi74ZMMrBsaxywaE+3oEibeJiXbVJCHDo3RufA9AJnpF
+HUmTFTnoBr4f8AUxN0Eyb5Yg16pzOBI5o4EzjKzJ4D0=
+-----END RSA PRIVATE KEY-----
diff --git a/resip/recon/test/sdpTests.cxx b/resip/recon/test/sdpTests.cxx
new file mode 100644
index 0000000..b8d5fa4
--- /dev/null
+++ b/resip/recon/test/sdpTests.cxx
@@ -0,0 +1,594 @@
+#include <iostream>
+
+#include <sdp/SdpCodec.hxx>
+#include <sdp/Sdp.hxx>
+#include <sdp/SdpMediaLine.hxx>
+#include <sdp/SdpHelperResip.hxx>
+
+#include <rutil/ParseBuffer.hxx>
+#include <resip/stack/Symbols.hxx>
+#include <resip/stack/SdpContents.hxx>
+#include <resip/stack/HeaderFieldValue.hxx>
+
+#ifdef WIN32
+#define UINT64_C(val) val##ui64
+#elif __GNUC__
+#define UINT64_C(val) val##ULL
+#else
+#error Unknown compiler for 64-bit integer constants.
+#endif
+
+using namespace resip;
+using namespace sdpcontainer;
+using namespace std;
+
+#ifdef WIN32
+int sdpTests()
+#else
+int main(int argc, char* argv[])
+#endif
+{
+ { // Test get/set interfaces
+ Sdp sdp;
+ sdp.setSdpVersion(1);
+ sdp.setOriginatorUserName("Test");
+ sdp.setOriginatorSessionId(8888);
+ sdp.setOriginatorSessionVersion(9999);
+ sdp.setOriginatorNetType(Sdp::NET_TYPE_IN);
+ sdp.setOriginatorAddressType(Sdp::ADDRESS_TYPE_IP4);
+ sdp.setOriginatorUnicastAddress("127.0.0.1");
+ sdp.setSessionName("SdpTestSession");
+ sdp.setSessionInformation("sample session information");
+ sdp.setSessionUri("http://www.sessionuri.com");
+ assert(sdp.getSdpVersion() == 1);
+ assert(sdp.getOriginatorUserName() == "Test");
+ assert(sdp.getOriginatorSessionId() == 8888);
+ assert(sdp.getOriginatorSessionVersion() == 9999);
+ assert(sdp.getOriginatorNetType() == Sdp::NET_TYPE_IN);
+ assert(sdp.getOriginatorAddressType() == Sdp::ADDRESS_TYPE_IP4);
+ assert(sdp.getOriginatorUnicastAddress() == "127.0.0.1");
+ assert(sdp.getSessionName() == "SdpTestSession");
+ assert(sdp.getSessionInformation() == "sample session information");
+ assert(sdp.getSessionUri() == "http://www.sessionuri.com");
+
+ sdp.addEmailAddress("me at here.com");
+ sdp.addEmailAddress("you at there.com");
+ assert(sdp.getEmailAddresses().size() == 2);
+
+ sdp.addPhoneNumber("555-555-5555");
+ sdp.addPhoneNumber("123-123-1234");
+ assert(sdp.getPhoneNumbers().size() == 2);
+
+ sdp.addBandwidth(Sdp::BANDWIDTH_TYPE_CT, 1000);
+ assert(sdp.getBandwidths().size() == 1);
+ sdp.clearBandwidths();
+ assert(sdp.getBandwidths().size() == 0);
+ sdp.addBandwidth(Sdp::BANDWIDTH_TYPE_AS, 5000);
+ sdp.addBandwidth(Sdp::BANDWIDTH_TYPE_CT, 100);
+ assert(sdp.getBandwidths().size() == 2);
+ assert(sdp.getBandwidths().front().getType() == Sdp::BANDWIDTH_TYPE_AS);
+ assert(sdp.getBandwidths().front().getBandwidth() == 5000);
+ assert(sdp.getBandwidths().back().getType() == Sdp::BANDWIDTH_TYPE_CT);
+ assert(sdp.getBandwidths().back().getBandwidth() == 100);
+
+ Sdp::SdpTime* sdpTime = new Sdp::SdpTime(100, 200);
+ Sdp::SdpTime::SdpTimeRepeat* repeat = new Sdp::SdpTime::SdpTimeRepeat(8, 800);
+ sdpTime->addRepeat(*repeat);
+ repeat = new Sdp::SdpTime::SdpTimeRepeat(9, 900);
+ repeat->addOffsetFromStartTime(20);
+ repeat->addOffsetFromStartTime(21);
+ sdpTime->addRepeat(*repeat);
+ sdp.addTime(*sdpTime);
+ sdp.addTime(300, 400);
+ assert(sdp.getTimes().size() == 2);
+ assert(sdp.getTimes().front().getStartTime() == 100);
+ assert(sdp.getTimes().front().getStopTime() == 200);
+ assert(sdp.getTimes().front().getRepeats().size() == 2);
+ assert(sdp.getTimes().front().getRepeats().front().getRepeatInterval() == 8);
+ assert(sdp.getTimes().front().getRepeats().front().getActiveDuration() == 800);
+ assert(sdp.getTimes().front().getRepeats().back().getRepeatInterval() == 9);
+ assert(sdp.getTimes().front().getRepeats().back().getActiveDuration() == 900);
+ assert(sdp.getTimes().front().getRepeats().back().getOffsetsFromStartTime().size() == 2);
+ assert(sdp.getTimes().front().getRepeats().back().getOffsetsFromStartTime().front() == 20);
+ assert(sdp.getTimes().front().getRepeats().back().getOffsetsFromStartTime().back() == 21);
+ assert(sdp.getTimes().back().getStartTime() == 300);
+ assert(sdp.getTimes().back().getStopTime() == 400);
+ sdp.addTimeZone(500, 600);
+ sdp.addTimeZone(700, 800);
+ assert(sdp.getTimeZones().size() == 2);
+ assert(sdp.getTimeZones().front().getAdjustmentTime() == 500);
+ assert(sdp.getTimeZones().front().getOffset() == 600);
+ assert(sdp.getTimeZones().back().getAdjustmentTime() == 700);
+ assert(sdp.getTimeZones().back().getOffset() == 800);
+
+ sdp.setCategory("sample sdp category");
+ sdp.setKeywords("sdp session description protocol");
+ sdp.setToolNameAndVersion("sipX session description 1.0");
+ sdp.setConferenceType(Sdp::CONFERENCE_TYPE_BROADCAST);
+ sdp.setCharSet("UTF-8");
+ sdp.setIcePassiveOnlyMode(true);
+ assert(sdp.getCategory() == "sample sdp category");
+ assert(sdp.getKeywords() == "sdp session description protocol");
+ assert(sdp.getToolNameAndVersion() == "sipX session description 1.0");
+ assert(sdp.getConferenceType() == Sdp::CONFERENCE_TYPE_BROADCAST);
+ assert(sdp.getCharSet() == "UTF-8");
+ assert(sdp.isIcePassiveOnlyMode() == true);
+
+ Sdp::SdpGroup* group = new Sdp::SdpGroup(Sdp::GROUP_SEMANTICS_LS);
+ group->addIdentificationTag("media1");
+ group->addIdentificationTag("media2");
+ sdp.addGroup(*group);
+ group = new Sdp::SdpGroup(Sdp::GROUP_SEMANTICS_FID);
+ group->addIdentificationTag("fid1");
+ sdp.addGroup(*group);
+ assert(sdp.getGroups().size() == 2);
+ assert(sdp.getGroups().front().getSemantics() == Sdp::GROUP_SEMANTICS_LS);
+ assert(sdp.getGroups().front().getIdentificationTags().size() == 2);
+ assert(sdp.getGroups().front().getIdentificationTags().front() == "media1");
+ assert(sdp.getGroups().front().getIdentificationTags().back() == "media2");
+ assert(sdp.getGroups().back().getSemantics() == Sdp::GROUP_SEMANTICS_FID);
+ assert(sdp.getGroups().back().getIdentificationTags().size() == 1);
+ assert(sdp.getGroups().back().getIdentificationTags().front() == "fid1");
+
+ sdp.setSessionLanguage("EN-US");
+ sdp.setDescriptionLanguage("FR-CN");
+ sdp.setMaximumPacketRate(1.5);
+ assert(sdp.getSessionLanguage() == "EN-US");
+ assert(sdp.getDescriptionLanguage() == "FR-CN");
+ assert(sdp.getMaximumPacketRate() == 1.5);
+
+ // Test Copy constructor
+ Sdp sdp2(sdp);
+ assert(sdp2.getSdpVersion() == 1);
+ assert(sdp2.getOriginatorUserName() == "Test");
+ assert(sdp2.getOriginatorSessionId() == 8888);
+ assert(sdp2.getOriginatorSessionVersion() == 9999);
+ assert(sdp2.getOriginatorNetType() == Sdp::NET_TYPE_IN);
+ assert(sdp2.getOriginatorAddressType() == Sdp::ADDRESS_TYPE_IP4);
+ assert(sdp2.getOriginatorUnicastAddress() == "127.0.0.1");
+ assert(sdp2.getSessionName() == "SdpTestSession");
+ assert(sdp2.getSessionInformation() == "sample session information");
+ assert(sdp2.getSessionUri() == "http://www.sessionuri.com");
+ assert(sdp2.getEmailAddresses().size() == 2);
+ assert(sdp2.getBandwidths().size() == 2);
+ assert(sdp2.getPhoneNumbers().size() == 2);
+ assert(sdp2.getBandwidths().front().getType() == Sdp::BANDWIDTH_TYPE_AS);
+ assert(sdp2.getBandwidths().front().getBandwidth() == 5000);
+ assert(sdp2.getBandwidths().back().getType() == Sdp::BANDWIDTH_TYPE_CT);
+ assert(sdp2.getBandwidths().back().getBandwidth() == 100);
+ assert(sdp2.getTimes().size() == 2);
+ assert(sdp2.getTimes().front().getStartTime() == 100);
+ assert(sdp2.getTimes().front().getStopTime() == 200);
+ assert(sdp2.getTimes().front().getRepeats().size() == 2);
+ assert(sdp2.getTimes().front().getRepeats().front().getRepeatInterval() == 8);
+ assert(sdp2.getTimes().front().getRepeats().front().getActiveDuration() == 800);
+ assert(sdp2.getTimes().front().getRepeats().back().getRepeatInterval() == 9);
+ assert(sdp2.getTimes().front().getRepeats().back().getActiveDuration() == 900);
+ assert(sdp2.getTimes().front().getRepeats().back().getOffsetsFromStartTime().size() == 2);
+ assert(sdp2.getTimes().front().getRepeats().back().getOffsetsFromStartTime().front() == 20);
+ assert(sdp2.getTimes().front().getRepeats().back().getOffsetsFromStartTime().back() == 21);
+ assert(sdp2.getTimes().back().getStartTime() == 300);
+ assert(sdp2.getTimes().back().getStopTime() == 400);
+ assert(sdp2.getTimeZones().size() == 2);
+ assert(sdp2.getTimeZones().front().getAdjustmentTime() == 500);
+ assert(sdp2.getTimeZones().front().getOffset() == 600);
+ assert(sdp2.getTimeZones().back().getAdjustmentTime() == 700);
+ assert(sdp2.getTimeZones().back().getOffset() == 800);
+ assert(sdp2.getGroups().size() == 2);
+ assert(sdp2.getGroups().front().getSemantics() == Sdp::GROUP_SEMANTICS_LS);
+ assert(sdp2.getGroups().front().getIdentificationTags().size() == 2);
+ assert(sdp2.getGroups().front().getIdentificationTags().front() == "media1");
+ assert(sdp2.getGroups().front().getIdentificationTags().back() == "media2");
+ assert(sdp2.getGroups().back().getSemantics() == Sdp::GROUP_SEMANTICS_FID);
+ assert(sdp2.getGroups().back().getIdentificationTags().size() == 1);
+ assert(sdp2.getGroups().back().getIdentificationTags().front() == "fid1");
+ assert(sdp2.getSessionLanguage() == "EN-US");
+ assert(sdp2.getDescriptionLanguage() == "FR-CN");
+ assert(sdp2.getMaximumPacketRate() == 1.5);
+
+ SdpMediaLine* mediaLine = new SdpMediaLine();
+ mediaLine->setMediaType(SdpMediaLine::MEDIA_TYPE_AUDIO);
+ mediaLine->setTransportProtocolType(SdpMediaLine::PROTOCOL_TYPE_RTP_AVP);
+ mediaLine->setTitle("G729a Audio Codec");
+ mediaLine->addConnection(Sdp::NET_TYPE_IN, Sdp::ADDRESS_TYPE_IP4, "127.0.0.1", 6000, 90);
+ mediaLine->addRtcpConnection(Sdp::NET_TYPE_IN, Sdp::ADDRESS_TYPE_IP4, "127.0.0.1", 6001);
+ mediaLine->addBandwidth(Sdp::BANDWIDTH_TYPE_CT, 10);
+ mediaLine->setEncryptionKey(SdpMediaLine::ENCRYPTION_METHOD_BASE64, "0123456789ABCD");
+ mediaLine->setDirection(SdpMediaLine::DIRECTION_TYPE_SENDRECV);
+ mediaLine->setPacketTime(20);
+ mediaLine->setMaxPacketTime(60);
+ mediaLine->setOrientation(SdpMediaLine::ORIENTATION_TYPE_LANDSCAPE);
+ mediaLine->setDescriptionLanguage("English");
+ mediaLine->setLanguage("EN");
+ mediaLine->setFrameRate(256);
+ mediaLine->setQuality(10);
+ mediaLine->setTcpConnectionAttribute(SdpMediaLine::TCP_CONNECTION_ATTRIBUTE_NEW);
+ mediaLine->setTcpSetupAttribute(SdpMediaLine::TCP_SETUP_ATTRIBUTE_ACTPASS);
+ assert(mediaLine->getMediaType() == SdpMediaLine::MEDIA_TYPE_AUDIO);
+ assert(mediaLine->getTransportProtocolType() == SdpMediaLine::PROTOCOL_TYPE_RTP_AVP);
+ assert(mediaLine->getTitle() == "G729a Audio Codec");
+ assert(mediaLine->getConnections().size() == 1);
+ assert(mediaLine->getConnections().front().getNetType() == Sdp::NET_TYPE_IN);
+ assert(mediaLine->getConnections().front().getAddressType() == Sdp::ADDRESS_TYPE_IP4);
+ assert(mediaLine->getConnections().front().getAddress() == "127.0.0.1");
+ assert(mediaLine->getConnections().front().getPort() == 6000);
+ assert(mediaLine->getConnections().front().getMulticastIpV4Ttl() == 90);
+ assert(mediaLine->getRtcpConnections().size() == 1);
+ assert(mediaLine->getRtcpConnections().front().getNetType() == Sdp::NET_TYPE_IN);
+ assert(mediaLine->getRtcpConnections().front().getAddressType() == Sdp::ADDRESS_TYPE_IP4);
+ assert(mediaLine->getRtcpConnections().front().getAddress() == "127.0.0.1");
+ assert(mediaLine->getRtcpConnections().front().getPort() == 6001);
+ assert(mediaLine->getRtcpConnections().front().getMulticastIpV4Ttl() == 0);
+ assert(mediaLine->getBandwidths().size() == 1);
+ assert(mediaLine->getEncryptionKey() == "0123456789ABCD");
+ assert(mediaLine->getEncryptionMethod() == SdpMediaLine::ENCRYPTION_METHOD_BASE64);
+ assert(mediaLine->getDirection() == SdpMediaLine::DIRECTION_TYPE_SENDRECV);
+ assert(mediaLine->getPacketTime() == 20);
+ assert(mediaLine->getMaxPacketTime() == 60);
+ assert(mediaLine->getOrientation() == SdpMediaLine::ORIENTATION_TYPE_LANDSCAPE);
+ assert(mediaLine->getDescriptionLanguage() == "English");
+ assert(mediaLine->getLanguage() == "EN");
+ assert(mediaLine->getFrameRate() == 256);
+ assert(mediaLine->getQuality() == 10);
+ assert(mediaLine->getTcpConnectionAttribute() == SdpMediaLine::TCP_CONNECTION_ATTRIBUTE_NEW);
+ assert(mediaLine->getTcpSetupAttribute() == SdpMediaLine::TCP_SETUP_ATTRIBUTE_ACTPASS);
+
+ SdpMediaLine::SdpCrypto *crypto = new SdpMediaLine::SdpCrypto;
+ crypto->setTag(1);
+ crypto->setSuite(SdpMediaLine::CRYPTO_SUITE_TYPE_AES_CM_128_HMAC_SHA1_32);
+ crypto->setSrtpFecOrder(SdpMediaLine::CRYPTO_SRTP_FEC_ORDER_SRTP_FEC);
+ crypto->setSrtpFecKey(SdpMediaLine::CRYPTO_KEY_METHOD_INLINE, "FECKEY", 200000, 2, 8);
+ crypto->setAuthenticatedSrtp(true);
+ crypto->setEncryptedSrtcp(true);
+ crypto->setEncryptedSrtp(true);
+ crypto->setSrtpKdr(64);
+ crypto->setSrtpWsh(32);
+ crypto->addCryptoKeyParam(SdpMediaLine::CRYPTO_KEY_METHOD_INLINE, "CyrptoKey", 10000, 1, 5);
+ mediaLine->addCryptoSettings(*crypto);
+ crypto = new SdpMediaLine::SdpCrypto;
+ crypto->setTag(2);
+ crypto->setSuite(SdpMediaLine::CRYPTO_SUITE_TYPE_F8_128_HMAC_SHA1_80);
+ crypto->addCryptoKeyParam(SdpMediaLine::CRYPTO_KEY_METHOD_INLINE, "CryptoKey2");
+ crypto->addGenericSessionParam("param1");
+ crypto->addGenericSessionParam("param2");
+ assert(crypto->getGenericSessionParams().size() == 2);
+ assert(crypto->getTag() == 2);
+ assert(crypto->getSuite() == SdpMediaLine::CRYPTO_SUITE_TYPE_F8_128_HMAC_SHA1_80);
+ assert(crypto->getCryptoKeyParams().size() == 1);
+ assert(crypto->getCryptoKeyParams().front().getKeyMethod() == SdpMediaLine::CRYPTO_KEY_METHOD_INLINE);
+ assert(crypto->getCryptoKeyParams().front().getKeyValue() == "CryptoKey2");
+ assert(crypto->getGenericSessionParams().size() == 2);
+ mediaLine->addCryptoSettings(*crypto);
+ assert(mediaLine->getCryptos().size() == 2);
+
+ mediaLine->setFingerPrint(SdpMediaLine::FINGERPRINT_HASH_FUNC_MD5, "this-is-a-finger-print");
+ mediaLine->setKeyManagementProtocol(SdpMediaLine::KEYMANAGEMENT_PROTOCOL_MIKEY, "this-is-some-key-management-data");
+ mediaLine->addPreConditionCurrentStatus(SdpMediaLine::PRECONDITION_TYPE_QOS, SdpMediaLine::PRECONDITION_STATUS_E2E, SdpMediaLine::PRECONDITION_DIRECTION_SENDRECV);
+ mediaLine->addPreConditionCurrentStatus(SdpMediaLine::PRECONDITION_TYPE_QOS, SdpMediaLine::PRECONDITION_STATUS_REMOTE, SdpMediaLine::PRECONDITION_DIRECTION_RECV);
+ mediaLine->addPreConditionConfirmStatus(SdpMediaLine::PRECONDITION_TYPE_QOS, SdpMediaLine::PRECONDITION_STATUS_E2E, SdpMediaLine::PRECONDITION_DIRECTION_SENDRECV);
+ mediaLine->addPreConditionConfirmStatus(SdpMediaLine::PRECONDITION_TYPE_QOS, SdpMediaLine::PRECONDITION_STATUS_REMOTE, SdpMediaLine::PRECONDITION_DIRECTION_RECV);
+ mediaLine->addPreConditionDesiredStatus(SdpMediaLine::PRECONDITION_TYPE_QOS, SdpMediaLine::PRECONDITION_STRENGTH_MANDATORY, SdpMediaLine::PRECONDITION_STATUS_E2E, SdpMediaLine::PRECONDITION_DIRECTION_SENDRECV);
+ mediaLine->addPreConditionDesiredStatus(SdpMediaLine::PRECONDITION_TYPE_QOS, SdpMediaLine::PRECONDITION_STRENGTH_OPTIONAL, SdpMediaLine::PRECONDITION_STATUS_REMOTE, SdpMediaLine::PRECONDITION_DIRECTION_RECV);
+ assert(mediaLine->getFingerPrint() == "this-is-a-finger-print");
+ assert(mediaLine->getFingerPrintHashFunction() == SdpMediaLine::FINGERPRINT_HASH_FUNC_MD5);
+ assert(mediaLine->getPreConditionCurrentStatus().size() == 2);
+ assert(mediaLine->getPreConditionCurrentStatus().front().getType() == SdpMediaLine::PRECONDITION_TYPE_QOS);
+ assert(mediaLine->getPreConditionCurrentStatus().front().getStatus() == SdpMediaLine::PRECONDITION_STATUS_E2E);
+ assert(mediaLine->getPreConditionCurrentStatus().back().getDirection() == SdpMediaLine::PRECONDITION_DIRECTION_RECV);
+ assert(mediaLine->getPreConditionConfirmStatus().size() == 2);
+ assert(mediaLine->getPreConditionConfirmStatus().front().getType() == SdpMediaLine::PRECONDITION_TYPE_QOS);
+ assert(mediaLine->getPreConditionConfirmStatus().back().getStatus() == SdpMediaLine::PRECONDITION_STATUS_REMOTE);
+ assert(mediaLine->getPreConditionConfirmStatus().front().getDirection() == SdpMediaLine::PRECONDITION_DIRECTION_SENDRECV);
+ assert(mediaLine->getPreConditionDesiredStatus().size() == 2);
+ assert(mediaLine->getPreConditionDesiredStatus().front().getStrength() == SdpMediaLine::PRECONDITION_STRENGTH_MANDATORY);
+ assert(mediaLine->getPreConditionDesiredStatus().back().getStatus() == SdpMediaLine::PRECONDITION_STATUS_REMOTE);
+ assert(mediaLine->getPreConditionDesiredStatus().front().getDirection() == SdpMediaLine::PRECONDITION_DIRECTION_SENDRECV);
+
+ mediaLine->setMaximumPacketRate(20);
+ mediaLine->setLabel("G711 Label");
+ mediaLine->setIdentificationTag("item1");
+ mediaLine->setIceUserFrag("ICEUSER");
+ mediaLine->setIcePassword("ICEPASSWORD");
+ mediaLine->addRemoteCandidate(1, "127.0.0.1", 5060);
+ mediaLine->addRemoteCandidate(2, "127.0.0.2", 5061);
+ assert(mediaLine->getMaximumPacketRate() == 20);
+ assert(mediaLine->getLabel() == "G711 Label");
+ assert(mediaLine->getIdentificationTag() == "item1");
+ assert(mediaLine->getIceUserFrag() == "ICEUSER");
+ assert(mediaLine->getIcePassword() == "ICEPASSWORD");
+ assert(mediaLine->getRemoteCandidates().size() == 2);
+ assert(mediaLine->getRemoteCandidates().front().getComponentId() == 1);
+ assert(mediaLine->getRemoteCandidates().front().getConnectionAddress() == "127.0.0.1");
+ assert(mediaLine->getRemoteCandidates().front().getPort() == 5060);
+
+ mediaLine->addCandidate("id1", 1, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 100, "127.0.0.1", 6000, SdpCandidate::CANDIDATE_TYPE_HOST);
+ mediaLine->addCandidate("id1", 2, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 50, "127.0.0.1", 6000, SdpCandidate::CANDIDATE_TYPE_SRFLX);
+ mediaLine->addCandidate("id2", 1, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 101, "192.168.1.2", 5060, SdpCandidate::CANDIDATE_TYPE_RELAY, "127.0.0.3", 5080);
+ mediaLine->addCandidate("id2", 1, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 100, "127.0.0.1", 6001, SdpCandidate::CANDIDATE_TYPE_HOST);
+ assert(mediaLine->getCandidates().size() == 4);
+ // Note: this list is ordered
+ SdpMediaLine::SdpCandidateList::const_iterator it = mediaLine->getCandidates().begin();
+ assert(it->getPriority() == 101);
+ assert(it->getFoundation() == "id2");
+ assert(it->getId() == 1);
+ assert(it->getTransport() == SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP);
+ assert(it->getConnectionAddress() == "192.168.1.2");
+ assert(it->getPort() == 5060);
+ assert(it->getCandidateType() == SdpCandidate::CANDIDATE_TYPE_RELAY);
+ assert(it->getRelatedAddress() == "127.0.0.3");
+ assert(it->getRelatedPort() == 5080);
+ assert(it->getExtensionAttributes().size() == 0);
+ assert(it->isInUse() == false);
+ it++;
+ assert(it->getPriority() == 100);
+ assert(it->getFoundation() == "id1");
+ assert(it->getRelatedAddress() == "");
+ assert(it->getRelatedPort() == 0);
+ assert(it->isInUse() == true);
+ it++;
+ assert(it->getPriority() == 100);
+ assert(it->getFoundation() == "id2");
+ assert(it->isInUse() == true);
+ it++;
+ assert(it->getPriority() == 50);
+ assert(it->getFoundation() == "id1");
+ assert(it->isInUse() == true);
+
+ assert(mediaLine->isIceSupported() == true);
+
+ sdp.addMediaLine(mediaLine);
+ assert(sdp.getMediaLines().size() == 1);
+
+ mediaLine = new SdpMediaLine();
+ SdpCodec* codec = new SdpCodec(19, "audio", "G729", 8000, 20, 1, "annexb=no");
+ assert(codec->getPayloadType() == 19);
+ assert(codec->getMimeType() == "audio");
+ assert(codec->getMimeSubtype() == "G729");
+ assert(codec->getRate() == 8000);
+ assert(codec->getPacketTime() == 20);
+ assert(codec->getNumChannels() == 1);
+ assert(codec->getFormatParameters() == "annexb=no");
+ mediaLine->addCodec(*codec);
+ assert(mediaLine->getCodecs().size() == 1);
+
+ SdpCandidate* sdpLocalCandidate = new SdpCandidate("f1", 1, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 100, "192.168.1.1", 6000, SdpCandidate::CANDIDATE_TYPE_HOST);
+ SdpCandidate* sdpRemoteCandidate = new SdpCandidate("a1", 1, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 55, "192.168.1.1", 2345, SdpCandidate::CANDIDATE_TYPE_HOST);
+ mediaLine->addCandidate(*sdpLocalCandidate);
+ assert(mediaLine->getCandidates().size() == 1);
+ mediaLine->addCandidatePair(*sdpLocalCandidate, *sdpRemoteCandidate, SdpCandidatePair::OFFERER_REMOTE);
+ assert(mediaLine->getCandidatePairs().size() == 1);
+ delete sdpRemoteCandidate;
+ sdpLocalCandidate = new SdpCandidate("f1", 2, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 101, "192.168.1.1", 6001, SdpCandidate::CANDIDATE_TYPE_HOST);
+ sdpRemoteCandidate = new SdpCandidate("a1", 2, SdpCandidate::CANDIDATE_TRANSPORT_TYPE_UDP, 56, "192.168.1.1", 2346, SdpCandidate::CANDIDATE_TYPE_HOST);
+ mediaLine->addCandidate(*sdpLocalCandidate);
+ assert(mediaLine->getCandidates().size() == 2);
+ mediaLine->addCandidatePair(*sdpLocalCandidate, *sdpRemoteCandidate, SdpCandidatePair::OFFERER_LOCAL);
+ assert(mediaLine->getCandidatePairs().size() == 2);
+ SdpMediaLine::SdpCandidatePairList& candidatePairs = mediaLine->getCandidatePairs();
+ SdpMediaLine::SdpCandidatePairList::iterator it2 = candidatePairs.begin();
+ assert(it2->getPriority() == UINT64_C(240518168779));
+ assert(it2->getLocalCandidate().getPort() == 6001);
+ assert(it2->getRemoteCandidate().getPort() == 2346);
+ assert(it2->getOfferer() == SdpCandidatePair::OFFERER_LOCAL);
+ assert(it2->getCheckState() == SdpCandidatePair::CHECK_STATE_FROZEN);
+ // Note: TODO - In g++ std:set members are inmutable, and cannot be modified - will need to change to another type
+ //it2->setCheckState(SdpCandidatePair::CHECK_STATE_WAITING);
+ //assert(it2->getCheckState() == SdpCandidatePair::CHECK_STATE_WAITING);
+ it2++;
+ assert(it2->getPriority() == UINT64_C(236223201480));
+
+ delete sdpRemoteCandidate;
+
+ sdp.addMediaLine(mediaLine);
+ assert(sdp.getMediaLines().size() == 2);
+
+ // Ensure string builder does not crash
+ resipCout << sdp << std::endl;
+
+ // Test FoundationId interface
+ assert(sdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.1") == "1");
+ assert(sdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.1") == "1");
+ assert(sdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.2") == "2");
+ assert(sdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.2", "192.168.1.1") == "3");
+ assert(sdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.2") == "2");
+ assert(sdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.2", "192.168.1.1") == "3");
+ }
+
+ {
+ // Test helpers
+ char txt[] = "v=0\r\n"
+ "o=- 333525334858460 333525334858460 IN IP4 192.168.0.156\r\n"
+ "s=test123\r\n"
+ "e=unknown at invalid.net\r\n"
+ "p=+972 683 1000\r\n"
+ "c=IN IP4 127.0.0.1\r\n"
+ "b=RR:0\r\n"
+ "b=RS:0\r\n"
+ "b=CT:10000\r\n"
+ "t=4058038202 0\r\n"
+ "k=base64:base64key\r\n"
+ "a=tool:ResipParserTester\r\n"
+ "a=inactive\r\n"
+ "m=audio 41466/6 RTP/AVP 0 101\r\n"
+ "i=Audio Stream\r\n"
+ "c=IN IP4 192.168.0.156/100/3\r\n"
+ "c=IN IP6 FF15::101/3\r\n"
+ "k=clear:base64clearkey\r\n"
+ "a=fmtp:101 0-11\r\n"
+ "a=ptime:20\r\n"
+ "a=fmtp:0 annexb=no\r\n"
+ "a=maxptime:40\r\n"
+ "a=setup:active\r\n"
+ "a=sendrecv\r\n"
+ "a=rtpmap:101 telephone-event/8000\r\n"
+ "a=crypto:1 F8_128_HMAC_SHA1_80 inline:MTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5QUJjZGVm|2^20|1:4;inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20|2:4 FEC_ORDER=FEC_SRTP\r\n"
+ "m=video 21234 RTP/AVP 140\r\n"
+ "b=RR:1\r\n"
+ "b=RS:0\r\n"
+ "a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2:18;inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|21|3:4 KDR=23 FEC_ORDER=SRTP_FEC UNENCRYPTED_SRTP\r\n"
+ "a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20 FEC_KEY=inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20|2:4 WSH=60\r\n"
+ "a=fingerprint:sha-1 0123456789\r\n"
+ "a=key-mgmt:mikey thisissomebase64data\r\n"
+ "a=curr:qos e2e sendrecv\r\n"
+ "a=curr:qos local send\r\n"
+ "a=des:qos mandatory e2e sendrecv\r\n"
+ "a=des:qos optional local send\r\n"
+ "a=conf:qos e2e none\r\n"
+ "a=conf:qos remote recv\r\n"
+ "a=remote-candidates:1 192.168.0.1 5060 2 192.168.0.1 5061\r\n"
+ "a=remote-candidates:3 192.168.0.2 5063\r\n"
+ "a=candidate:foundation1 1 udp 100000 127.0.0.1 21234 typ host raddr 127.0.0.8 rport 6667 name value name2 value2\r\n"
+ "a=candidate:foundation2 2 udp 100001 192.168.0.1 6667 raddr 127.0.0.9 rport 6668 name value name2 value2\r\n"
+ "a=candidate:foundation3 3 udp 100002 192.168.0.2 6668 raddr 127.0.0.9 name value name2 value2\r\n"
+ "a=candidate:foundation3 3 udp 100002 123.123.123.124 127 name value name2 value2\r\n"
+ "a=candidate:foundation3 3 udp 100002 192.168.0.2 6668 typ relay\r\n"
+ "a=rtcp:127 IN IP4 123.123.123.124/60\r\n"
+ "a=rtpmap:140 vp71/144000\r\n"
+ "a=fmtp:140 CIF=1 QCIF=2 SQCIF\r\n";
+
+ Sdp* convSdp;
+
+ { // Test resip helper
+ HeaderFieldValue hfv(txt, sizeof(txt));
+ Mime type("application", "sdp");
+ SdpContents resipSdp(hfv, type);
+
+ convSdp = SdpHelperResip::createSdpFromResipSdp(resipSdp);
+ if(convSdp)
+ {
+ // Ensure string builder does not crash
+ resipCout << "\n\nResip Sdp Helper Test:" << endl << *convSdp << endl;
+
+ // Perform some random assertions
+ assert(convSdp->getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.1") == "1");
+ assert(convSdp->getOriginatorUnicastAddress() == "192.168.0.156");
+ assert(convSdp->getSessionName() == "test123");
+ assert(convSdp->getEmailAddresses().size() == 1);
+ assert(convSdp->getPhoneNumbers().size() == 1);
+ assert(convSdp->getBandwidths().size() == 3);
+ assert(convSdp->getTimes().size() == 1);
+ assert(convSdp->getToolNameAndVersion() == "ResipParserTester");
+ assert(convSdp->getMediaLines().size() == 2);
+ assert(convSdp->getMediaLines().front()->getMediaType() == SdpMediaLine::MEDIA_TYPE_AUDIO);
+ assert(convSdp->getMediaLines().back()->getMediaType() == SdpMediaLine::MEDIA_TYPE_VIDEO);
+ assert(convSdp->getMediaLines().front()->getTransportProtocolType() == SdpMediaLine::PROTOCOL_TYPE_RTP_AVP);
+ assert(convSdp->getMediaLines().front()->getCodecs().size() == 2);
+ assert(convSdp->getMediaLines().back()->getCodecs().size() == 1);
+ assert(convSdp->getMediaLines().front()->getCodecs().front().getPayloadType() == 0);
+ assert(convSdp->getMediaLines().front()->getCodecs().back().getPayloadType() == 101);
+ assert(convSdp->getMediaLines().back()->getCodecs().front().getPayloadType() == 140);
+ assert(convSdp->getMediaLines().front()->getCodecs().back().getFormatParameters() == "0-11");
+ assert(convSdp->getMediaLines().front()->getConnections().size() == 6);
+ assert(convSdp->getMediaLines().back()->getConnections().size() == 1);
+ assert(convSdp->getMediaLines().front()->getRtcpConnections().size() == 0);
+ assert(convSdp->getMediaLines().back()->getRtcpConnections().size() == 1);
+ assert(convSdp->getMediaLines().front()->getConnections().front().getAddress() == "192.168.0.156");
+ assert(convSdp->getMediaLines().front()->getConnections().front().getPort() == 41466);
+ assert(convSdp->getMediaLines().back()->getRtcpConnections().front().getPort() == 127);
+ assert(convSdp->getMediaLines().front()->getBandwidths().size() == 0);
+ assert(convSdp->getMediaLines().back()->getBandwidths().size() == 2);
+ assert(convSdp->getMediaLines().front()->getEncryptionKey() == "base64clearkey");
+ assert(convSdp->getMediaLines().front()->getDirection() == SdpMediaLine::DIRECTION_TYPE_SENDRECV);
+ assert(convSdp->getMediaLines().back()->getDirection() == SdpMediaLine::DIRECTION_TYPE_INACTIVE);
+ assert(convSdp->getMediaLines().front()->getPacketTime() == 20);
+ assert(convSdp->getMediaLines().front()->getTcpConnectionAttribute() == SdpMediaLine::TCP_CONNECTION_ATTRIBUTE_NONE);
+ assert(convSdp->getMediaLines().front()->getTcpSetupAttribute() == SdpMediaLine::TCP_SETUP_ATTRIBUTE_ACTIVE);
+ assert(convSdp->getMediaLines().front()->getCryptos().size() == 1);
+ assert(convSdp->getMediaLines().back()->getCryptos().size() == 2);
+ assert(convSdp->getMediaLines().front()->getCandidates().size() == 0);
+ assert(convSdp->getMediaLines().back()->getCandidates().size() == 5);
+ assert(convSdp->getMediaLines().back()->getRemoteCandidates().size() == 3);
+ assert(convSdp->getMediaLines().back()->getPreConditionCurrentStatus().size() == 2);
+ assert(convSdp->getMediaLines().back()->getPreConditionConfirmStatus().size() == 2);
+ assert(convSdp->getMediaLines().back()->getPreConditionDesiredStatus().size() == 2);
+
+ // Copy test
+ Sdp copySdp(*convSdp);
+
+ // Ensure string builder does not crash
+ resipCout << copySdp << endl;
+
+ // Perform some random assertions on copy
+ assert(copySdp.getLocalFoundationId(SdpCandidate::CANDIDATE_TYPE_HOST, "127.0.0.2") == "2");
+ assert(copySdp.getOriginatorUnicastAddress() == "192.168.0.156");
+ assert(copySdp.getSessionName() == "test123");
+ assert(copySdp.getEmailAddresses().size() == 1);
+ assert(copySdp.getPhoneNumbers().size() == 1);
+ assert(copySdp.getBandwidths().size() == 3);
+ assert(copySdp.getTimes().size() == 1);
+ assert(copySdp.getToolNameAndVersion() == "ResipParserTester");
+ assert(copySdp.getMediaLines().size() == 2);
+ assert(copySdp.getMediaLines().front()->getMediaType() == SdpMediaLine::MEDIA_TYPE_AUDIO);
+ assert(copySdp.getMediaLines().back()->getMediaType() == SdpMediaLine::MEDIA_TYPE_VIDEO);
+ assert(copySdp.getMediaLines().front()->getTransportProtocolType() == SdpMediaLine::PROTOCOL_TYPE_RTP_AVP);
+ assert(copySdp.getMediaLines().front()->getCodecs().size() == 2);
+ assert(copySdp.getMediaLines().back()->getCodecs().size() == 1);
+ assert(copySdp.getMediaLines().front()->getCodecs().front().getPayloadType() == 0);
+ assert(copySdp.getMediaLines().front()->getCodecs().back().getPayloadType() == 101);
+ assert(copySdp.getMediaLines().back()->getCodecs().front().getPayloadType() == 140);
+ assert(copySdp.getMediaLines().front()->getCodecs().back().getFormatParameters() == "0-11");
+ assert(copySdp.getMediaLines().front()->getConnections().size() == 6);
+ assert(copySdp.getMediaLines().back()->getConnections().size() == 1);
+ assert(copySdp.getMediaLines().front()->getRtcpConnections().size() == 0);
+ assert(copySdp.getMediaLines().back()->getRtcpConnections().size() == 1);
+ assert(copySdp.getMediaLines().front()->getConnections().front().getAddress() == "192.168.0.156");
+ assert(copySdp.getMediaLines().front()->getConnections().front().getPort() == 41466);
+ assert(copySdp.getMediaLines().back()->getRtcpConnections().front().getPort() == 127);
+ assert(copySdp.getMediaLines().front()->getBandwidths().size() == 0);
+ assert(copySdp.getMediaLines().back()->getBandwidths().size() == 2);
+ assert(copySdp.getMediaLines().front()->getEncryptionKey() == "base64clearkey");
+ assert(copySdp.getMediaLines().front()->getDirection() == SdpMediaLine::DIRECTION_TYPE_SENDRECV);
+ assert(copySdp.getMediaLines().back()->getDirection() == SdpMediaLine::DIRECTION_TYPE_INACTIVE);
+ assert(copySdp.getMediaLines().front()->getPacketTime() == 20);
+ assert(copySdp.getMediaLines().front()->getTcpConnectionAttribute() == SdpMediaLine::TCP_CONNECTION_ATTRIBUTE_NONE);
+ assert(copySdp.getMediaLines().front()->getTcpSetupAttribute() == SdpMediaLine::TCP_SETUP_ATTRIBUTE_ACTIVE);
+ assert(copySdp.getMediaLines().front()->getCryptos().size() == 1);
+ assert(copySdp.getMediaLines().back()->getCryptos().size() == 2);
+ assert(copySdp.getMediaLines().front()->getCandidates().size() == 0);
+ assert(copySdp.getMediaLines().back()->getCandidates().size() == 5);
+ assert(copySdp.getMediaLines().back()->getRemoteCandidates().size() == 3);
+ assert(copySdp.getMediaLines().back()->getPreConditionCurrentStatus().size() == 2);
+ assert(copySdp.getMediaLines().back()->getPreConditionConfirmStatus().size() == 2);
+ assert(copySdp.getMediaLines().back()->getPreConditionDesiredStatus().size() == 2);
+ delete convSdp;
+ }
+ }
+ }
+
+ return 0;
+}
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, Plantronics, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Plantronics nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/resip/recon/test/testUA.cxx b/resip/recon/test/testUA.cxx
new file mode 100644
index 0000000..d1c426b
--- /dev/null
+++ b/resip/recon/test/testUA.cxx
@@ -0,0 +1,1566 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <signal.h>
+#ifdef WIN32
+#include <conio.h>
+#else
+/**
+ Linux (POSIX) implementation of _kbhit().
+ Morgan McGuire, morgan at cs.brown.edu
+ */
+#include <stdio.h>
+#include <sys/select.h>
+#include <termios.h>
+#ifndef __GNUC__
+ #include <stropts.h>
+#endif
+#include <sys/ioctl.h>
+
+int _kbhit() {
+ static const int STDIN = 0;
+ static bool initialized = false;
+
+ if (! initialized) {
+ // Use termios to turn off line buffering
+ termios term;
+ tcgetattr(STDIN, &term);
+ term.c_lflag &= ~ICANON;
+ tcsetattr(STDIN, TCSANOW, &term);
+ setbuf(stdin, NULL);
+ initialized = true;
+ }
+
+ int bytesWaiting;
+ ioctl(STDIN, FIONREAD, &bytesWaiting);
+ return bytesWaiting;
+}
+#endif
+
+#include "../UserAgent.hxx"
+#include "../ReconSubsystem.hxx"
+
+#include <os/OsSysLog.h>
+
+// Test Prompts for cache testing
+#include "playback_prompt.h"
+#include "record_prompt.h"
+
+#include <rutil/Log.hxx>
+#include <rutil/Logger.hxx>
+#include <rutil/DnsUtil.hxx>
+#include <rutil/BaseException.hxx>
+#include <rutil/WinLeakCheck.hxx>
+
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
+
+void sleepSeconds(unsigned int seconds)
+{
+#ifdef WIN32
+ Sleep(seconds*1000);
+#else
+ sleep(seconds);
+#endif
+}
+
+static bool finished = false;
+NameAddr uri("sip:noreg at 127.0.0.1");
+bool autoAnswerEnabled = false; // If enabled then testUA will automatically answer incoming calls by adding to lowest numbered conversation
+SharedPtr<ConversationProfile> conversationProfile;
+
+static void
+signalHandler(int signo)
+{
+ std::cerr << "Shutting down" << endl;
+ finished = true;
+}
+
+class MyUserAgent : public UserAgent
+{
+public:
+ MyUserAgent(ConversationManager* conversationManager, SharedPtr<UserAgentMasterProfile> profile) :
+ UserAgent(conversationManager, profile) {}
+
+ virtual void onApplicationTimer(unsigned int id, unsigned int durationMs, unsigned int seq)
+ {
+ InfoLog(<< "onApplicationTimeout: id=" << id << " dur=" << durationMs << " seq=" << seq);
+ }
+
+ virtual void onSubscriptionTerminated(SubscriptionHandle handle, unsigned int statusCode)
+ {
+ InfoLog(<< "onSubscriptionTerminated: handle=" << handle << " statusCode=" << statusCode);
+ }
+
+ virtual void onSubscriptionNotify(SubscriptionHandle handle, Data& notifyData)
+ {
+ InfoLog(<< "onSubscriptionNotify: handle=" << handle << " data=" << endl << notifyData);
+ }
+};
+
+class MyConversationManager : public ConversationManager
+{
+public:
+
+ MyConversationManager(bool localAudioEnabled)
+ : ConversationManager(localAudioEnabled),
+ mLocalAudioEnabled(localAudioEnabled)
+ {
+ };
+
+ virtual void startup()
+ {
+ if(mLocalAudioEnabled)
+ {
+ // Create initial local participant and conversation
+ addParticipant(createConversation(), createLocalParticipant());
+ resip::Uri uri("tone:dialtone;duration=1000");
+ createMediaResourceParticipant(mConversationHandles.front(), uri);
+ }
+ else
+ {
+ // If no local audio - just create a starter conversation
+ createConversation();
+ }
+
+ // Load 2 items into cache for testing
+ {
+ resip::Data buffer(Data::Share, (const char*)playback_prompt, sizeof(playback_prompt));
+ resip::Data name("playback");
+ addBufferToMediaResourceCache(name, buffer, 0);
+ }
+ {
+ resip::Data buffer(Data::Share, (const char *)record_prompt, sizeof(record_prompt));
+ resip::Data name("record");
+ addBufferToMediaResourceCache(name, buffer, 0);
+ }
+ }
+
+
+ virtual ConversationHandle createConversation()
+ {
+ ConversationHandle convHandle = ConversationManager::createConversation();
+ mConversationHandles.push_back(convHandle);
+ return convHandle;
+ }
+
+ virtual ParticipantHandle createRemoteParticipant(ConversationHandle convHandle, NameAddr& destination, ParticipantForkSelectMode forkSelectMode = ForkSelectAutomatic)
+ {
+ ParticipantHandle partHandle = ConversationManager::createRemoteParticipant(convHandle, destination, forkSelectMode);
+ mRemoteParticipantHandles.push_back(partHandle);
+ return partHandle;
+ }
+
+ virtual ParticipantHandle createMediaResourceParticipant(ConversationHandle convHandle, const Uri& mediaUrl)
+ {
+ ParticipantHandle partHandle = ConversationManager::createMediaResourceParticipant(convHandle, mediaUrl);
+ mMediaParticipantHandles.push_back(partHandle);
+ return partHandle;
+ }
+
+ virtual ParticipantHandle createLocalParticipant()
+ {
+ ParticipantHandle partHandle = ConversationManager::createLocalParticipant();
+ mLocalParticipantHandles.push_back(partHandle);
+ return partHandle;
+ }
+
+ virtual void onConversationDestroyed(ConversationHandle convHandle)
+ {
+ InfoLog(<< "onConversationDestroyed: handle=" << convHandle);
+ mConversationHandles.remove(convHandle);
+ }
+
+ virtual void onParticipantDestroyed(ParticipantHandle partHandle)
+ {
+ InfoLog(<< "onParticipantDestroyed: handle=" << partHandle);
+ // Remove from whatever list it is in
+ mRemoteParticipantHandles.remove(partHandle);
+ mLocalParticipantHandles.remove(partHandle);
+ mMediaParticipantHandles.remove(partHandle);
+ }
+
+ virtual void onDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up)
+ {
+ InfoLog(<< "onDtmfEvent: handle=" << partHandle << " tone=" << dtmf << " dur=" << duration << " up=" << up);
+ }
+
+ virtual void onIncomingParticipant(ParticipantHandle partHandle, const SipMessage& msg, bool autoAnswer, ConversationProfile& conversationProfile)
+ {
+ InfoLog(<< "onIncomingParticipant: handle=" << partHandle << "auto=" << autoAnswer << " msg=" << msg.brief());
+ mRemoteParticipantHandles.push_back(partHandle);
+ if(autoAnswerEnabled)
+ {
+ // If there are no conversations, then create one
+ if(mConversationHandles.empty())
+ {
+ ConversationHandle convHandle = createConversation();
+ // ensure a local participant is in the conversation - create one if one doesn't exist
+ if(mLocalParticipantHandles.empty())
+ {
+ createLocalParticipant();
+ }
+ addParticipant(convHandle, mLocalParticipantHandles.front());
+ }
+ addParticipant(mConversationHandles.front(), partHandle);
+ answerParticipant(partHandle);
+ }
+ }
+
+ virtual void onRequestOutgoingParticipant(ParticipantHandle partHandle, const SipMessage& msg, ConversationProfile& conversationProfile)
+ {
+ InfoLog(<< "onRequestOutgoingParticipant: handle=" << partHandle << " msg=" << msg.brief());
+ /*
+ if(mConvHandles.empty())
+ {
+ ConversationHandle convHandle = createConversation();
+ addParticipant(convHandle, partHandle);
+ }*/
+ }
+
+ virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode)
+ {
+ InfoLog(<< "onParticipantTerminated: handle=" << partHandle);
+ }
+
+ virtual void onParticipantProceeding(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< "onParticipantProceeding: handle=" << partHandle << " msg=" << msg.brief());
+ }
+
+ virtual void onRelatedConversation(ConversationHandle relatedConvHandle, ParticipantHandle relatedPartHandle,
+ ConversationHandle origConvHandle, ParticipantHandle origPartHandle)
+ {
+ InfoLog(<< "onRelatedConversation: relatedConvHandle=" << relatedConvHandle << " relatedPartHandle=" << relatedPartHandle
+ << " origConvHandle=" << origConvHandle << " origPartHandle=" << origPartHandle);
+ mConversationHandles.push_back(relatedConvHandle);
+ mRemoteParticipantHandles.push_back(relatedPartHandle);
+ }
+
+ virtual void onParticipantAlerting(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< "onParticipantAlerting: handle=" << partHandle << " msg=" << msg.brief());
+ }
+
+ virtual void onParticipantConnected(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< "onParticipantConnected: handle=" << partHandle << " msg=" << msg.brief());
+ }
+
+ virtual void onParticipantRedirectSuccess(ParticipantHandle partHandle)
+ {
+ InfoLog(<< "onParticipantRedirectSuccess: handle=" << partHandle);
+ }
+
+ virtual void onParticipantRedirectFailure(ParticipantHandle partHandle, unsigned int statusCode)
+ {
+ InfoLog(<< "onParticipantRedirectFailure: handle=" << partHandle << " statusCode=" << statusCode);
+ }
+
+ void displayInfo()
+ {
+ Data output;
+
+ if(!mConversationHandles.empty())
+ {
+ output = "Active conversation handles: ";
+ std::list<ConversationHandle>::iterator it;
+ for(it = mConversationHandles.begin(); it != mConversationHandles.end(); it++)
+ {
+ output += Data(*it) + " ";
+ }
+ InfoLog(<< output);
+ }
+ if(!mLocalParticipantHandles.empty())
+ {
+ output = "Local Participant handles: ";
+ std::list<ParticipantHandle>::iterator it;
+ for(it = mLocalParticipantHandles.begin(); it != mLocalParticipantHandles.end(); it++)
+ {
+ output += Data(*it) + " ";
+ }
+ InfoLog(<< output);
+ }
+ if(!mRemoteParticipantHandles.empty())
+ {
+ output = "Remote Participant handles: ";
+ std::list<ParticipantHandle>::iterator it;
+ for(it = mRemoteParticipantHandles.begin(); it != mRemoteParticipantHandles.end(); it++)
+ {
+ output += Data(*it) + " ";
+ }
+ InfoLog(<< output);
+ }
+ if(!mMediaParticipantHandles.empty())
+ {
+ output = "Media Participant handles: ";
+ std::list<ParticipantHandle>::iterator it;
+ for(it = mMediaParticipantHandles.begin(); it != mMediaParticipantHandles.end(); it++)
+ {
+ output += Data(*it) + " ";
+ }
+ InfoLog(<< output);
+ }
+ }
+
+ std::list<ConversationHandle> mConversationHandles;
+ std::list<ParticipantHandle> mLocalParticipantHandles;
+ std::list<ParticipantHandle> mRemoteParticipantHandles;
+ std::list<ParticipantHandle> mMediaParticipantHandles;
+ bool mLocalAudioEnabled;
+};
+
+void processCommandLine(Data& commandline, MyConversationManager& myConversationManager, MyUserAgent& myUserAgent)
+{
+ Data command;
+#define MAX_ARGS 5
+ Data arg[MAX_ARGS];
+ ParseBuffer pb(commandline);
+ pb.skipWhitespace();
+ if(pb.eof()) return;
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace);
+ pb.data(command, start);
+
+ // Get arguments (up to MAX_ARGS)
+ int currentArg = 0;
+ while(!pb.eof() && currentArg < MAX_ARGS)
+ {
+ pb.skipWhitespace();
+ if(!pb.eof())
+ {
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace);
+ pb.data(arg[currentArg++], start);
+ }
+ }
+
+ // Process commands
+ if(isEqualNoCase(command, "quit") || isEqualNoCase(command, "q") || isEqualNoCase(command, "exit"))
+ {
+ finished=true;
+ return;
+ }
+ if(isEqualNoCase(command, "createconv") || isEqualNoCase(command, "cc"))
+ {
+ myConversationManager.createConversation();
+ return;
+ }
+ if(isEqualNoCase(command, "destroyconv") || isEqualNoCase(command, "dc"))
+ {
+ unsigned long handle = arg[0].convertUnsignedLong();
+ if(handle != 0)
+ {
+ myConversationManager.destroyConversation(handle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'destroyconv'|'dc'> <convHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "joinconv") || isEqualNoCase(command, "jc"))
+ {
+ unsigned long handleSrc = arg[0].convertUnsignedLong();
+ unsigned long handleDest = arg[1].convertUnsignedLong();
+ if(handleSrc != 0 && handleDest != 0)
+ {
+ myConversationManager.joinConversation(handleSrc, handleDest);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'joinconv'|'jc'> <sourceConvHandle> <destConvHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "createlocal") || isEqualNoCase(command, "clp"))
+ {
+ myConversationManager.createLocalParticipant();
+ return;
+ }
+ if(isEqualNoCase(command, "createremote") || isEqualNoCase(command, "crp"))
+ {
+ unsigned long handle = arg[0].convertUnsignedLong();
+ ConversationManager::ParticipantForkSelectMode mode = ConversationManager::ForkSelectAutomatic;
+ if(handle != 0 && !arg[1].empty())
+ {
+ if(!arg[2].empty() && isEqualNoCase(arg[2], "manual"))
+ {
+ mode = ConversationManager::ForkSelectManual;
+ }
+ try
+ {
+ NameAddr dest(arg[1]);
+ myConversationManager.createRemoteParticipant(handle, dest, mode);
+ }
+ catch(...)
+ {
+ NameAddr dest(uri);
+ dest.uri().user() = arg[1];
+ myConversationManager.createRemoteParticipant(handle, dest, mode);
+ }
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'createremote'|'crp'> <convHandle> <destURI> [<'manual'>] (last arg is fork select mode, 'auto' is default).");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "createmedia") || isEqualNoCase(command, "cmp"))
+ {
+ unsigned long handle = arg[0].convertUnsignedLong();
+ unsigned long duration = arg[2].convertUnsignedLong();
+ if(handle != 0 && !arg[1].empty())
+ {
+ try
+ {
+ Uri url(arg[1]);
+ if(duration != 0)
+ {
+ url.param(p_duration) = duration;
+ }
+ myConversationManager.createMediaResourceParticipant(handle, url);
+ }
+ catch(resip::BaseException& e)
+ {
+ InfoLog( << "Invalid url format: <'createmedia'|'cmp'> <convHandle> <mediaURL> [<durationMs>]: " << e);
+ }
+ catch(...)
+ {
+ InfoLog( << "Invalid url format: <'createmedia'|'cmp'> <convHandle> <mediaURL> [<durationMs>]");
+ }
+ }
+ else
+ {
+ //myConversationManager.createMediaResourceParticipant(1, Uri("http://www.sillyhumor.com/answer/helloo.wav"));
+ InfoLog( << "Invalid command format: <'createmedia'|'cmp'> <convHandle> <mediaURL> [<durationMs>]");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "destroypart") || isEqualNoCase(command, "dp"))
+ {
+ unsigned long handle = arg[0].convertUnsignedLong();
+ if(handle != 0)
+ {
+ myConversationManager.destroyParticipant(handle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'destroypart'|'dp'> <parthandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "addpart") || isEqualNoCase(command, "ap"))
+ {
+ unsigned long convHandle = arg[0].convertUnsignedLong();
+ unsigned long partHandle = arg[1].convertUnsignedLong();
+ if(convHandle != 0 && partHandle != 0)
+ {
+ myConversationManager.addParticipant(convHandle, partHandle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'addpart'|'ap'> <convHandle> <partHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "remotepart") || isEqualNoCase(command, "rp"))
+ {
+ unsigned long convHandle = arg[0].convertUnsignedLong();
+ unsigned long partHandle = arg[1].convertUnsignedLong();
+ if(convHandle != 0 && partHandle != 0)
+ {
+ myConversationManager.removeParticipant(convHandle, partHandle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'removepart'|'rp'> <convHandle> <partHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "movepart") || isEqualNoCase(command, "mp"))
+ {
+ unsigned long partHandle = arg[0].convertUnsignedLong();
+ unsigned long srcConvHandle = arg[1].convertUnsignedLong();
+ unsigned long dstConvHandle = arg[2].convertUnsignedLong();
+ if(partHandle != 0 && srcConvHandle != 0 && dstConvHandle != 0)
+ {
+ myConversationManager.moveParticipant(partHandle, srcConvHandle, dstConvHandle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'movepart'|'mp'> <partHandle> <srcConvHandle> <dstConvHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "partcontrib") || isEqualNoCase(command, "pc"))
+ {
+ unsigned long convHandle = arg[0].convertUnsignedLong();
+ unsigned long partHandle = arg[1].convertUnsignedLong();
+ if(partHandle != 0 && convHandle != 0)
+ {
+ myConversationManager.modifyParticipantContribution(convHandle, partHandle, arg[2].convertUnsignedLong(), arg[3].convertUnsignedLong());
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'partcontrib'|'pc'> <convHandle> <partHandle> <inputGain> <outputGain> (gain in percentage)");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "bridgematrix") || isEqualNoCase(command, "bm"))
+ {
+ myConversationManager.outputBridgeMatrix();
+ return;
+ }
+ if(isEqualNoCase(command, "alert") || isEqualNoCase(command, "al"))
+ {
+ unsigned long partHandle = arg[0].convertUnsignedLong();
+ bool early = true;
+ if(partHandle != 0)
+ {
+ if(!arg[1].empty() && isEqualNoCase(arg[1], "noearly"))
+ {
+ early = false;
+ }
+ myConversationManager.alertParticipant(partHandle, early);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'alert'|'al'> <partHandle> [<'noearly'>] (last arg is early flag, enabled by default)");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "answer") || isEqualNoCase(command, "an"))
+ {
+ unsigned long partHandle = arg[0].convertUnsignedLong();
+ if(partHandle != 0)
+ {
+ myConversationManager.answerParticipant(partHandle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'answer'|'an'> <partHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "reject") || isEqualNoCase(command, "rj"))
+ {
+ unsigned long partHandle = arg[0].convertUnsignedLong();
+ unsigned long status = arg[1].convertUnsignedLong();
+ if(partHandle != 0)
+ {
+ if(status == 0) status = 486;
+ myConversationManager.rejectParticipant(partHandle, status);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'reject'|'rj'> <partHandle> [<statusCode>] (default status code is 486)");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "redirect") || isEqualNoCase(command, "rd"))
+ {
+ unsigned long partHandle = arg[0].convertUnsignedLong();
+ if(partHandle != 0 && !arg[1].empty())
+ {
+ try
+ {
+ NameAddr dest(arg[1]);
+ myConversationManager.redirectParticipant(partHandle, dest);
+ }
+ catch(...)
+ {
+ NameAddr dest(uri);
+ dest.uri().user() = arg[1];
+ myConversationManager.redirectParticipant(partHandle, dest);
+ }
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'redirect'|'rd'> <partHandle> <destURI>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "redirectTo") || isEqualNoCase(command, "rt"))
+ {
+ unsigned long partHandle = arg[0].convertUnsignedLong();
+ unsigned long destPartHandle = arg[1].convertUnsignedLong();
+ if(partHandle != 0 && destPartHandle != 0)
+ {
+ myConversationManager.redirectToParticipant(partHandle, destPartHandle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'redirectTo'|'rt'> <partHandle> <destPartHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "volume") || isEqualNoCase(command, "sv"))
+ {
+ unsigned long volume = arg[0].convertUnsignedLong();
+ myConversationManager.setSpeakerVolume(volume);
+ InfoLog( << "Speaker volume set to " << volume);
+ return;
+ }
+ if(isEqualNoCase(command, "gain") || isEqualNoCase(command, "sg"))
+ {
+ unsigned long gain = arg[0].convertUnsignedLong();
+ myConversationManager.setMicrophoneGain(gain);
+ InfoLog( << "Microphone gain set to " << gain);
+ return;
+ }
+ if(isEqualNoCase(command, "mute") || isEqualNoCase(command, "mm"))
+ {
+ bool enable = arg[0].convertUnsignedLong() != 0;
+ myConversationManager.muteMicrophone(enable);
+ InfoLog( << "Microphone mute " << (enable ? "enabled" : "disabled"));
+ return;
+ }
+ if(isEqualNoCase(command, "echocanel") || isEqualNoCase(command, "aec"))
+ {
+ bool enable = arg[0].convertUnsignedLong() != 0;
+ myConversationManager.enableEchoCancel(enable);
+ InfoLog( << "Echo cancellation " << (enable ? "enabled" : "disabled"));
+ return;
+ }
+ if(isEqualNoCase(command, "autogain") || isEqualNoCase(command, "agc"))
+ {
+ bool enable = arg[0].convertUnsignedLong() != 0;
+ myConversationManager.enableAutoGainControl(enable);
+ InfoLog( << "Automatic gain control " << (enable ? "enabled" : "disabled"));
+ return;
+ }
+ if(isEqualNoCase(command, "noisereduction") || isEqualNoCase(command, "nr"))
+ {
+ bool enable = arg[0].convertUnsignedLong() != 0;
+ myConversationManager.enableNoiseReduction(enable);
+ return;
+ }
+ if(isEqualNoCase(command, "subscribe") || isEqualNoCase(command, "cs"))
+ {
+ unsigned int subTime = arg[2].convertUnsignedLong();
+ if(!arg[0].empty() && !arg[1].empty() && subTime != 0 && !arg[3].empty() && !arg[4].empty())
+ {
+ try
+ {
+ NameAddr dest(arg[1]);
+ Mime mime(arg[3], arg[4]);
+ myUserAgent.createSubscription(arg[0], dest, subTime, mime);
+ }
+ catch(...)
+ {
+ NameAddr dest(uri);
+ Mime mime(arg[3], arg[4]);
+ dest.uri().user() = arg[1];
+ myUserAgent.createSubscription(arg[0], dest, subTime, mime);
+ }
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'subscribe'|'cs'> <eventType> <targetUri> <subTime> <mimeType> <mimeSubType>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "destsub") || isEqualNoCase(command, "ds"))
+ {
+ unsigned int subHandle = arg[0].convertUnsignedLong();
+
+ if(subHandle > 0)
+ {
+ myUserAgent.destroySubscription(subHandle);
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'destsub'|'ds'> <subHandle>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "autoans") || isEqualNoCase(command, "aa"))
+ {
+ bool enable = arg[0].convertUnsignedLong() != 0;
+ autoAnswerEnabled = enable;
+ InfoLog( << "Autoanswer " << (enable ? "enabled" : "disabled"));
+ return;
+ }
+ if(isEqualNoCase(command, "setcodecs") || isEqualNoCase(command, "sc"))
+ {
+ Data codecId;
+ std::list<unsigned int> idList;
+ ParseBuffer pb(arg[0]);
+ pb.skipWhitespace();
+ while(!pb.eof())
+ {
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace, ","); // white space or ","
+ pb.data(codecId, start);
+ idList.push_back(codecId.convertUnsignedLong());
+ if(!pb.eof())
+ {
+ pb.skipChar(',');
+ }
+ }
+ unsigned int numCodecIds = idList.size();
+ if(numCodecIds > 0)
+ {
+ unsigned int* codecIdArray = new unsigned int[numCodecIds];
+ unsigned int index = 0;
+ std::list<unsigned int>::iterator it = idList.begin();
+ for(;it != idList.end(); it++)
+ {
+ codecIdArray[index++] = (*it);
+ }
+ Data ipAddress(conversationProfile->sessionCaps().session().connection().getAddress());
+ // Note: Technically modifying the conversation profile at runtime like this is not
+ // thread safe. But it should be fine for this test consoles purposes.
+ myConversationManager.buildSessionCapabilities(ipAddress, numCodecIds, codecIdArray, conversationProfile->sessionCaps());
+ delete [] codecIdArray;
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "securemedia") || isEqualNoCase(command, "sm"))
+ {
+ ConversationProfile::SecureMediaMode secureMediaMode = ConversationProfile::NoSecureMedia;
+ bool secureMediaRequired = false;
+ if(isEqualNoCase(arg[0], "Srtp"))
+ {
+ secureMediaMode = ConversationProfile::Srtp;
+ }
+ else if(isEqualNoCase(arg[0], "SrtpReq"))
+ {
+ secureMediaMode = ConversationProfile::Srtp;
+ secureMediaRequired = true;
+ }
+#ifdef USE_SSL
+ else if(isEqualNoCase(arg[0], "SrtpDtls"))
+ {
+ secureMediaMode = ConversationProfile::SrtpDtls;
+ }
+ else if(isEqualNoCase(arg[0], "SrtpDtlsReq"))
+ {
+ secureMediaMode = ConversationProfile::SrtpDtls;
+ secureMediaRequired = true;
+ }
+#endif
+ else
+ {
+ arg[0] = "None"; // for display output only
+ }
+ // Note: Technically modifying the conversation profile at runtime like this is not
+ // thread safe. But it should be fine for this test consoles purposes.
+ conversationProfile->secureMediaMode() = secureMediaMode;
+ conversationProfile->secureMediaRequired() = secureMediaRequired;
+ InfoLog( << "Secure media mode set to: " << arg[0]);
+ return;
+ }
+ if(isEqualNoCase(command, "natmode") || isEqualNoCase(command, "nm"))
+ {
+ ConversationProfile::NatTraversalMode natTraversalMode = ConversationProfile::NoNatTraversal;
+ if(isEqualNoCase(arg[0], "Bind"))
+ {
+ natTraversalMode = ConversationProfile::StunBindDiscovery;
+ }
+ else if(isEqualNoCase(arg[0], "UdpAlloc"))
+ {
+ natTraversalMode = ConversationProfile::TurnUdpAllocation;
+ }
+ else if(isEqualNoCase(arg[0], "TcpAlloc"))
+ {
+ natTraversalMode = ConversationProfile::TurnTcpAllocation;
+ }
+#ifdef USE_SSL
+ else if(isEqualNoCase(arg[0], "TlsAlloc"))
+ {
+ natTraversalMode = ConversationProfile::TurnTlsAllocation;
+ }
+#endif
+ else
+ {
+ arg[0] = "None"; // for display output only
+ }
+ // Note: Technically modifying the conversation profile at runtime like this is not
+ // thread safe. But it should be fine for this test consoles purposes.
+ conversationProfile->natTraversalMode() = natTraversalMode;
+ InfoLog( << "NAT traversal mode set to: " << arg[0]);
+ return;
+ }
+ if(isEqualNoCase(command, "natserver") || isEqualNoCase(command, "ns"))
+ {
+ Data natTraversalServerHostname;
+ unsigned short natTraversalServerPort = 8777;
+ // Read server and port
+ ParseBuffer pb(arg[0]);
+ pb.skipWhitespace();
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace, ":"); // white space or ":"
+ pb.data(natTraversalServerHostname, start);
+ if(!pb.eof())
+ {
+ pb.skipChar(':');
+ start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace); // white space
+ Data port;
+ pb.data(port, start);
+ natTraversalServerPort = port.convertUnsignedLong();
+ }
+ // Note: Technically modifying the conversation profile at runtime like this is not
+ // thread safe. But it should be fine for this test consoles purposes.
+ conversationProfile->natTraversalServerHostname() = natTraversalServerHostname;
+ conversationProfile->natTraversalServerPort() = natTraversalServerPort;
+ InfoLog( << "NAT traversal STUN/TURN server set to: " << natTraversalServerHostname << ":" << natTraversalServerPort);
+ return;
+ }
+ if(isEqualNoCase(command, "natuser") || isEqualNoCase(command, "nu"))
+ {
+ // Note: Technically modifying the conversation profile at runtime like this is not
+ // thread safe. But it should be fine for this test consoles purposes.
+ conversationProfile->stunUsername() = arg[0];
+ InfoLog( << "STUN/TURN user set to: " << arg[0]);
+ return;
+ }
+ if(isEqualNoCase(command, "natpwd") || isEqualNoCase(command, "np"))
+ {
+ // Note: Technically modifying the conversation profile at runtime like this is not
+ // thread safe. But it should be fine for this test consoles purposes.
+ conversationProfile->stunPassword() = arg[0];
+ InfoLog( << "STUN/TURN password set to: " << arg[0]);
+ return;
+ }
+ if(isEqualNoCase(command, "starttimer") || isEqualNoCase(command, "st"))
+ {
+ unsigned int timerId = arg[0].convertUnsignedLong();
+ unsigned int durationMs = arg[1].convertUnsignedLong();
+ unsigned int seqNumber = arg[2].convertUnsignedLong();
+
+ if(durationMs > 0)
+ {
+ myUserAgent.startApplicationTimer(timerId, durationMs, seqNumber);
+ InfoLog( << "Application Timer started for " << durationMs << "ms");
+ }
+ else
+ {
+ InfoLog( << "Invalid command format: <'starttimer'|'st'> <timerId> <durationMs> <seqNo>");
+ }
+ return;
+ }
+ if(isEqualNoCase(command, "info") || isEqualNoCase(command, "i"))
+ {
+ myConversationManager.displayInfo();
+ return;
+ }
+ if(isEqualNoCase(command, "dns") || isEqualNoCase(command, "ld"))
+ {
+ InfoLog( << "DNS cache (at WARNING log level):");
+ myUserAgent.logDnsCache();
+ return;
+ }
+ if(isEqualNoCase(command, "cleardns") || isEqualNoCase(command, "cd"))
+ {
+ myUserAgent.clearDnsCache();
+ InfoLog( << "DNS cache has been cleared.");
+ return;
+ }
+
+#ifdef USE_SSL
+ Data setSecureMediaMode(" setSecureMediaMode <'securemedia'|'sm'> <'None'|'Srtp'|'SrtpReq'|'SrtpDtls'|'SrtpDtlsReq'>");
+ Data setNATTraversalMode(" setNATTraversalMode <'natmode'|'nm'> <'None'|'Bind'|'UdpAlloc'|'TcpAlloc'|'TlsAlloc'>" );
+#else
+ Data setSecureMediaMode(" setSecureMediaMode <'securemedia'|'sm'> <'None'|'Srtp'|'SrtpReq'>");
+ Data setNATTraversalMode(" setNATTraversalMode <'natmode'|'nm'> <'None'|'Bind'|'UdpAlloc'|'TcpAlloc'>" );
+#endif
+
+ InfoLog( << "Possible commands are: " << endl
+ << " createConversation: <'createconv'|'cc'>" << endl
+ << " destroyConversation: <'destroyconv'|'dc'> <convHandle>" << endl
+ << " joinConversation: <'joinconv'|'jc'> <sourceConvHandle> <destConvHandle>" << endl
+ << endl
+ << " createLocalParticipant: <'createlocal'|'clp'>" << endl
+ << " createRemoteParticipant: <'createremote'|'crp'> <convHandle> <destURI> [<'manual'>] (last arg is fork select mode, 'auto' is default)" << endl
+ << " createMediaResourceParticipant: <'createmedia'|'cmp'> <convHandle> <mediaURL> [<durationMs>]" << endl
+ << " destroyParticipant: <'destroypart'|'dp'> <parthandle>" << endl
+ << endl
+ << " addPartcipant: <'addpart'|'ap'> <convHandle> <partHandle>" << endl
+ << " removePartcipant: <'removepart'|'rp'> <convHandle> <partHandle>" << endl
+ << " moveParticipant: <'movepart'|'mp'> <partHandle> <srcConvHandle> <dstConvHandle>" << endl
+ << " modifyParticipantContribution: <'partcontrib'|'pc'> <convHandle> <partHandle> <inputGain> <outputGain> (gain in percentage)" << endl
+ << " outputBridgeMatrix: <'bridgematrix'|'bm'>" << endl
+ << " alertPartcipant: <'alert'|'al'> <partHandle> [<'noearly'>] (last arg is early flag, enabled by default)" << endl
+ << " answerParticipant: <'answer'|'an'> <partHandle>" << endl
+ << " rejectParticipant: <'reject'|'rj'> <partHandle> [<statusCode>] (default status code is 486)" << endl
+ << " redirectPartcipant: <'redirect'|'rd'> <partHandle> <destURI>" << endl
+ << " redirectToPartcipant: <'redirectTo'|'rt'> <partHandle> <destPartHandle>" << endl
+ << endl
+ << " setSpeakerVolume: <'volume'|'sv'> <volume>" << endl
+ << " setMicrophoneGain: <'gain'|'sg'> <gain>" << endl
+ << " muteMicrophone: <'mute'|'mm'> <'0'|'1'> (1 to enable/mute)" << endl
+ << " enableEchoCancel: <'echocancel'|'aec'> <'0'|'1'> (1 to enable)" << endl
+ << " enableAutoGainControl: <'autogain'|'agc'> <'0'|'1'> (1 to enable)" << endl
+ << " enableNoiseReduction: <'noisereduction'|'nr'> <'0'|'1'> (1 to enable)" << endl
+ << endl
+ << " createSubscription: <'subscribe'|'cs'> <eventType> <targetUri> <subTime> <mimeType> <mimeSubType>" << endl
+ << " destroySubscription: <'destsub'|'ds'> <subHandle>" << endl
+ << endl
+ << " setAutoAnswer <'autoans'|'aa'> <'0'|'1'> (1 to enable (default))" << endl
+ << " setCodecs <'setcodecs'|'sc'> <codecId>[,<codecId>]+ (comma separated list)" << endl
+ << setSecureMediaMode << endl
+ << setNATTraversalMode << endl
+ << " setNATTraversalServer <'natserver'|'ns'> <server:port>" << endl
+ << " setNATUsername <'natuser'|'nu'> <username>" << endl
+ << " setNATPassword <'natpwd'|'np'> <password>" << endl
+ << " startApplicationTimer: <'starttimer'|'st'> <timerId> <durationMs> <seqNo>" << endl
+ << " displayInfo: <'info'|'i'>" << endl
+ << " logDnsCache: <'dns'|'ld'>" << endl
+ << " clearDnsCache: <'cleardns'|'cd'>" << endl
+ << " exitProgram: <'exit'|'quit'|'q'>");
+}
+
+#define KBD_BUFFER_SIZE 256
+void processKeyboard(char input, MyConversationManager& myConversationManager, MyUserAgent& myUserAgent)
+{
+ static char buffer[KBD_BUFFER_SIZE];
+ static int bufferpos = 0;
+
+ if(input == 13 || input == 10) // enter
+ {
+ Data db(buffer,bufferpos);
+#ifdef WIN32
+ cout << endl;
+#endif
+ processCommandLine(db, myConversationManager, myUserAgent);
+ bufferpos = 0;
+ }
+ else if(input == 8 || input == 127) // backspace
+ {
+ if(bufferpos > 0)
+ {
+#ifdef WIN32
+ cout << input << ' ' << input;
+#else
+ // note: This is bit of a hack and may not be portable to all linux terminal types
+ cout << "\b\b\b \b\b\b";
+ fflush(stdout);
+#endif
+ bufferpos--;
+ }
+ }
+ else
+ {
+ if(bufferpos == KBD_BUFFER_SIZE)
+ {
+ cout << endl;
+ bufferpos = 0;
+ }
+ else
+ {
+#ifdef WIN32
+ cout << input;
+#endif
+ buffer[bufferpos++] = (char)input;
+ }
+ }
+}
+
+int
+main (int argc, char** argv)
+{
+#ifndef _WIN32
+ if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
+ {
+ cerr << "Couldn't install signal handler for SIGPIPE" << endl;
+ exit(-1);
+ }
+#endif
+
+#if defined(WIN32) && defined(_DEBUG) && defined(LEAK_CHECK)
+ resip::FindMemoryLeaks fml;
+ {
+#endif
+
+ if ( signal( SIGINT, signalHandler ) == SIG_ERR )
+ {
+ cerr << "Couldn't install signal handler for SIGINT" << endl;
+ exit( -1 );
+ }
+
+ if ( signal( SIGTERM, signalHandler ) == SIG_ERR )
+ {
+ cerr << "Couldn't install signal handler for SIGTERM" << endl;
+ exit( -1 );
+ }
+
+ // Defaults
+ bool registrationDisabled = false;
+ bool keepAlivesDisabled = false;
+ Data password;
+ Data dnsServers;
+ Data address = DnsUtil::getLocalIpAddress();
+ ConversationProfile::SecureMediaMode secureMediaMode = ConversationProfile::NoSecureMedia;
+ bool secureMediaRequired = false;
+ ConversationProfile::NatTraversalMode natTraversalMode = ConversationProfile::NoNatTraversal;
+ Data natTraversalServerHostname;
+ unsigned short natTraversalServerPort = 8777;
+ Data stunUsername;
+ Data stunPassword;
+ bool localAudioEnabled = true;
+ unsigned short sipPort = 5062;
+ unsigned short tlsPort = 5063;
+ unsigned short mediaPortStart = 17384;
+ Data tlsDomain = DnsUtil::getLocalHostName();
+ NameAddr outboundProxy;
+ Data logLevel("INFO");
+ unsigned int codecIds[] = { SdpCodec::SDP_CODEC_PCMU /* 0 - pcmu */,
+ SdpCodec::SDP_CODEC_PCMA /* 8 - pcma */,
+ SdpCodec::SDP_CODEC_SPEEX /* 96 - speex NB 8,000bps */,
+ SdpCodec::SDP_CODEC_SPEEX_15 /* 98 - speex NB 15,000bps */,
+ SdpCodec::SDP_CODEC_SPEEX_24 /* 99 - speex NB 24,600bps */,
+ SdpCodec::SDP_CODEC_L16_44100_MONO /* PCM 16 bit/sample 44100 samples/sec. */,
+ SdpCodec::SDP_CODEC_ILBC /* 108 - iLBC */,
+ SdpCodec::SDP_CODEC_ILBC_20MS /* 109 - Internet Low Bit Rate Codec, 20ms (RFC3951) */,
+ SdpCodec::SDP_CODEC_SPEEX_5 /* 97 - speex NB 5,950bps */,
+ SdpCodec::SDP_CODEC_GSM /* 3 - GSM */,
+ SdpCodec::SDP_CODEC_TONES /* 110 - telephone-event */};
+ unsigned int numCodecIds = sizeof(codecIds) / sizeof(codecIds[0]);
+
+ // Loop through command line arguments and process them
+ for(int i = 1; i < argc; i++)
+ {
+ Data commandName(argv[i]);
+
+ // Process all commandNames that don't take values
+ if(isEqualNoCase(commandName, "-?") ||
+ isEqualNoCase(commandName, "--?") ||
+ isEqualNoCase(commandName, "--help") ||
+ isEqualNoCase(commandName, "/?"))
+ {
+ cout << "Command line options are:" << endl;
+ cout << " -aa - enable autoanswer" << endl;
+ cout << " -a <IP Address> - bind SIP transports to this IP address" << endl;
+ cout << " -u <SIP URI> - URI of this SIP user" << endl;
+ cout << " -p <password> - SIP password of this this SIP user" << endl;
+ cout << " -nr - no registration, set this to disable registration with SIP Proxy" << endl;
+ cout << " -d <DNS servers> - comma seperated list of DNS servers, overrides OS detected list" << endl;
+ cout << " -sp <port num> - local port number to use for SIP messaging (UDP/TCP)" << endl;
+ cout << " -mp <port num> - local port number to start allocating from for RTP media" << endl;
+#ifdef USE_SSL
+ cout << " -tp <port num> - local port number to use for TLS SIP messaging" << endl;
+ cout << " -td <domain name> - domain name to use for TLS server connections" << endl;
+#endif
+ cout << " -nk - no keepalives, set this to disable sending of keepalives" << endl;
+ cout << " -op <SIP URI> - URI of a proxy server to use a SIP outbound proxy" << endl;
+#ifdef USE_SSL
+ cout << " -sm <Srtp|SrtpReq|SrtpDtls|SrtpDtlsReq> - sets the secure media mode" << endl;
+ cout << " -nm <Bind|UdpAlloc|TcpAlloc|TlsAlloc> - sets the NAT traversal mode" << endl;
+#else
+ cout << " -sm <Srtp|SrtpReq> - sets the secure media mode" << endl;
+ cout << " -nm <Bind|UdpAlloc|TcpAlloc> - sets the NAT traversal mode" << endl;
+#endif
+ cout << " -ns <server:port> - set the hostname and port of the NAT STUN/TURN server" << endl;
+ cout << " -nu <username> - sets the STUN/TURN username to use for NAT server" << endl;
+ cout << " -np <password> - sets the STUN/TURN password to use for NAT server" << endl;
+ cout << " -nl - no local audio support - removed local sound hardware requirement" << endl;
+ cout << " -l <NONE|CRIT|ERR|WARNING|INFO|DEBUG|STACK> - logging level" << endl;
+ cout << endl;
+ cout << "Sample Command line:" << endl;
+ cout << "testUA -a 192.168.1.100 -u sip:1000 at myproxy.com -p 123 -aa" << endl;
+ return 0;
+ }
+ else if(isEqualNoCase(commandName, "-nr"))
+ {
+ registrationDisabled = true;
+ }
+ else if(isEqualNoCase(commandName, "-aa"))
+ {
+ autoAnswerEnabled = true;
+ }
+ else if(isEqualNoCase(commandName, "-nk"))
+ {
+ keepAlivesDisabled = true;
+ }
+ else if(isEqualNoCase(commandName, "-nl"))
+ {
+ localAudioEnabled = false;
+ }
+ else
+ {
+ // Process commands that have values
+ Data commandValue(i+1 < argc ? argv[i+1] : Data::Empty);
+ if(commandValue.empty() || commandValue.at(0) == '-')
+ {
+ cerr << "Invalid command line parameters!" << endl;
+ exit(-1);
+ }
+ i++; // increment argument
+
+ if(isEqualNoCase(commandName, "-a"))
+ {
+ address = commandValue;
+ }
+ else if(isEqualNoCase(commandName, "-u"))
+ {
+ try
+ {
+ NameAddr tempuri(commandValue);
+ uri = tempuri;
+ }
+ catch(resip::BaseException& e)
+ {
+ cerr << "Invalid uri format: " << e << endl;
+ exit(-1);
+ }
+ }
+ else if(isEqualNoCase(commandName, "-p"))
+ {
+ password = commandValue;
+ }
+ else if(isEqualNoCase(commandName, "-d"))
+ {
+ dnsServers = commandValue;
+ }
+ else if(isEqualNoCase(commandName, "-sm"))
+ {
+ if(isEqualNoCase(commandValue, "Srtp"))
+ {
+ secureMediaMode = ConversationProfile::Srtp;
+ }
+ else if(isEqualNoCase(commandValue, "SrtpReq"))
+ {
+ secureMediaMode = ConversationProfile::Srtp;
+ secureMediaRequired = true;
+ }
+#ifdef USE_SSL
+ else if(isEqualNoCase(commandValue, "SrtpDtls"))
+ {
+ secureMediaMode = ConversationProfile::SrtpDtls;
+ }
+ else if(isEqualNoCase(commandValue, "SrtpDtlsReq"))
+ {
+ secureMediaMode = ConversationProfile::SrtpDtls;
+ secureMediaRequired = true;
+ }
+#endif
+ else
+ {
+ cerr << "Invalid Secure Media Mode: " << commandValue << endl;
+ exit(-1);
+ }
+ }
+ else if(isEqualNoCase(commandName, "-nm"))
+ {
+ if(isEqualNoCase(commandValue, "Bind"))
+ {
+ natTraversalMode = ConversationProfile::StunBindDiscovery;
+ }
+ else if(isEqualNoCase(commandValue, "UdpAlloc"))
+ {
+ natTraversalMode = ConversationProfile::TurnUdpAllocation;
+ }
+ else if(isEqualNoCase(commandValue, "TcpAlloc"))
+ {
+ natTraversalMode = ConversationProfile::TurnTcpAllocation;
+ }
+#ifdef USE_SSL
+ else if(isEqualNoCase(commandValue, "TlsAlloc"))
+ {
+ natTraversalMode = ConversationProfile::TurnTlsAllocation;
+ }
+#endif
+ else
+ {
+ cerr << "Invalid NAT Traversal Mode: " << commandValue << endl;
+ exit(-1);
+ }
+ }
+ else if(isEqualNoCase(commandName, "-ns"))
+ {
+ // Read server and port
+ Data natServerAndPort = commandValue;
+ ParseBuffer pb(natServerAndPort);
+ pb.skipWhitespace();
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace, ":"); // white space or ":"
+ Data hostname;
+ pb.data(hostname, start);
+ natTraversalServerHostname = hostname;
+ if(!pb.eof())
+ {
+ pb.skipChar(':');
+ start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace); // white space
+ Data port;
+ pb.data(port, start);
+ natTraversalServerPort = port.convertUnsignedLong();
+ }
+ }
+ else if(isEqualNoCase(commandName, "-nu"))
+ {
+ stunUsername = commandValue;
+ }
+ else if(isEqualNoCase(commandName, "-np"))
+ {
+ stunPassword = commandValue;
+ }
+ else if(isEqualNoCase(commandName, "-sp"))
+ {
+ sipPort = (unsigned short)commandValue.convertUnsignedLong();
+ }
+ else if(isEqualNoCase(commandName, "-mp"))
+ {
+ mediaPortStart = (unsigned short)commandValue.convertUnsignedLong();
+ }
+ else if(isEqualNoCase(commandName, "-tp"))
+ {
+ tlsPort = (unsigned short)commandValue.convertUnsignedLong();
+ }
+ else if(isEqualNoCase(commandName, "-td"))
+ {
+ tlsDomain = commandValue;
+ }
+ else if(isEqualNoCase(commandName, "-op"))
+ {
+ try
+ {
+ NameAddr tempuri(commandValue);
+ outboundProxy = tempuri;
+ }
+ catch(resip::BaseException& e)
+ {
+ cerr << "Invalid outbound proxy uri format: " << e << endl;
+ exit(-1);
+ }
+ }
+ else if(isEqualNoCase(commandName, "-l"))
+ {
+ logLevel = commandValue;
+ }
+ else
+ {
+ cerr << "Invalid command line parameters!" << endl;
+ exit(-1);
+ }
+ }
+ }
+
+ //enableConsoleOutput(TRUE); // Allow sipX console output
+ OsSysLog::initialize(0, "testUA");
+ OsSysLog::setOutputFile(0, "sipXtapilog.txt") ;
+ Log::initialize("Cout", logLevel, "testUA");
+ //UserAgent::setLogLevel(Log::Warning, UserAgent::SubsystemAll);
+ //UserAgent::setLogLevel(Log::Info, UserAgent::SubsystemRecon);
+
+ initNetwork();
+
+ InfoLog( << "testUA settings:");
+ InfoLog( << " No Keepalives = " << (keepAlivesDisabled ? "true" : "false"));
+ InfoLog( << " Autoanswer = " << (autoAnswerEnabled ? "true" : "false"));
+ InfoLog( << " Do not register = " << (registrationDisabled ? "true" : "false"));
+ InfoLog( << " Local IP Address = " << address);
+ InfoLog( << " SIP URI = " << uri);
+ InfoLog( << " SIP Password = " << password);
+ InfoLog( << " Override DNS Servers = " << dnsServers);
+ InfoLog( << " Secure Media Mode = " << secureMediaMode);
+ InfoLog( << " NAT Traversal Mode = " << natTraversalMode);
+ InfoLog( << " NAT Server = " << natTraversalServerHostname << ":" << natTraversalServerPort);
+ InfoLog( << " STUN/TURN user = " << stunUsername);
+ InfoLog( << " STUN/TURN password = " << stunPassword);
+ InfoLog( << " SIP Port = " << sipPort);
+ InfoLog( << " Media Port Range Start = " << mediaPortStart);
+#ifdef USE_SSL
+ InfoLog( << " TLS Port = " << tlsPort);
+ InfoLog( << " TLS Domain = " << tlsDomain);
+#endif
+ InfoLog( << " Outbound Proxy = " << outboundProxy);
+ InfoLog( << " Local Audio Enabled = " << (localAudioEnabled ? "true" : "false"));
+ InfoLog( << " Log Level = " << logLevel);
+
+ InfoLog( << "type help or '?' for list of accepted commands." << endl);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Setup UserAgentMasterProfile
+ //////////////////////////////////////////////////////////////////////////////
+
+ SharedPtr<UserAgentMasterProfile> profile(new UserAgentMasterProfile);
+
+ // Add transports
+ profile->addTransport(UDP, sipPort, V4, address);
+ profile->addTransport(TCP, sipPort, V4, address);
+#ifdef USE_SSL
+ profile->addTransport(TLS, tlsPort, V4, address, tlsDomain);
+#endif
+
+ // The following settings are used to avoid a kernel panic seen on an ARM embedded platform.
+ // The kernel panic happens when either binding a udp socket to port 0 (OS selected),
+ // or calling connect without first binding to a specific port. There is code in the
+ // resip transport selector that uses a utility UDP socket in order to determine
+ // which interface should be used to route to a particular destination. This code calls
+ // connect with no bind. By setting a fixed transport interface here that
+ // code will not be used.
+ // The following line can be safely removed for other platforms
+ //profile->setFixedTransportInterface(address);
+
+ // Settings
+ profile->setDefaultRegistrationTime(3600);
+ profile->setDefaultFrom(uri);
+ profile->setDigestCredential(uri.uri().host(), uri.uri().user(), password);
+
+ // DNS Servers
+ ParseBuffer pb(dnsServers);
+ Data dnsServer;
+ while(!dnsServers.empty() && !pb.eof())
+ {
+ pb.skipWhitespace();
+ const char *start = pb.position();
+ pb.skipToOneOf(ParseBuffer::Whitespace, ";,"); // allow white space
+ pb.data(dnsServer, start);
+ if(DnsUtil::isIpV4Address(dnsServer))
+ {
+ InfoLog( << "Adding DNS Server: " << dnsServer);
+ profile->addAdditionalDnsServer(dnsServer);
+ }
+ else
+ {
+ ErrLog( << "Tried to add dns server, but invalid format: " << dnsServer);
+ }
+ if(!pb.eof())
+ {
+ pb.skipChar();
+ }
+ }
+
+ // Disable Statisitics Manager
+ profile->statisticsManagerEnabled() = false;
+
+ // Add ENUM Suffixes from setting string - use code similar to dns server
+ //profile->addEnumSuffix(enumSuffix);
+
+ if(!keepAlivesDisabled)
+ {
+ profile->setKeepAliveTimeForDatagram(30);
+ profile->setKeepAliveTimeForStream(180);
+ }
+
+ // Support Methods, etc.
+ profile->validateContentEnabled() = false;
+ profile->validateContentLanguageEnabled() = false;
+ profile->validateAcceptEnabled() = false;
+
+ profile->clearSupportedLanguages();
+ profile->addSupportedLanguage(Token("en"));
+
+ profile->clearSupportedMimeTypes();
+ profile->addSupportedMimeType(INVITE, Mime("application", "sdp"));
+ profile->addSupportedMimeType(INVITE, Mime("multipart", "mixed"));
+ profile->addSupportedMimeType(INVITE, Mime("multipart", "signed"));
+ profile->addSupportedMimeType(INVITE, Mime("multipart", "alternative"));
+ profile->addSupportedMimeType(OPTIONS,Mime("application", "sdp"));
+ profile->addSupportedMimeType(OPTIONS,Mime("multipart", "mixed"));
+ profile->addSupportedMimeType(OPTIONS, Mime("multipart", "signed"));
+ profile->addSupportedMimeType(OPTIONS, Mime("multipart", "alternative"));
+ profile->addSupportedMimeType(PRACK, Mime("application", "sdp"));
+ profile->addSupportedMimeType(PRACK, Mime("multipart", "mixed"));
+ profile->addSupportedMimeType(PRACK, Mime("multipart", "signed"));
+ profile->addSupportedMimeType(PRACK, Mime("multipart", "alternative"));
+ profile->addSupportedMimeType(UPDATE, Mime("application", "sdp"));
+ profile->addSupportedMimeType(UPDATE, Mime("multipart", "mixed"));
+ profile->addSupportedMimeType(UPDATE, Mime("multipart", "signed"));
+ profile->addSupportedMimeType(UPDATE, Mime("multipart", "alternative"));
+ profile->addSupportedMimeType(NOTIFY, Mime("message", "sipfrag"));
+
+ profile->clearSupportedMethods();
+ profile->addSupportedMethod(INVITE);
+ profile->addSupportedMethod(ACK);
+ profile->addSupportedMethod(CANCEL);
+ profile->addSupportedMethod(OPTIONS);
+ profile->addSupportedMethod(BYE);
+ profile->addSupportedMethod(REFER);
+ profile->addSupportedMethod(NOTIFY);
+ profile->addSupportedMethod(SUBSCRIBE);
+ profile->addSupportedMethod(UPDATE);
+ profile->addSupportedMethod(PRACK);
+ //profile->addSupportedMethod(INFO);
+ //profile->addSupportedMethod(MESSAGE);
+
+ profile->clearSupportedOptionTags();
+ profile->addSupportedOptionTag(Token(Symbols::Replaces));
+ profile->addSupportedOptionTag(Token(Symbols::Timer));
+ profile->addSupportedOptionTag(Token(Symbols::NoReferSub));
+ profile->addSupportedOptionTag(Token(Symbols::AnswerMode));
+ profile->addSupportedOptionTag(Token(Symbols::TargetDialog));
+ //profile->addSupportedOptionTag(Token(Symbols::C100rel)); // Automatically added by calling setUacReliableProvisionalMode
+
+ profile->setUacReliableProvisionalMode(MasterProfile::Supported);
+
+ profile->clearSupportedSchemes();
+ profile->addSupportedScheme("sip");
+#ifdef USE_SSL
+ profile->addSupportedScheme("sips");
+#endif
+
+ // Have stack add Allow/Supported/Accept headers to INVITE dialog establishment messages
+ profile->clearAdvertisedCapabilities(); // Remove Profile Defaults, then add our preferences
+ profile->addAdvertisedCapability(Headers::Allow);
+ //profile->addAdvertisedCapability(Headers::AcceptEncoding); // This can be misleading - it might specify what is expected in response
+ profile->addAdvertisedCapability(Headers::AcceptLanguage);
+ profile->addAdvertisedCapability(Headers::Supported);
+ profile->setMethodsParamEnabled(true);
+
+ //profile->setOverrideHostAndPort(mContact);
+ if(!outboundProxy.uri().host().empty())
+ {
+ profile->setOutboundProxy(outboundProxy.uri());
+ }
+
+ profile->setUserAgent("ConversationManager/TestUA");
+ profile->rtpPortRangeMin() = mediaPortStart;
+ profile->rtpPortRangeMax() = mediaPortStart + 101; // Allows 100 media streams
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Setup ConversationProfile
+ //////////////////////////////////////////////////////////////////////////////
+
+ conversationProfile = SharedPtr<ConversationProfile>(new ConversationProfile(profile));
+ if(uri.uri().user() != "noreg" && !registrationDisabled)
+ {
+ conversationProfile->setDefaultRegistrationTime(3600);
+ }
+ else
+ {
+ conversationProfile->setDefaultRegistrationTime(0);
+ }
+ conversationProfile->setDefaultRegistrationRetryTime(120); // 2 mins
+ conversationProfile->setDefaultFrom(uri);
+ conversationProfile->setDigestCredential(uri.uri().host(), uri.uri().user(), password);
+
+#if 0 // Now auto-built
+
+ // Create Session Capabilities and assign to coversation Profile
+ // Note: port, sessionId and version will be replaced in actual offer/answer int port = 16384;
+ // Build s=, o=, t=, and c= lines
+ SdpContents::Session::Origin origin("-", 0 /* sessionId */, 0 /* version */, SdpContents::IP4, address); // o=
+ SdpContents::Session session(0, origin, "-" /* s= */);
+ session.connection() = SdpContents::Session::Connection(SdpContents::IP4, address); // c=
+ session.addTime(SdpContents::Session::Time(0, 0));
+
+ // Build Codecs and media offering
+ SdpContents::Session::Medium medium("audio", port, 1, "RTP/AVP");
+ SdpContents::Session::Codec g711ucodec("PCMU", 8000);
+ g711ucodec.payloadType() = 0; /* RFC3551 */ ;
+ medium.addCodec(g711ucodec);
+ SdpContents::Session::Codec g711acodec("PCMA", 8000);
+ g711acodec.payloadType() = 8; /* RFC3551 */ ;
+ medium.addCodec(g711acodec);
+ SdpContents::Session::Codec speexCodec("SPEEX", 8000);
+ speexCodec.payloadType() = 110;
+ speexCodec.parameters() = Data("mode=3");
+ medium.addCodec(speexCodec);
+ SdpContents::Session::Codec gsmCodec("GSM", 8000);
+ gsmCodec.payloadType() = 3; /* RFC3551 */ ;
+ medium.addCodec(gsmCodec);
+ medium.addAttribute("ptime", Data(20)); // 20 ms of speech per frame (note G711 has 10ms samples, so this is 2 samples per frame)
+ medium.addAttribute("sendrecv");
+
+ SdpContents::Session::Codec toneCodec("telephone-event", 8000);
+ toneCodec.payloadType() = 102;
+ toneCodec.parameters() = Data("0-15");
+ medium.addCodec(toneCodec);
+ session.addMedium(medium);
+
+ conversationProfile->sessionCaps().session() = session;
+#endif
+
+ // Setup NatTraversal Settings
+ conversationProfile->natTraversalMode() = natTraversalMode;
+ conversationProfile->natTraversalServerHostname() = natTraversalServerHostname;
+ conversationProfile->natTraversalServerPort() = natTraversalServerPort;
+ conversationProfile->stunUsername() = stunUsername;
+ conversationProfile->stunPassword() = stunPassword;
+
+ // Secure Media Settings
+ conversationProfile->secureMediaMode() = secureMediaMode;
+ conversationProfile->secureMediaRequired() = secureMediaRequired;
+ conversationProfile->secureMediaDefaultCryptoSuite() = ConversationProfile::SRTP_AES_CM_128_HMAC_SHA1_80;
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Create ConverationManager and UserAgent
+ //////////////////////////////////////////////////////////////////////////////
+ {
+ MyConversationManager myConversationManager(localAudioEnabled);
+ MyUserAgent ua(&myConversationManager, profile);
+ myConversationManager.buildSessionCapabilities(address, numCodecIds, codecIds, conversationProfile->sessionCaps());
+ ua.addConversationProfile(conversationProfile);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Startup and run...
+ //////////////////////////////////////////////////////////////////////////////
+
+ ua.startup();
+ myConversationManager.startup();
+
+ //ua.createSubscription("message-summary", uri, 120, Mime("application", "simple-message-summary")); // thread safe
+
+ int input;
+ while(true)
+ {
+ ua.process(50);
+ while(_kbhit() != 0)
+ {
+#ifdef WIN32
+ input = _getch();
+ processKeyboard(input, myConversationManager, ua);
+#else
+ input = fgetc(stdin);
+ fflush(stdin);
+ //cout << "input: " << input << endl;
+ processKeyboard(input, myConversationManager, ua);
+#endif
+ }
+ if(finished) break;
+ }
+
+ ua.shutdown();
+ }
+ InfoLog(<< "testUA is shutdown.");
+ OsSysLog::shutdown();
+ sleepSeconds(2);
+
+#if defined(WIN32) && defined(_DEBUG) && defined(LEAK_CHECK)
+} // end FML scope
+#endif
+}
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, Plantronics, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Plantronics nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/resip/recon/test/testUA_10_0.vcxproj b/resip/recon/test/testUA_10_0.vcxproj
new file mode 100644
index 0000000..5e60567
--- /dev/null
+++ b/resip/recon/test/testUA_10_0.vcxproj
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>testUA</ProjectName>
+ <ProjectGuid>{16CD976A-5D3B-4329-88BA-A32560CDFCC8}</ProjectGuid>
+ <RootNamespace>testUA</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)/../../contrib\pcre;$(IncludePath)</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)/../../contrib\pcre;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-testUA.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)/../;$(ProjectDir)/../../../;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface;$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include;$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include;$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include;$(ProjectDir)/../../../reTurn;$(ProjectDir)/../../../contrib/asio;$(ProjectDir)/../../../contrib/boost_1_34_1;$(ProjectDir)/../../../contrib/openssl/include;$(ProjectDir)/../../../contrib/srtp/include;$(ProjectDir)/../../../contrib/srtp/crypto/include;$(ProjectDir)/../../../reflow;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(IntDir)testUA.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;iphlpapi.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib;$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib;$(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib;winmm.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testUA.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testUA.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-testUA.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>$(ProjectDir)/../;$(ProjectDir)/../../../;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface;$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include;$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include;$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include;$(ProjectDir)/../../../reTurn;$(ProjectDir)/../../../contrib/asio;$(ProjectDir)/../../../contrib/boost_1_34_1;$(ProjectDir)/../../../contrib/openssl/inc32;$(ProjectDir)/../../../contrib/srtp/include;$(ProjectDir)/../../../contrib/srtp/crypto/include;$(ProjectDir)/../../../reflow;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(IntDir)testUA.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;iphlpapi.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib;$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib;$(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib;winmm.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testUA.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testUA.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="testUA.cxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="playback_prompt.hxx" />
+ <ClInclude Include="record_prompt.hxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="testua_readme.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\win32\VS2003\libspeexdsp\libspeexdsp.vcxproj">
+ <Project>{03207781-0d1c-4db3-a71d-45c608f28dbd}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\win32\VS2003\libspeex\libspeex.vcxproj">
+ <Project>{e972c52f-9e85-4d65-b19c-031e511e9db4}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgilbc\plgilbc-msvc8.vcxproj">
+ <Project>{6442c7de-e500-4ba2-b821-98092f1edcaf}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgl16\plgl16-msvc8.vcxproj">
+ <Project>{82a7c86a-5f71-47c3-a74d-54c48c6cd5ee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgpcmapcmu\plgpcmapcmu-msvc8.vcxproj">
+ <Project>{a9c94d26-c90d-4860-8195-56929e893757}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgspeex\plgspeex-msvc8.vcxproj">
+ <Project>{4f7fda11-42a4-4556-a631-15aa785cd1c1}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgtones\plgtones-msvc8.vcxproj">
+ <Project>{f3bca14e-f24d-4570-833e-8c20c4c393f7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\contrib\pcre\pcre_10_0.vcxproj">
+ <Project>{b933f895-8efb-4fdd-a46d-09b8c00d1d26}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\contrib\srtp\srtp10.vcxproj">
+ <Project>{eef031cb-fed8-451e-a471-91ec8d4f6750}</Project>
+ <Private>true</Private>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\reflow\reflow_10_0.vcxproj">
+ <Project>{d2ab531b-86ac-43dd-a330-9809b4f1bb53}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\reTurn\client\reTurnClient_10_0.vcxproj">
+ <Project>{67b5906c-5c9d-4d09-ac7e-af71d72175f8}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\rutil\rutil_10_0.vcxproj">
+ <Project>{3d0e5ceb-93dc-4fdb-918b-d08fa369e106}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\dum\dum_10_0.vcxproj">
+ <Project>{31b0654f-e08e-405f-909f-80f86cb14b9d}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\stack\resiprocate_10_0.vcxproj">
+ <Project>{2a8be839-6466-4001-b224-8f1c3168d04a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\recon_10_0.vcxproj">
+ <Project>{16cd976a-5d3b-4329-88ba-a32560cdfcc7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/resip/recon/test/testUA_10_0.vcxproj.filters b/resip/recon/test/testUA_10_0.vcxproj.filters
new file mode 100644
index 0000000..33b6ada
--- /dev/null
+++ b/resip/recon/test/testUA_10_0.vcxproj.filters
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{c8e86bbb-b736-45e4-956f-b70785595cca}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{a0541208-c98e-42cc-a8d0-5e39b0717417}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{bc83dc52-6802-41fe-ade2-9f97deb9151b}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="testUA.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="playback_prompt.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="record_prompt.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="testua_readme.txt" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/resip/recon/test/testUA_8_0.vcproj b/resip/recon/test/testUA_8_0.vcproj
new file mode 100644
index 0000000..b8d9fbd
--- /dev/null
+++ b/resip/recon/test/testUA_8_0.vcproj
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="testUA"
+ ProjectGUID="{16CD976A-5D3B-4329-88BA-A32560CDFCC8}"
+ RootNamespace="testUA"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-testUA.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/testUA.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/testUA.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testUA.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-testUA.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\testUA.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/testUA.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testUA.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath=".\testUA.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ <File
+ RelativePath=".\playback_prompt.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\record_prompt.hxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath=".\testua_readme.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/resip/recon/test/testUA_9_0.vcproj b/resip/recon/test/testUA_9_0.vcproj
new file mode 100644
index 0000000..0ddd56c
--- /dev/null
+++ b/resip/recon/test/testUA_9_0.vcproj
@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="testUA"
+ ProjectGUID="{16CD976A-5D3B-4329-88BA-A32560CDFCC8}"
+ RootNamespace="testUA"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-testUA.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/testUA.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/testUA.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testUA.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-testUA.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\testUA.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/testUA.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testUA.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-testUA.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/testUA.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/testUA.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testUA.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-testUA.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\testUA.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/testUA.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testUA.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath=".\testUA.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ <File
+ RelativePath=".\playback_prompt.hxx"
+ >
+ </File>
+ <File
+ RelativePath=".\record_prompt.hxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath=".\testua_readme.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/resip/recon/test/testua_readme.txt b/resip/recon/test/testua_readme.txt
new file mode 100644
index 0000000..b9e22e9
--- /dev/null
+++ b/resip/recon/test/testua_readme.txt
@@ -0,0 +1,325 @@
+User Agent Tester (testUA) Instructions
+=======================================
+
+Author: Scott Godin (s g o d i n a t s i p s p e c t r u m d o t c o m)
+
+TestUA is a test console for the recon (Conversation Manager) API.
+
+
+Backgound Information on Conversation Manager
+---------------------------------------------
+
+The Conversation Manager is a VoIP API that allows conversations and participants
+to be created. Participants can then be placed into conversations. In general
+all participants belonging to the same conversation can be heard and hear each
+other. A participants contribution level to a particular conversation can be
+modified such that they appear quiter or louder to other participants.
+
+There are three types of participants:
+1. Local participant - this participant type consists of the default local speaker and
+ microphone of the computer that is running the testUA console. Local
+ participants are always only explicitly destroyed.
+2. Media participant - this participant type consists of an audio file, audio stream,
+ or tone played out. Media participants are destroyed when the file or tone output is
+ complete.
+3. Remote Participant - this participant type uses audio from an external source. The
+ current implementation uses SIP to create/connect to remote participants. Remote
+ participants are destroyed by the API user, or a "hangup" signal from the
+ remote party.
+
+A typical phone conversation consists of 3 components: 1 conversation, 1 local participant
+and 1 remote participant.
+
+
+
+Startup Command Line Parameters
+-------------------------------
+Command line options are:
+ -?, --?, --help, /? - display command line options
+
+ -aa - enable autoanswer
+
+ Enabling autoanswer will cause testUA to automatically answer any inbound SIP calls
+ and place them in the lowest numbered conversation currently created.
+
+ -a <IP Address> - bind SIP transports to this IP address
+
+ In general the IP address to bind to is queried from the host OS. This switch allows
+ specification of the IP address for OS's that cannot be queried, or for machines that
+ have mulitple NICs.
+
+ -u <SIP URI> - URI of this SIP user
+
+ This option is used to specify the SIP URI for this instance of testUA. testUA uses
+ this setting (-ip is not specified) in order to find the regisration server. If
+ nothing is specified, then the default of sip:noreg@<ipaddress> will be used.
+
+ -p <password> - SIP password of this this SIP user
+
+ Use this switch in cases where the proxy digest challenges sip messaging.
+
+ -nr - no registration, set this to disable registration with SIP Proxy
+
+ By default, if a SIP uri is specified, testUA will attempt to register with it. Use
+ this switch to disable this.
+
+ -d <DNS servers> - comma seperated list of DNS servers, overrides OS detected list
+
+ By default, testUA will query the OS for a list of DNS servers. Use this option in
+ cases where the OS does not return any, or the correct values.
+
+ -sp <port num> - local port number to use for SIP messaging (UDP/TCP)
+
+ By default, testUA will use port 5062 for SIP messaging, use this switch to specify
+ something different.
+
+ -mp <port num> - local port number to start allocating from for RTP media
+
+ By default, testUA will use media ports starting at 17384, use this switch to specify
+ something different.
+
+ -tp <port num> - local port number to use for TLS SIP messaging
+
+ By default, testUA will listen for TLS connections on port 5063, use this switch to
+ specify something different. Note SIP certificiates must be present in executable
+ directory for windows hosts and ~/.sipCerts directory on linux hosts.
+
+ -td <domain name> - domain name to use for TLS server connections
+
+ By default, testUA will query the OS for a local hostname for TLS, use this switch
+ to override the OS queried result.
+
+ -nk - no keepalives, set this to disable sending of keepalives
+
+ By default, testUA will enable UDP CRLF keepalives every 30 seconds and TCP keepalives
+ every 180 seconds. Use this switch to disable CRLF keepalives.
+
+ -op <SIP URI> - URI of a proxy server to use a SIP outbound proxy
+
+ By default testUA does not use an outbound proxy. Use this switch to route all
+ outbound, out-of-dialog requests through a fixed proxy despite the destination URI.
+
+ -sm <Srtp|SrtpReq|SrtpDtls|SrtpDtlsReq> - sets the secure media mode
+
+ By default, no secure media is offered in outbound SIP requests. Use this option to
+ change that behaviour. Note: Inbound secure media is always accepted.
+ Srtp - use SRTP with keying outside of media stream (SDES key negotiation)
+ via SDP. RTP/AVP profile is used, and transport capability of RTP/SAVP is
+ listed, in order to implement best-effort SRTP. Note: The crypo attribute
+ is provided outside of the SDP capability, as this is required by SNOM for
+ optional SRTP offers.
+ SrtpReq - use SRTP with keying outside of media stream (SDES key negotiation)
+ via SDP. RTP/SAVP profile is used to indicate that SRTP is mandatory.
+ SrtpDtls - use SRTP with DTLS key negotiation. RTP/AVP is use as a default, and a
+ transport capability of UDP/TLS/RTP/SAVP is listed, in order to impelement
+ best-effort DTLS-SRTP.
+ SrtpDtlsReq - use SRTP with DTLS key negotiation. UDP/TLS/RTP/SAVP profile is used to
+ indicate that Dtls-Srtp use is mandatory.
+
+ -nm <Bind|UdpAlloc|TcpAlloc|TlsAlloc> - sets the NAT traversal mode
+
+ By default, no NAT traversal strategies are used. Use this switch to specify one:
+ Bind - use Binding discovery on a STUN server, to discover and use "public" address
+ and port in SDP negotiations
+ UdpAlloc - Use a TURN server as a media relay. Communicate to the TURN
+ server over UDP and Allocate a UDP relay address and port to
+ use in SDP negotiations
+ TcpAlloc - Use a TURN server as a media relay. Communicate to the TURN
+ server over TCP and Allocate a UDP relay address and port to
+ use in SDP negotiations
+ TlsAlloc - Use a TURN server as a media relay. Communicate to the TURN
+ server over TLS and Allocate a UDP relay address and port to
+ use in SDP negotiations
+
+ -ns <server:port> - set the hostname and port of the NAT STUN/TURN server
+
+ If -nm switch is used then you MUST specify the STUN/TURN server name/address and port.
+
+ -nu <username> - sets the STUN/TURN username to use for NAT server
+
+ Use this option if the STUN/TURN server requires authentication.
+
+ -np <password> - sets the STUN/TURN password to use for NAT server
+
+ Use this option if the STUN/TURN server requires authentication.
+
+ -nl - disables local audio support - removes requirement for local audio hardware.
+ Note: if local audio support is disabled, then local participants cannot
+ be created.
+
+ -l <NONE|CRIT|ERR|WARNING|INFO|DEBUG|STACK> - logging level
+
+ By default the logging level is INFO, use this switch to change it.
+
+
+Sample Command line:
+ testUA -a 192.168.1.100 -u sip:1000 at myproxy.com -p 123 -aa
+
+
+
+Console Command Reference
+-------------------------
+Once the console is started, testUA will automatically register with a proxy server,
+if required.
+
+When starting testUA, one Conversation (Handle=1) and one local participant (Handle=1) is
+automatically created for convienience.
+
+The console then accepts the following commands:
+createConversation: <'createconv'|'cc'>
+ Create a new empty conversation.
+
+destroyConversation: <'destroyconv'|'dc'> <convHandle>
+ Destroys conversation and ends all participants that solely belong to this conversation.
+
+joinConversation: <'joinconv'|'jc'> <sourceConvHandle> <destConvHandle>
+ Add all participants from source conversation to destination conversation
+ and destroys source conversation.
+
+createLocalParticipant: <'createlocal'|'cl'>
+ Creates a new local participant.
+
+createRemoteParticipant: <'createremote'|'crp'> <convHandle> <destURI> [<'manual'>]
+ (last arg is fork select mode, 'auto' is default)
+ Creates a new remote participant (outbound SIP call) in conversation specified.
+ Dest URI must be provided. When ForkSelectMode is set to auto the conversation
+ manager will automatically dispose of any related conversations that were created,
+ due to forking.
+
+createMediaResourceParticipant: <'createmedia'|'cmp'> <convHandle> <mediaURL> [<durationMs>]
+ Creates a new media resource participant in the specified conversation. Media is played
+ from a source specified by the url and may be a local audio file, audio file fetched via
+ HTTP or tones. The URL can contain parameters that specify properties of the media
+ playback, such as number of repeats.
+ Media Urls are of the following format:
+ "tone"|"file":<tone|filepath>[;duration=<duration>][;local-only]
+ [;remote-only][;repeat][;prefetch]
+ Tones can be any DTMF digit 0-9,*,#,A-D or a special tone:
+ dialtone, busy, fastbusy, ringback, ring, backspace, callwaiting, holding, or
+ loudfastbusy
+ Note: 'repeat' option only makes sense for file and http URLs
+ Note2: 'prefetch' option only makes sense for http URLs
+ Note3: audio files may be AU, WAV or RAW formats. Audiofiles should be 16bit mono,
+ 8khz, PCM to avoid runtime conversion.
+
+destroyParticipant: <'destroypart'|'dp'> <parthandle>
+ Ends connections to the participant and removes it from all active conversations.
+
+addPartcipant: <'addpart'|'ap'> <convHandle> <partHandle>
+ Adds a participant to an existing conversation.
+
+removePartcipant: <'removepart'|'rp'> <convHandle> <partHandle>
+ Removes a participant from a conversation. If the participant no longer exists in
+ any conversation, then they are destroyed (local participants exempt). For a remote
+ participant this means the call will be released.
+
+moveParticipant: <'movepart'|'mp'> <partHandle> <srcConvHandle> <dstConvHandle>
+ Removes participant from src conversation and adds them to the dst conversation.
+
+modifyParticipantContribution: <'partcontrib'|'pc'> <convHandle> <partHandle> <inputGain>
+ <outputGain> (gain in percentage)
+ Sets a participants input and output gain towards the specified conversation.
+
+outputBridgeMatrix: <'bridgematrix'|'bm'>
+ Outputs the sipX mixing bridge matrix for debugging purposes.
+
+alertPartcipant: <'alert'|'al'> <partHandle> [<'noearly'>]
+ (last arg is early flag, enabled by default)
+ Sends a 180 response to the far end. If noearly is enabled then SDP is not sent in the
+ response.
+
+answerParticipant: <'answer'|'an'> <partHandle>
+ Sends a 200 response to the far end.
+
+rejectParticipant: <'reject'|'rj'> <partHandle> [<statusCode>]
+ Sends the specied response code to the far end. (default status code is 486)
+
+redirectPartcipant: <'redirect'|'rd'> <partHandle> <destURI>
+ If unanswered - sends a 302 response to the far end with the destURI in the
+ contact header. Otherwise sends a REFER request to the far end.
+
+redirectToPartcipant: <'redirectTo'|'rt'> <partHandle> <destPartHandle>
+ Sends a REFER request to the far end with a 'replaces' header corresponding to the
+ partHandle specified.
+
+setSpeakerVolume: <'volume'|'sv'> <volume>
+setMicrophoneGain: <'gain'|'sg'> <gain>
+muteMicrophone: <'mute'|'mm'> <'0'|'1'> (1 to enable/mute)
+enableEchoCancel: <'echocancel'|'aec'> <'0'|'1'> (1 to enable)
+enableAutoGainControl: <'autogain'|'agc'> <'0'|'1'> (1 to enable)
+enableNoiseReduction: <'noisereduction'|'nr'> <'0'|'1'> (1 to enable)
+
+createSubscription: <'subscribe'|'cs'> <eventType> <targetUri> <subTime>
+ <mimeType> <mimeSubType>
+ Creates a SIP subscription to the targetURI of the corresponding eventType.
+ Expected mimeType and subType must be specified.
+
+destroySubscription: <'destsub'|'ds'> <subHandle>
+ Unsubscribes an existing subscription.
+
+setAutoAnswer <'autoans'|'aa'> <'0'|'1'> (1 to enable (default)
+ Enable this to have testUA automatically answer incoming calls and add to the
+ lowest numbered created conversation.
+
+setCodecs <'setcodecs'|'sc'> <codecId>[,<codecId>]+ (comma separated list)
+ Changes the default codec list/order. Note a codec plugin must have been
+ present at startup time, in order to use that codec. Unknown id's are
+ ignored. Default is: 0,8,96,98,99,108,97,3,109
+ Acceptable sipX codec Ids are:
+ 0 - G.711 mu-law
+ 3 - GSM codec
+ 8 - G.711 a-law
+ 96 - Speex NB, 8,000bps
+ 97 - Speex NB, 5,950bps
+ 98 - Speex NB, 15,000bps
+ 99 - Speex NB, 24,600bps
+ 108 - Internet Low Bit Rate Codec - iLBC (RFC3951)
+ 109 - AVT/DTMF Tones, RFC 2833
+
+setSecureMediaMode <'securemedia'|'sm'> <'None'|'Srtp'|'SrtpReq'|'SrtpDtls'|'SrtpDtlsReq'>
+ Allows changing the secure media mode at runtime. Controls what is present
+ for secure media in our SDP offers. Note: Inbound secure media is always accepted.
+ Srtp - use SRTP with keying outside of media stream (SDES key negotiation)
+ via SDP. RTP/AVP profile is used, and transport capability of RTP/SAVP is
+ listed, in order to implement best-effort SRTP. Note: The crypo attribute
+ is provided outside of the SDP capability, as this is required by SNOM for
+ optional SRTP offers.
+ SrtpReq - use SRTP with keying outside of media stream (SDES key negotiation)
+ via SDP. RTP/SAVP profile is used to indicate that SRTP is mandatory.
+ SrtpDtls - use SRTP with DTLS key negotiation. RTP/AVP is use as a default, and a
+ transport capability of UDP/TLS/RTP/SAVP is listed, in order to impelement
+ best-effort DTLS-SRTP.
+ SrtpDtlsReq - use SRTP with DTLS key negotiation. UDP/TLS/RTP/SAVP profile is used to
+ indicate that Dtls-Srtp use is mandatory.
+
+setNATTraversalMode <'natmode'|'nm'> <'None'|'Bind'|'UdpAlloc'|'TcpAlloc'|'TlsAlloc'>
+ Allows changing the NAT traversal mode at runtime.
+ Bind - use Binding discovery on a STUN server, to discover and use "public" address
+ and port in SDP negotiations
+ UdpAlloc - Use a TURN server as a media relay. Communicate to the TURN
+ server over UDP and Allocate a UDP relay address and port to
+ use in SDP negotiations
+ TcpAlloc - Use a TURN server as a media relay. Communicate to the TURN
+ server over TCP and Allocate a UDP relay address and port to
+ use in SDP negotiations
+ TlsAlloc - Use a TURN server as a media relay. Communicate to the TURN
+ server over TLS and Allocate a UDP relay address and port to
+ use in SDP negotiations
+
+setNATTraversalServer <'natserver'|'ns'> <server:port>
+ Allows changing the STUN/TURN server hostname and port at runtime.
+
+setNATUsername <'natuser'|'nu'> <username>
+ Allows changing the STUN/TURN username at runtime.
+
+setNATPassword <'natpwd'|'np'> <password>
+ Allows chaning the STUN/TURN password at runtime.
+
+startApplicationTimer: <'starttimer'|'st'> <timerId> <durationMs> <seqNo>
+ Test interface for application time API.
+
+displayInfo: <'info'|'i'>
+ Display information about all of the currently created conversation handles, and
+ participant handles.
+
+exitProgram: <'exit'|'quit'|'q'>
diff --git a/resip/recon/test/unitTests.cxx b/resip/recon/test/unitTests.cxx
new file mode 100644
index 0000000..bf09280
--- /dev/null
+++ b/resip/recon/test/unitTests.cxx
@@ -0,0 +1,849 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "UserAgent.hxx"
+#include "ReconSubsystem.hxx"
+
+#include <signal.h>
+#include "rutil/Log.hxx"
+#include "rutil/Logger.hxx"
+#include "rutil/DnsUtil.hxx"
+#include <rutil/WinLeakCheck.hxx>
+
+#ifdef WIN32
+extern int sdpTests(void);
+#endif
+
+///////////////////////////////////////////////////////////////////////////
+// SCENARIOS UNDER TEST
+//
+// Scenario 1: Simple call: Alice -> Bob
+//
+// Alice Bob Callback Sequence
+// -------------------------- ------------------------ ------------------
+// createConversation
+// createLocalParticipant
+// addParticipant
+// createRemoteParticipant
+// <-onIncomingCall 1
+// alertParticpant
+// <-onParticipantAlerting 2
+// createConversation
+// addParticipant
+// answerParticipant
+// <-onParticpantConnected 3
+// destroyConversation
+// <-onParticipantTerminated 4
+// <-onParticipantTerminated 5
+//
+//
+// Scenario 2: Call Rejection: Bob -> Alice
+//
+// Alice Bob Callback Sequence
+// -------------------------- ------------------------ ------------------
+// createConversation
+// createRemoteParticipant
+// <-onIncomingCall 1
+// rejectParticpant
+// <-onParticipantTerminated 2
+// <-onParticipantTerminated 3
+//
+//
+// Scenario 3: Call Redirection: Bob -> Alice
+//
+// Alice Bob Callback Sequence
+// -------------------------- ------------------------ ------------------
+// createConversation
+// createRemoteParticipant
+// <-onIncomingCall 1
+// redirectParticpant
+// <-onParticipantTerminated 2
+// <-onIncomingCall 3
+// rejectParticpant
+// <-onParticipantTerminated 4
+// <-onParticipantTerminated 5
+//
+//
+// Scenario 4: Call Hold/Transfer: Bob -> Alice
+//
+// Alice Bob Callback Sequence
+// -------------------------- ------------------------ ------------------
+// createConversation
+// createLocalPartcipant
+// addPartcipant
+// createRemoteParticipant
+// <-onIncomingCall 1
+// createConversation
+// addParticipant
+// alertParticpant(early)
+// <-onParticipantAlerting 2
+// answerParticipant
+// <-onParticpantConnected 3
+// removeParticipant(local/hold)
+// redirectParticipant to bad dest
+// call failure (408)
+// <-onParticipantRedirectFailure 4
+// destroyParticipant
+// <-onParticipantTerminated 5
+// <-onParticipantTerminated 6
+//
+///////////////////////////////////////////////////////////////////////////
+
+using namespace recon;
+using namespace resip;
+using namespace std;
+
+unsigned int SCENARIO = 1;
+unsigned int LAST_SCENARIO = 4;
+unsigned int CALLBACK_SEQUENCE = 1;
+
+NameAddr aliceUri("sip:alice at 127.0.0.1:32543");
+NameAddr bobUri("sip:bob at 127.0.0.1:32544");
+
+//#define LOG_LEVEL resip::Log::Info
+#define LOG_LEVEL resip::Log::Warning
+#define MARKER cout << "**** SCENARIO " << SCENARIO << " CALLBACK_SEQUENCE " << CALLBACK_SEQUENCE-1 << " passed! ****" << endl
+
+#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
+
+void sleepSeconds(unsigned int seconds)
+{
+#ifdef WIN32
+ Sleep(seconds*1000);
+#else
+ sleep(seconds);
+#endif
+}
+
+static bool finished = false;
+
+static void
+signalHandler(int signo)
+{
+ std::cerr << "Shutting down" << endl;
+ finished = true;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// ALICE
+///////////////////////////////////////////////////////////////////////////////
+class AliceConversationManager : public ConversationManager
+{
+public:
+ AliceConversationManager(ConversationManager::MediaInterfaceMode mode) : ConversationManager(true, mode)
+ {
+ mLogPrefix = "Alice: ";
+ };
+
+ virtual ConversationHandle createConversation()
+ {
+ ConversationHandle convHandle = ConversationManager::createConversation();
+ mConvHandles.push_back(convHandle);
+ return convHandle;
+ }
+
+ virtual void startup()
+ {
+ ConversationHandle convHandle = createConversation();
+ mLocalParticipant = createLocalParticipant();
+ addParticipant(convHandle, mLocalParticipant);
+ createRemoteParticipant(convHandle, bobUri, ConversationManager::ForkSelectAutomatic);
+ }
+
+ virtual void onConversationDestroyed(ConversationHandle convHandle)
+ {
+ InfoLog(<< mLogPrefix << "onConversationDestroyed: handle=" << convHandle);
+ }
+
+ virtual void onParticipantDestroyed(ParticipantHandle partHandle)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantDestroyed: handle=" << partHandle);
+ }
+
+ virtual void onApplicationTimer(unsigned int id, unsigned int durationMs, unsigned int seq)
+ {
+ InfoLog(<< mLogPrefix << "onApplicationTimeout: id=" << id << " dur=" << durationMs << " seq=" << seq);
+ }
+
+ virtual void onIncomingParticipant(ParticipantHandle partHandle, const SipMessage& msg, bool autoAnswer, ConversationProfile& conversationProfile)
+ {
+ InfoLog(<< mLogPrefix << "onIncomingParticipant: handle=" << partHandle << " msg=" << msg.brief());
+ switch(SCENARIO)
+ {
+ case 2:
+ assert(CALLBACK_SEQUENCE++ == 1);
+ assert(partHandle == 3);
+ assert(autoAnswer == false);
+ MARKER;
+ rejectParticipant(partHandle, 486);
+ break;
+ case 3:
+ assert(CALLBACK_SEQUENCE == 1 || CALLBACK_SEQUENCE == 3);
+ CALLBACK_SEQUENCE++;
+ if(CALLBACK_SEQUENCE-1 == 1)
+ {
+ assert(partHandle == 4);
+ assert(autoAnswer == false);
+ MARKER;
+ redirectParticipant(partHandle, aliceUri);
+ }
+ else
+ {
+ assert(partHandle == 5);
+ assert(autoAnswer == false);
+ MARKER;
+ rejectParticipant(partHandle, 404);
+ }
+ break;
+ case 4:
+ assert(CALLBACK_SEQUENCE++ == 1);
+ assert(partHandle == 6);
+ assert(autoAnswer == false);
+ MARKER;
+ {
+ ConversationHandle convHandle = createConversation();
+ addParticipant(convHandle, partHandle);
+ }
+ alertParticipant(partHandle, true);
+ answerParticipant(partHandle);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onRequestOutgoingParticipant(ParticipantHandle partHandle, const SipMessage& msg, ConversationProfile& conversationProfile)
+ {
+ InfoLog(<< mLogPrefix << "onRequestOutgoingParticipant: handle=" << partHandle << " msg=" << msg.brief());
+ }
+
+ virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantTerminated: handle=" << partHandle << " status=" << statusCode);
+
+ switch(SCENARIO)
+ {
+ case 1:
+ assert(CALLBACK_SEQUENCE++ == 4);
+ assert(partHandle == 2); // Note: LocalParticipant is part handle 1, remote is 2
+ assert(statusCode == 0);
+ MARKER;
+ break;
+ case 2:
+ assert(CALLBACK_SEQUENCE++ == 2);
+ assert(partHandle == 3);
+ assert(statusCode == 0);
+ MARKER;
+ break;
+ case 3:
+ assert(CALLBACK_SEQUENCE == 2 || CALLBACK_SEQUENCE == 4);
+ CALLBACK_SEQUENCE++;
+ if(CALLBACK_SEQUENCE-1 == 2)
+ {
+ assert(partHandle == 4);
+ assert(statusCode == 0);
+ MARKER;
+ }
+ else
+ {
+ assert(partHandle == 5);
+ assert(statusCode == 0);
+ MARKER;
+ }
+ break;
+ case 4:
+ assert(CALLBACK_SEQUENCE++ == 6);
+ assert(partHandle == 6);
+ assert(statusCode == 0);
+ MARKER;
+ break;
+ default:
+ assert(false);
+ break;
+ }
+
+ // Destroy all conversations
+ std::list<ConversationHandle>::iterator it;
+ for(it = mConvHandles.begin(); it != mConvHandles.end(); it++)
+ {
+ destroyConversation(*it);
+ }
+ mConvHandles.clear();
+ }
+
+ virtual void onParticipantProceeding(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantProceeding: handle=" << partHandle << " msg=" << msg.brief());
+ }
+
+ virtual void onRelatedConversation(ConversationHandle relatedConvHandle, ParticipantHandle relatedPartHandle,
+ ConversationHandle origConvHandle, ParticipantHandle origPartHandle)
+ {
+ InfoLog(<< mLogPrefix << "onRelatedConversation: relatedConvHandle=" << relatedConvHandle << " relatedPartHandle=" << relatedPartHandle
+ << " origConvHandle=" << origConvHandle << " origPartHandle=" << origPartHandle);
+ mConvHandles.push_back(relatedConvHandle);
+ }
+
+ virtual void onParticipantAlerting(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantAlerting: handle=" << partHandle << " msg=" << msg.brief());
+ switch(SCENARIO)
+ {
+ case 1:
+ assert(CALLBACK_SEQUENCE++ == 2);
+ assert(partHandle == 2); // Note: LocalParticipant is part handle 1, remote is 2
+ MARKER;
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onParticipantConnected(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantConnected: handle=" << partHandle << " msg=" << msg.brief());
+ switch(SCENARIO)
+ {
+ case 1:
+ assert(CALLBACK_SEQUENCE++ == 3);
+ assert(partHandle == 2); // Note: LocalParticipant is part handle 1, remote is 2
+ MARKER;
+ {
+ // Destroy all conversations
+ std::list<ConversationHandle>::iterator it;
+ for(it = mConvHandles.begin(); it != mConvHandles.end(); it++)
+ {
+ destroyConversation(*it);
+ }
+ mConvHandles.clear();
+ }
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onParticipantRedirectSuccess(ParticipantHandle partHandle)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantRedirectSuccess: handle=" << partHandle);
+ }
+
+ virtual void onParticipantRedirectFailure(ParticipantHandle partHandle, unsigned int statusCode)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantRedirectFailure: handle=" << partHandle << " statusCode=" << statusCode);
+ }
+
+ virtual void onDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up) {}
+
+private:
+ std::list<ConversationHandle> mConvHandles;
+ ParticipantHandle mLocalParticipant;
+ Data mLogPrefix;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// BOB
+///////////////////////////////////////////////////////////////////////////////
+class BobConversationManager : public ConversationManager
+{
+public:
+ BobConversationManager(ConversationManager::MediaInterfaceMode mode) : ConversationManager(true, mode)
+ {
+ mLogPrefix = "Bob: ";
+ };
+
+ virtual ConversationHandle createConversation()
+ {
+ ConversationHandle convHandle = ConversationManager::createConversation();
+ mConvHandles.push_back(convHandle);
+ return convHandle;
+ }
+
+ virtual void startup()
+ {
+ }
+
+ virtual void onConversationDestroyed(ConversationHandle convHandle)
+ {
+ InfoLog(<< mLogPrefix << "onConversationDestroyed: handle=" << convHandle);
+ }
+
+ virtual void onParticipantDestroyed(ParticipantHandle partHandle)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantDestroyed: handle=" << partHandle);
+ }
+
+ virtual void onApplicationTimer(unsigned int id, unsigned int durationMs, unsigned int seq)
+ {
+ InfoLog(<< mLogPrefix << "onApplicationTimeout: id=" << id << " dur=" << durationMs << " seq=" << seq);
+
+ if(SCENARIO == LAST_SCENARIO)
+ {
+ // End Test
+ finished = true;
+ }
+ else
+ {
+ // Kick off next scenario
+ cout << endl;
+ SCENARIO++;
+ CALLBACK_SEQUENCE = 1;
+ switch(SCENARIO)
+ {
+ case 2:
+ case 3:
+ {
+ ConversationHandle convHandle = createConversation();
+ createRemoteParticipant(convHandle, aliceUri, ConversationManager::ForkSelectAutomatic);
+ }
+ break;
+ case 4:
+ {
+ ConversationHandle convHandle = createConversation();
+ mLocalParticipant = createLocalParticipant();
+ addParticipant(convHandle, mLocalParticipant);
+ createRemoteParticipant(convHandle, aliceUri, ConversationManager::ForkSelectAutomatic);
+ }
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+ }
+
+ virtual void onIncomingParticipant(ParticipantHandle partHandle, const SipMessage& msg, bool autoAnswer, ConversationProfile& conversationProfile)
+ {
+ InfoLog(<< mLogPrefix << "onIncomingParticipant: handle=" << partHandle << " msg=" << msg.brief());
+ switch(SCENARIO)
+ {
+ case 1:
+ assert(CALLBACK_SEQUENCE++ == 1);
+ assert(partHandle == 1); // Note: Bob has no local participant
+ assert(autoAnswer == false);
+ MARKER;
+ alertParticipant(partHandle, false);
+ {
+ ConversationHandle convHandle = createConversation();
+ addParticipant(convHandle, partHandle);
+ }
+ answerParticipant(partHandle);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onRequestOutgoingParticipant(ParticipantHandle partHandle, const SipMessage& msg, ConversationProfile& conversationProfile)
+ {
+ InfoLog(<< mLogPrefix << "onRequestOutgoingParticipant: handle=" << partHandle << " msg=" << msg.brief());
+ if(mConvHandles.empty())
+ {
+ ConversationHandle convHandle = createConversation();
+ addParticipant(convHandle, partHandle);
+ }
+ }
+
+ virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantTerminated: handle=" << partHandle << " status=" << statusCode);
+
+ switch(SCENARIO)
+ {
+ case 1:
+ assert(CALLBACK_SEQUENCE++ == 5);
+ assert(partHandle == 1); // Note: Bob has no local participant
+ assert(statusCode == 0);
+ MARKER;
+
+ // Next Scenario
+ getUserAgent()->startApplicationTimer(0, 500, 0);
+ break;
+ case 2:
+ assert(CALLBACK_SEQUENCE++ == 3);
+ assert(partHandle == 2);
+ assert(statusCode == 486);
+ MARKER;
+
+ // End Test
+ getUserAgent()->startApplicationTimer(0, 500, 0);
+ break;
+ case 3:
+ assert(CALLBACK_SEQUENCE++ == 5);
+ assert(partHandle == 3);
+ assert(statusCode == 404);
+ MARKER;
+
+ // End Test
+ getUserAgent()->startApplicationTimer(0, 500, 0);
+ break;
+ case 4:
+ assert(CALLBACK_SEQUENCE++ == 5);
+ assert(partHandle == 5);
+ assert(statusCode == 0);
+ MARKER;
+
+ // End Test
+ getUserAgent()->startApplicationTimer(0, 500, 0);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+
+ // Destroy all conversations
+ std::list<ConversationHandle>::iterator it;
+ for(it = mConvHandles.begin(); it != mConvHandles.end(); it++)
+ {
+ destroyConversation(*it);
+ }
+ mConvHandles.clear();
+ }
+
+ virtual void onParticipantProceeding(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantProceeding: handle=" << partHandle << " msg=" << msg.brief());
+ }
+
+ virtual void onRelatedConversation(ConversationHandle relatedConvHandle, ParticipantHandle relatedPartHandle,
+ ConversationHandle origConvHandle, ParticipantHandle origPartHandle)
+ {
+ InfoLog(<< mLogPrefix << "onRelatedConversation: relatedConvHandle=" << relatedConvHandle << " relatedPartHandle=" << relatedPartHandle
+ << " origConvHandle=" << origConvHandle << " origPartHandle=" << origPartHandle);
+ mConvHandles.push_back(relatedConvHandle);
+ }
+
+ virtual void onParticipantAlerting(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantAlerting: handle=" << partHandle << " msg=" << msg.brief());
+ switch(SCENARIO)
+ {
+ case 4:
+ assert(CALLBACK_SEQUENCE++ == 2);
+ assert(partHandle == 5);
+ MARKER;
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onParticipantConnected(ParticipantHandle partHandle, const SipMessage& msg)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantConnected: handle=" << partHandle << " msg=" << msg.brief());
+ switch(SCENARIO)
+ {
+ case 4:
+ assert(CALLBACK_SEQUENCE++ == 3);
+ assert(partHandle == 5);
+ MARKER;
+ removeParticipant(mConvHandles.front(), mLocalParticipant); // hold
+ {
+ NameAddr badAddress("sip:badAddress at 127.0.0.1:33333");
+ redirectParticipant(partHandle, badAddress);
+ }
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onParticipantRedirectSuccess(ParticipantHandle partHandle)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantRedirectSuccess: handle=" << partHandle);
+ }
+
+ virtual void onParticipantRedirectFailure(ParticipantHandle partHandle, unsigned int statusCode)
+ {
+ InfoLog(<< mLogPrefix << "onParticipantRedirectFailure: handle=" << partHandle << " statusCode=" << statusCode);
+ switch(SCENARIO)
+ {
+ case 4:
+ assert(CALLBACK_SEQUENCE++ == 4);
+ assert(partHandle == 5);
+ MARKER;
+ destroyParticipant(partHandle);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+
+ virtual void onDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up) {}
+
+private:
+ std::list<ConversationHandle> mConvHandles;
+ ParticipantHandle mLocalParticipant;
+ Data mLogPrefix;
+};
+
+
+class MyUserAgent : public UserAgent
+{
+public:
+ MyUserAgent(ConversationManager* conversationManager, SharedPtr<UserAgentMasterProfile> profile) :
+ UserAgent(conversationManager, profile) {}
+
+ virtual void onApplicationTimer(unsigned int id, unsigned int durationMs, unsigned int seq)
+ {
+ //InfoLog(<< "onApplicationTimeout: id=" << id << " dur=" << durationMs << " seq=" << seq);
+ BobConversationManager* bcm = dynamic_cast<BobConversationManager*>(getConversationManager());
+ if(bcm)
+ {
+ bcm->onApplicationTimer(id, durationMs, seq);
+ }
+ else
+ {
+ AliceConversationManager* acm = dynamic_cast<AliceConversationManager*>(getConversationManager());
+ if(acm)
+ {
+ acm->onApplicationTimer(id, durationMs, seq);
+ }
+ }
+ }
+
+ virtual void onSubscriptionTerminated(SubscriptionHandle handle, unsigned int statusCode)
+ {
+ InfoLog(<< "onSubscriptionTerminated: handle=" << handle << " statusCode=" << statusCode);
+ }
+
+ virtual void onSubscriptionNotify(SubscriptionHandle handle, Data& notifyData)
+ {
+ InfoLog(<< "onSubscriptionNotify: handle=" << handle << " data=" << endl << notifyData);
+ }
+};
+
+
+SharedPtr<UserAgentMasterProfile> createUserAgentMasterProfile()
+{
+ SharedPtr<UserAgentMasterProfile> profile(new UserAgentMasterProfile);
+
+ // Settings
+ profile->statisticsManagerEnabled() = false;
+ profile->validateContentEnabled() = false;
+ profile->validateContentLanguageEnabled() = false;
+ profile->validateAcceptEnabled() = false;
+ profile->clearSupportedLanguages();
+ profile->addSupportedLanguage(Token("en"));
+ profile->clearSupportedMimeTypes();
+ profile->addSupportedMimeType(INVITE, Mime("application", "sdp"));
+ profile->addSupportedMimeType(OPTIONS,Mime("application", "sdp"));
+ profile->addSupportedMimeType(UPDATE, Mime("application", "sdp"));
+ profile->addSupportedMimeType(NOTIFY, Mime("message", "sipfrag"));
+ profile->clearSupportedMethods();
+ profile->addSupportedMethod(INVITE);
+ profile->addSupportedMethod(ACK);
+ profile->addSupportedMethod(CANCEL);
+ profile->addSupportedMethod(OPTIONS);
+ profile->addSupportedMethod(BYE);
+ profile->addSupportedMethod(REFER);
+ profile->addSupportedMethod(NOTIFY);
+ profile->addSupportedMethod(SUBSCRIBE);
+ profile->addSupportedMethod(UPDATE);
+ profile->clearSupportedOptionTags();
+ profile->addSupportedOptionTag(Token(Symbols::Replaces));
+ profile->addSupportedOptionTag(Token(Symbols::Timer));
+ profile->addSupportedOptionTag(Token(Symbols::NoReferSub));
+ profile->addSupportedOptionTag(Token(Symbols::AnswerMode));
+ profile->addSupportedOptionTag(Token(Symbols::TargetDialog));
+ //profile->addSupportedOptionTag(Token(Symbols::C100rel));
+ profile->clearSupportedSchemes();
+ profile->addSupportedScheme("sip");
+#ifdef USE_SSL
+ profile->addSupportedScheme("sips");
+#endif
+
+ // Have stack add Allow/Supported/Accept headers to INVITE dialog establishment messages
+ profile->clearAdvertisedCapabilities(); // Remove Profile Defaults, then add our preferences
+ profile->addAdvertisedCapability(Headers::Allow);
+ //profile->addAdvertisedCapability(Headers::AcceptEncoding); // This can be misleading - it might specify what is expected in response
+ profile->addAdvertisedCapability(Headers::AcceptLanguage);
+ profile->addAdvertisedCapability(Headers::Supported);
+ profile->setMethodsParamEnabled(true);
+
+ return profile;
+}
+
+SharedPtr<ConversationProfile> createConversationProfile(SharedPtr<UserAgentMasterProfile> profile, int port)
+{
+ SharedPtr<ConversationProfile> conversationProfile(new ConversationProfile(profile));
+ conversationProfile->setDefaultRegistrationTime(0);
+
+ // Create Session Capabilities and assign to coversation Profile
+ Data address("127.0.0.1");
+ // Build s=, o=, t=, and c= lines
+ SdpContents::Session::Origin origin("-", 0 /* sessionId */, 0 /* version */, SdpContents::IP4, address); // o= Note: sessionId and version will be replace in actual offer/answer
+ SdpContents::Session session(0, origin, "-" /* s= */);
+ session.connection() = SdpContents::Session::Connection(SdpContents::IP4, address); // c=
+ session.addTime(SdpContents::Session::Time(0, 0));
+ // Build Codecs and media offering
+ SdpContents::Session::Medium medium("audio", port, 0, "RTP/AVP");
+ SdpContents::Session::Codec g711ucodec("PCMU", 8000);
+ g711ucodec.payloadType() = 0; /* RFC3551 */ ;
+ medium.addCodec(g711ucodec);
+ medium.addAttribute("ptime", Data(20)); // 20 ms of speech per frame (note G711 has 10ms samples, so this is 2 samples per frame)
+ medium.addAttribute("sendrecv");
+ session.addMedium(medium);
+
+ SdpContents sessionCaps;
+ sessionCaps.session() = session;
+ conversationProfile->sessionCaps() = sessionCaps;
+
+ return conversationProfile;
+}
+
+void executeConversationTest(ConversationManager::MediaInterfaceMode mode)
+{
+ //////////////////////////////////////////////////////////////////////////////
+ // Setup UserAgentMasterProfiles
+ //////////////////////////////////////////////////////////////////////////////
+ SharedPtr<UserAgentMasterProfile> profileAlice = createUserAgentMasterProfile();
+ profileAlice->addTransport(UDP, aliceUri.uri().port(), V4);
+ SharedPtr<ConversationProfile> conversationProfileAlice = createConversationProfile(profileAlice, 16384);
+ conversationProfileAlice->setDefaultFrom(aliceUri);
+ conversationProfileAlice->setUserAgent("Test-Alice");
+
+ SharedPtr<UserAgentMasterProfile> profileBob = createUserAgentMasterProfile();
+ profileBob->addTransport(UDP, bobUri.uri().port(), V4);
+ SharedPtr<ConversationProfile> conversationProfileBob = createConversationProfile(profileBob, 16385);
+ conversationProfileBob->setDefaultFrom(bobUri);
+ conversationProfileBob->setUserAgent("Test-Bob");
+
+ InfoLog(<< "Tests for sipXGlobalMediaInterfaceMode");
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Create ConverationManagers and UserAgents
+ //////////////////////////////////////////////////////////////////////////////
+
+ {
+ AliceConversationManager aliceConversationManager(mode);
+ MyUserAgent aliceUa(&aliceConversationManager, profileAlice);
+ aliceUa.addConversationProfile(conversationProfileAlice);
+
+ BobConversationManager bobConversationManager(mode);
+ MyUserAgent bobUa(&bobConversationManager, profileBob);
+ bobUa.addConversationProfile(conversationProfileBob);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Startup and run...
+ //////////////////////////////////////////////////////////////////////////////
+
+ aliceUa.startup();
+ aliceConversationManager.startup();
+
+ bobUa.startup();
+ bobConversationManager.startup();
+
+ while(true)
+ {
+ aliceUa.process(50);
+ bobUa.process(50);
+ if(finished) break;
+ }
+
+ aliceUa.shutdown();
+ bobUa.shutdown();
+ }
+}
+
+int
+main (int argc, char** argv)
+{
+#ifndef _WIN32
+ if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
+ {
+ cerr << "Couldn't install signal handler for SIGPIPE" << endl;
+ exit(-1);
+ }
+#endif
+
+#if defined(WIN32) && defined(_DEBUG) && defined(LEAK_CHECK)
+ resip::FindMemoryLeaks fml;
+ {
+#endif
+
+ if ( signal( SIGINT, signalHandler ) == SIG_ERR )
+ {
+ cerr << "Couldn't install signal handler for SIGINT" << endl;
+ exit( -1 );
+ }
+
+ if ( signal( SIGTERM, signalHandler ) == SIG_ERR )
+ {
+ cerr << "Couldn't install signal handler for SIGTERM" << endl;
+ exit( -1 );
+ }
+
+#ifdef WIN32
+ // Run SdpTests
+ sdpTests();
+#endif
+
+ Log::initialize(Log::Cout, LOG_LEVEL, argv[0]);
+ //Log::initialize(Log::Cout, resip::Log::Debug, argv[0]);
+ initNetwork();
+
+ cout << "Tests for sipXConversationMediaInterfaceMode" << endl;
+ executeConversationTest(ConversationManager::sipXConversationMediaInterfaceMode);
+
+ // Reset counters, etc.
+ SCENARIO = 1;
+ LAST_SCENARIO = 4;
+ CALLBACK_SEQUENCE = 1;
+ finished = false;
+
+ cout << "Tests for sipXGlobalMediaInterfaceMode" << endl;
+ executeConversationTest(ConversationManager::sipXGlobalMediaInterfaceMode);
+
+ InfoLog(<< "unitTests is shutdown.");
+ //sleepSeconds(10);
+
+#if defined(WIN32) && defined(_DEBUG) && defined(LEAK_CHECK)
+ } // End FML scope
+#endif
+
+}
+
+
+
+/* ====================================================================
+
+ Copyright (c) 2007-2008, Plantronics, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Plantronics nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ==================================================================== */
diff --git a/resip/recon/test/unitTests_10_0.vcxproj b/resip/recon/test/unitTests_10_0.vcxproj
new file mode 100644
index 0000000..0081eca
--- /dev/null
+++ b/resip/recon/test/unitTests_10_0.vcxproj
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>unitTests</ProjectName>
+ <ProjectGuid>{16CD976A-5D3B-4329-88BA-A32560CDFCC9}</ProjectGuid>
+ <RootNamespace>unitTests</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-unitTests.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)/../;$(ProjectDir)/../../../;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface;$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include;$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include;$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include;$(ProjectDir)/../../../reTurn;$(ProjectDir)/../../../contrib/asio;$(ProjectDir)/../../../contrib/boost_1_34_1;$(ProjectDir)/../../../contrib/openssl/inc32;$(ProjectDir)/../../../contrib/srtp/include;$(ProjectDir)/../../../contrib/srtp/crypto/include;$(ProjectDir)/../../../reflow;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(IntDir)unitTests.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;iphlpapi.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib;$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib;$(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib;winmm.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)unitTests.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)unitTests.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog-unitTests.htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>$(ProjectDir)/../;$(ProjectDir)/../../../;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface;$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include;$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include;$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include;$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include;$(ProjectDir)/../../../reTurn;$(ProjectDir)/../../../contrib/asio;$(ProjectDir)/../../../contrib/boost_1_34_1;$(ProjectDir)/../../../contrib/openssl/inc32;$(ProjectDir)/../../../contrib/srtp/include;$(ProjectDir)/../../../contrib/srtp/crypto/include;$(ProjectDir)/../../../reflow;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(IntDir)unitTests.pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;iphlpapi.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib;$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib;$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib;$(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib;winmm.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib;$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)unitTests.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)unitTests.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="sdpTests.cxx" />
+ <ClCompile Include="unitTests.cxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\win32\VS2003\libspeexdsp\libspeexdsp.vcxproj">
+ <Project>{03207781-0d1c-4db3-a71d-45c608f28dbd}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\win32\VS2003\libspeex\libspeex.vcxproj">
+ <Project>{e972c52f-9e85-4d65-b19c-031e511e9db4}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgilbc\plgilbc-msvc8.vcxproj">
+ <Project>{6442c7de-e500-4ba2-b821-98092f1edcaf}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgpcmapcmu\plgpcmapcmu-msvc8.vcxproj">
+ <Project>{a9c94d26-c90d-4860-8195-56929e893757}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgspeex\plgspeex-msvc8.vcxproj">
+ <Project>{4f7fda11-42a4-4556-a631-15aa785cd1c1}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\sipXtapi\sipXmediaLib\src\mp\codecs\plgtones\plgtones-msvc8.vcxproj">
+ <Project>{f3bca14e-f24d-4570-833e-8c20c4c393f7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\contrib\pcre\pcre_10_0.vcxproj">
+ <Project>{b933f895-8efb-4fdd-a46d-09b8c00d1d26}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\contrib\srtp\srtp10.vcxproj">
+ <Project>{eef031cb-fed8-451e-a471-91ec8d4f6750}</Project>
+ <Private>true</Private>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\reflow\reflow_10_0.vcxproj">
+ <Project>{d2ab531b-86ac-43dd-a330-9809b4f1bb53}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\reTurn\client\reTurnClient_10_0.vcxproj">
+ <Project>{67b5906c-5c9d-4d09-ac7e-af71d72175f8}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\rutil\rutil_10_0.vcxproj">
+ <Project>{3d0e5ceb-93dc-4fdb-918b-d08fa369e106}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\dum\dum_10_0.vcxproj">
+ <Project>{31b0654f-e08e-405f-909f-80f86cb14b9d}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\stack\resiprocate_10_0.vcxproj">
+ <Project>{2a8be839-6466-4001-b224-8f1c3168d04a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\recon_10_0.vcxproj">
+ <Project>{16cd976a-5d3b-4329-88ba-a32560cdfcc7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/resip/recon/test/unitTests_10_0.vcxproj.filters b/resip/recon/test/unitTests_10_0.vcxproj.filters
new file mode 100644
index 0000000..bb46a55
--- /dev/null
+++ b/resip/recon/test/unitTests_10_0.vcxproj.filters
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{248cc270-c04e-4985-baf7-3dabd74bd58d}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{a591bcb6-7f2a-4ba6-8825-c471272a16b2}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{e22a1cdc-2bc6-4d50-9363-e57db1f19f4f}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="sdpTests.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="unitTests.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/resip/recon/test/unitTests_8_0.vcproj b/resip/recon/test/unitTests_8_0.vcproj
new file mode 100644
index 0000000..74a1506
--- /dev/null
+++ b/resip/recon/test/unitTests_8_0.vcproj
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="unitTests"
+ ProjectGUID="{16CD976A-5D3B-4329-88BA-A32560CDFCC9}"
+ RootNamespace="unitTests"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-unitTests.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/unitTests.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/unitTests.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/unitTests.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-unitTests.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\unitTests.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/unitTests.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/unitTests.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath=".\sdpTests.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\unitTests.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/resip/recon/test/unitTests_9_0.vcproj b/resip/recon/test/unitTests_9_0.vcproj
new file mode 100644
index 0000000..d131d01
--- /dev/null
+++ b/resip/recon/test/unitTests_9_0.vcproj
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="unitTests"
+ ProjectGUID="{16CD976A-5D3B-4329-88BA-A32560CDFCC9}"
+ RootNamespace="unitTests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-unitTests.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/unitTests.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/unitTests.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/unitTests.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-unitTests.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\unitTests.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/unitTests.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/unitTests.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-unitTests.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;_DEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;LEAK_CHECK;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/unitTests.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32.dbg\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Debug\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Debug\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Debug\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Debug\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Debug\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Debug\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/unitTests.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/unitTests.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="SSL-Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog-unitTests.htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=""$(ProjectDir)/../";"$(ProjectDir)/../../../";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/sipXmediaMediaProcessing/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaAdapterLib/interface";"$(ProjectDir)/../../../../sipXtapi/sipXPortLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXtackLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXsdpLib/include";"$(ProjectDir)/../../../../sipXtapi/sipXMediaLib/include";"$(ProjectDir)/../../../reTurn";"$(ProjectDir)/../../../contrib/asio";"$(ProjectDir)/../../../contrib/boost_1_34_1";"$(ProjectDir)/../../../contrib/openssl/inc32";"$(ProjectDir)/../../../contrib/srtp/include";"$(ProjectDir)/../../../contrib/srtp/crypto/include";"$(ProjectDir)/../../../reflow""
+ PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0501;NDEBUG;_CONSOLE;USE_IPV6;USE_ARES;DEFAULT_BRIDGE_MAX_IN_OUTPUTS=10;BOOST_ALL_NO_LIB;USE_SSL;_CRT_SECURE_NO_WARNINGS;ASIO_ENABLE_CANCELIO"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\unitTests.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="Ws2_32.lib Dnsapi.lib iphlpapi.lib "$(ProjectDir)..\..\..\contrib\openssl\out32\libeay32.lib" "$(ProjectDir)..\..\..\contrib\openssl\out32\ssleay32.lib" "$(ProjectDir)..\..\..\contrib\pcre\Release\pcre.lib" $(ProjectDir)..\..\..\contrib\srtp\Release\libSRTP.lib winmm.lib "$(ProjectDir)..\..\..\..\sipXtapi\sipXportLib\Release\sipxportlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXsdpLib\Release\sipxsdplib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\Release\sipxmedialib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaAdapterLib\Release\sipxmediaadapterlib.lib" "$(ProjectDir)..\..\..\..\sipXtapi\sipXmediaLib\contrib\libspeex\lib\libspeex.lib""
+ OutputFile="$(OutDir)/unitTests.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/unitTests.pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath=".\sdpTests.cxx"
+ >
+ </File>
+ <File
+ RelativePath=".\unitTests.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/rutil/dns/ares/Makefile.am b/rutil/dns/ares/Makefile.am
index e788077..ca15dda 100644
--- a/rutil/dns/ares/Makefile.am
+++ b/rutil/dns/ares/Makefile.am
@@ -19,7 +19,7 @@ libresipares_la_SOURCES = \
libresipares_ladir = $(includedir)/rutil/dns/ares
libresipares_la_HEADERS =\
- ares.h ares_compat.h ares_dns.h ares_local.h ares_version.h
+ ares.h ares_compat.h ares_dns.h ares_local.h ares_socketfunc.h ares_version.h
noinst_HEADERS = ares_private.h
man3_MANS = \
@@ -33,6 +33,8 @@ man3_MANS = \
EXTRA_DIST = $(man3_MANS) adig.c ahost.c
EXTRA_DIST += *.vcproj
+EXTRA_DIST += *.vcxproj
+EXTRA_DIST += *.vcxproj.filters
#adig: adig.o libares.a
# ${CC} ${LDFLAGS} -o $@ adig.o libares.a ${LIBS}
diff --git a/rutil/dns/ares/Makefile.in b/rutil/dns/ares/Makefile.in
index f1b67f4..017d832 100644
--- a/rutil/dns/ares/Makefile.in
+++ b/rutil/dns/ares/Makefile.in
@@ -256,7 +256,7 @@ libresipares_la_SOURCES = \
libresipares_ladir = $(includedir)/rutil/dns/ares
libresipares_la_HEADERS = \
- ares.h ares_compat.h ares_dns.h ares_local.h ares_version.h
+ ares.h ares_compat.h ares_dns.h ares_local.h ares_socketfunc.h ares_version.h
noinst_HEADERS = ares_private.h
man3_MANS = \
@@ -268,7 +268,8 @@ man3_MANS = \
ares_free_errmem.3 ares_gethostbyname.3 ares_parse_a_reply.3 \
ares_search.3
-EXTRA_DIST = $(man3_MANS) adig.c ahost.c *.vcproj
+EXTRA_DIST = $(man3_MANS) adig.c ahost.c *.vcproj *.vcxproj \
+ *.vcxproj.filters
all: all-am
.SUFFIXES:
diff --git a/rutil/dns/ares/ares_10_0.vcxproj b/rutil/dns/ares/ares_10_0.vcxproj
new file mode 100644
index 0000000..874366a
--- /dev/null
+++ b/rutil/dns/ares/ares_10_0.vcxproj
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>ares</ProjectName>
+ <ProjectGuid>{CE7CF5E0-CAD1-49D6-95D1-143DED7B226E}</ProjectGuid>
+ <RootNamespace>ares</RootNamespace>
+ <Keyword>ManagedCProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <CLRSupport>false</CLRSupport>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <CLRSupport>false</CLRSupport>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <CLRSupport>false</CLRSupport>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <CLRSupport>false</CLRSupport>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Debug\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Release\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)/contrib/ares;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;USE_IPV6;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)/contrib/ares;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;USE_IPV6;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PreprocessorDefinitions>WIN32;NDEBUG;USE_IPV6;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PreprocessorDefinitions>WIN32;NDEBUG;USE_IPV6;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="ares__close_sockets.c" />
+ <ClCompile Include="ares__get_hostent.c" />
+ <ClCompile Include="ares__read_line.c" />
+ <ClCompile Include="ares_destroy.c" />
+ <ClCompile Include="ares_expand_name.c" />
+ <ClCompile Include="ares_fds.c" />
+ <ClCompile Include="ares_free_errmem.c" />
+ <ClCompile Include="ares_free_hostent.c" />
+ <ClCompile Include="ares_free_string.c" />
+ <ClCompile Include="ares_gethostbyaddr.c" />
+ <ClCompile Include="ares_gethostbyname.c" />
+ <ClCompile Include="ares_init.c" />
+ <ClCompile Include="ares_local.c" />
+ <ClCompile Include="ares_mkquery.c" />
+ <ClCompile Include="ares_parse_a_reply.c" />
+ <ClCompile Include="ares_parse_ptr_reply.c" />
+ <ClCompile Include="ares_process.c" />
+ <ClCompile Include="ares_query.c" />
+ <ClCompile Include="ares_search.c" />
+ <ClCompile Include="ares_send.c" />
+ <ClCompile Include="ares_strerror.c" />
+ <ClCompile Include="ares_timeout.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="ares.h" />
+ <ClInclude Include="ares_compat.h" />
+ <ClInclude Include="ares_dns.h" />
+ <ClInclude Include="ares_local.h" />
+ <ClInclude Include="ares_private.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/rutil/dns/ares/ares_10_0.vcxproj.filters b/rutil/dns/ares/ares_10_0.vcxproj.filters
new file mode 100644
index 0000000..0bfa024
--- /dev/null
+++ b/rutil/dns/ares/ares_10_0.vcxproj.filters
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{9e3fe614-9662-442b-b374-aec5b9bad845}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{f2e854cf-73f0-440a-985a-0a76057eda91}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;r</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{228966ed-c824-43cf-bc6c-0ffce8218a9f}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="ares_destroy.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_expand_name.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_fds.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_free_errmem.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_free_hostent.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_free_string.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_gethostbyaddr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_gethostbyname.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_init.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_local.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_mkquery.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_parse_a_reply.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_parse_ptr_reply.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_process.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_query.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_search.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_send.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_strerror.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares_timeout.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares__close_sockets.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares__get_hostent.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ares__read_line.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="ares.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ares_compat.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ares_dns.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ares_local.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ares_private.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/rutil/dns/ares/ares_socketfunc.h b/rutil/dns/ares/ares_socketfunc.h
new file mode 100644
index 0000000..01d849b
--- /dev/null
+++ b/rutil/dns/ares/ares_socketfunc.h
@@ -0,0 +1,18 @@
+#ifndef ARES__SOCKETFUNC_H
+#define ARES__SOCKETFUNC_H
+
+
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
+#ifndef WIN32
+typedef int Socket;
+#else
+typedef SOCKET Socket;
+#endif
+
+typedef void(*socket_function_ptr)(Socket s, int transportType, const char* file, int line);
+
+#endif
+
diff --git a/tfm/repro/CommandLineParser.cxx b/tfm/repro/CommandLineParser.cxx
index cfc138d..fc4cece 100644
--- a/tfm/repro/CommandLineParser.cxx
+++ b/tfm/repro/CommandLineParser.cxx
@@ -41,12 +41,10 @@ CommandLineParser::CommandLineParser(int argc, char** argv)
int httpPort=5180;
const char* enumSuffix="";
-
int encrypt=false;
int sign=false;
int genUserCert = false;
-
mRegisterDuration = 3600;
const char* inputAor = 0;
@@ -137,15 +135,15 @@ CommandLineParser::CommandLineParser(int argc, char** argv)
mRecordRoute = toUri(recordRoute, "Record-Route");
}
- mEnableFlowTokenHack = flowTokens;
+ mEnableFlowTokenHack = flowTokens != 0;
mUdpPorts = toIntSet(udpPorts, "udp ports");
mTcpPorts = toIntSet(tcpPorts, "tcp ports");
mTlsPorts = toIntSet(tlsPorts, "tls ports");
mDtlsPorts = toIntSet(dtlsPorts, "dtls ports");
- mNoV4 = noV4;
- mNoV6 = noV6;
- mThreadedStack = threadedStack;
- mUseCongestionManager = useCongestionManager;
+ mNoV4 = noV4 != 0;
+ mNoV6 = noV6 != 0;
+ mThreadedStack = threadedStack != 0;
+ mUseCongestionManager = useCongestionManager != 0;
if (certPath) mCertPath = certPath;
else mCertPath = basePath + "/.sipCerts";
mNoChallenge = noChallenge != 0;
@@ -161,10 +159,9 @@ CommandLineParser::CommandLineParser(int argc, char** argv)
mMySqlServer = Data(mySqlServer);
}
-
- mEncrypt = encrypt;
- mSign = sign;
- mGenUserCert = genUserCert;
+ mEncrypt = encrypt != 0;
+ mSign = sign != 0;
+ mGenUserCert = genUserCert != 0;
if (inputAor)
{
mAor = toUri(inputAor, "aor");
@@ -252,20 +249,16 @@ CommandLineParser::toIntSet(const char* input, const char* description)
{
try
{
- int temp;
- temp = Data(token).convertInt();
- arguments.insert(temp);
+ int temp;
+ temp = Data(token).convertInt();
+ arguments.insert(temp);
}
- catch (ParseException& e)
+ catch (ParseException&)
{
-
-
exit(-1);
}
catch (...)
{
-
-
}
}
}
--
reSIProcate
More information about the Pkg-voip-commits
mailing list