# let make re-run automake upon need
ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_MACOS_FLAGS)
+if EXTERNAL_MEDIASTREAMER
+MS2_DIR=
+else
+MS2_DIR=mediastreamer2
+endif
+
if EXTERNAL_ORTP
-ORTP_DIR =
+ORTP_DIR=
else
-ORTP_DIR = oRTP
+ORTP_DIR=oRTP
endif
-SUBDIRS = m4 pixmaps po $(ORTP_DIR) mediastreamer2\
+
+SUBDIRS = m4 pixmaps po $(ORTP_DIR) $(MS2_DIR) \
coreapi console gtk share scripts
--- /dev/null
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT([linphone],[3.3.99.4],[linphone-developers@nongnu.org])
+AC_CANONICAL_SYSTEM
+AC_CONFIG_SRCDIR([coreapi/linphonecore.c])
+
+dnl Source packaging numbers
+
+LINPHONE_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
+LINPHONE_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
+LINPHONE_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
+LINPHONE_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
+
+dnl program extension
+LINPHONE_VERSION=$LINPHONE_MAJOR_VERSION.$LINPHONE_MINOR_VERSION.${LINPHONE_MICRO_VERSION}
+if test "$LINPHONE_EXTRA_VERSION" != "" ;then
+ LINPHONE_VERSION=$LINPHONE_VERSION.${LINPHONE_EXTRA_VERSION}
+fi
+
+LIBLINPHONE_SO_CURRENT=4 dnl increment this number when you add/change/remove an interface
+LIBLINPHONE_SO_REVISION=0 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
+LIBLINPHONE_SO_AGE=0 dnl increment this number when you add an interface, set to 0 if you remove an interface
+
+LIBLINPHONE_SO_VERSION=$LIBLINPHONE_SO_CURRENT:$LIBLINPHONE_SO_REVISION:$LIBLINPHONE_SO_AGE
+
+AC_SUBST(LIBLINPHONE_SO_VERSION, $LIBLINPHONE_SO_VERSION)
+AC_SUBST(LINPHONE_VERSION)
+
+AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION A full featured audio/video sip phone.])
+AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
+
+AM_INIT_AUTOMAKE
+AC_SUBST([LIBTOOL_DEPS])
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
+AC_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
+AC_SUBST([mkdir_p])
+AC_ISC_POSIX
+AC_PROG_CC
+AC_C_INLINE
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+AM_PROG_CC_C_O
+
+case $target_os in
+ *mingw32ce)
+ CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501"
+ CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
+ LIBS="$LIBS -lws2 -liphlpapi"
+ mingw_found=yes
+ mingwce_found=yes
+ ;;
+ *mingw*)
+ CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501 "
+ CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
+ LIBS="$LIBS -lws2_32"
+ GUI_FLAGS="-mwindows"
+ CONSOLE_FLAGS="-mconsole"
+ mingw_found=yes
+ ;;
+ *darwin*)
+ dnl use macport installation
+ ACLOCAL_MACOS_FLAGS="-I /opt/local/share/aclocal"
+ ;;
+esac
+
+AC_SUBST(ACLOCAL_MACOS_FLAGS)
+AC_SUBST(CONSOLE_FLAGS)
+AC_SUBST(GUI_FLAGS)
+
+dnl localization tools
+IT_PROG_INTLTOOL([0.40], [no-xml])
+
+dnl Initialize libtool
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+AM_PROG_LIBTOOL
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(no)
+
+
+AC_CONFIG_COMMANDS([libtool-hacking],[
+if test "$mingw_found" = "yes" ; then
+ echo "Hacking libtool to work with mingw..."
+ sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
+ cp -f ./libtool.tmp ./libtool
+ rm -f ./libtool.tmp
+fi
+],[mingw_found=$mingw_found])
+
+dnl Add the languages which your application supports here.
+PKG_PROG_PKG_CONFIG
+ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN"
+AC_SUBST(ALL_LINGUAS)
+AC_DEFINE_UNQUOTED(LINPHONE_ALL_LANGS, "$ALL_LINGUAS", [All supported languages])
+
+if test "$mingw_found" != "yes" ; then
+dnl gettext macro does not work properly under mingw.
+AM_GNU_GETTEXT([external])
+LIBS="$LIBS $LIBINTL"
+else
+ if test "$mingwce_found" != "yes" ; then
+ AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible])
+ AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible])
+ LIBS="$LIBS -L/usr/lib -lintl"
+ else
+ dnl gettext macro does not work properly under mingw.
+ AM_GNU_GETTEXT([external])
+ LIBS="$LIBS $LIBINTL"
+ fi
+fi
+
+GETTEXT_PACKAGE=linphone
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[The name of the gettext package name])
+AC_CHECK_LIB(intl,libintl_gettext)
+
+AC_CHECK_FUNCS([get_current_dir_name strndup stpcpy] )
+
+dnl conditionnal build of console interface.
+AC_ARG_ENABLE(console_ui,
+ [ --enable-console_ui=[yes/no] Turn on or off compilation of console interface [default=yes]],
+ [case "${enableval}" in
+ yes) console_ui=true ;;
+ no) console_ui=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-console_ui) ;;
+ esac],[console_ui=true])
+
+dnl conditionnal build of gtk interface.
+AC_ARG_ENABLE(gtk_ui,
+ [ --enable-gtk_ui=[yes/no] Turn on or off compilation of gtk interface [default=yes]],
+ [case "${enableval}" in
+ yes) gtk_ui=true ;;
+ no) gtk_ui=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk_ui) ;;
+ esac],[gtk_ui=true])
+
+
+if test "$gtk_ui" = "true" ; then
+ PKG_CHECK_MODULES(LIBGTK, gtk+-2.0 >= 2.4.0 gthread-2.0)
+ AC_SUBST(LIBGTK_CFLAGS)
+ AC_SUBST(LIBGTK_LIBS)
+else
+ echo "GTK interface compilation is disabled."
+fi
+
+
+dnl os-specific problems not handled by existing macros.
+case "$host_os" in
+ *freebsd*)
+ LDFLAGS="$LDFLAGS -pthread"
+ ;;
+esac
+
+case "$host_cpu" in
+ *arm*)
+ AC_DEFINE(__ARM__,1,[Defined if we are compiling for arm processor])
+ use_arm_toolchain=yes
+ ;;
+esac
+
+AC_ARG_WITH( configdir,
+ [ --with-configdir Set a APPDATA subdir where linphone is supposed to find its config (windows only) ],
+ [ configdir=${withval}],[ configdir="Linphone" ])
+
+AC_DEFINE_UNQUOTED(LINPHONE_CONFIG_DIR,"$configdir",[Windows appdata subdir where linphonerc can be found])
+
+AC_ARG_ENABLE(manual,
+ [ --disable-manual Do not attempt to build html linphone's user documentation],
+ [case "${enableval}" in
+ yes) build_manual=yes ;;
+ no) build_manual=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-manual) ;;
+ esac],[build_manual=yes])
+
+AC_ARG_ENABLE(date,
+ [ --enable-date Use build date in internal version number],
+ [case "${enableval}" in
+ yes) use_date=yes ;;
+ no) use_date=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-date) ;;
+ esac],[use_date=no])
+
+if test x$use_date = xyes ; then
+ AC_DEFINE(USE_BUILDDATE_VERSION,1,[Tell whether date_version.h must be used])
+fi
+
+
+dnl enable ipv6 support
+AC_ARG_ENABLE(ipv6,
+ [ --enable-ipv6 Turn on ipv6 support],
+ [case "${enableval}" in
+ yes) ipv6=true;;
+ no) ipv6=false;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
+ esac],[ipv6=true])
+IPV6_CFLAGS=
+if test x$ipv6 = xtrue ; then
+ IPV6_CFLAGS=-DINET6
+fi
+AC_SUBST(IPV6_CFLAGS)
+
+dnl enable truespeech codec support
+AC_ARG_ENABLE(truespeech,
+ [ --enable-truespeech Turn on TrueSpeech support (x86 only)],
+ [case "${enableval}" in
+ yes) truespeech=true;;
+ no) truespeech=false;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-truespeech) ;;
+ esac],[truespeech=false])
+TRUESPEECH_CFLAGS=
+if test x$truespeech = xtrue ; then
+ TRUESPEECH_CFLAGS=-DTRUESPEECH
+fi
+AC_SUBST(TRUESPEECH_CFLAGS)
+AM_CONDITIONAL([BUILD_TRUESPEECH], [test x$truespeech = xtrue])
+
+AC_ARG_ENABLE(nonstandard-gsm,
+ [ --enable-nonstandard-gsm Enable GSM codec at nonstandard rates (11025hz, 16000hz)],
+ [case "${enableval}" in
+ yes) exotic_gsm=yes
+ AC_DEFINE(ENABLE_NONSTANDARD_GSM,1,[Defined when using gsm at nonstandard rates])
+ ;;
+ no) exotic_gsm=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-nonstandard-gsm) ;;
+ esac],[exotic_gsm=no])
+
+
+dnl support for RSVP (by Vincent Maury)
+AC_ARG_ENABLE(rsvp,
+[ --enable-rsvp enable support for QoS reservations.],
+AC_DEFINE(VINCENT_MAURY_RSVP,1,[Tell whether RSVP support
+should be compiled.]) )
+
+if test "x${prefix}" = "xNONE"; then
+ package_prefix=${ac_default_prefix}
+else
+ package_prefix=${prefix}
+fi
+
+if test x$mingw_found = xyes ; then
+dnl allow binaries to install everywhere
+package_prefix="."
+fi
+
+dnl Set PACKAGE_LOCALE_DIR in config.h.
+DATADIRNAME=share
+AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${package_prefix}/${DATADIRNAME}/locale",[Defines the place where locales can be found])
+
+AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/${DATADIRNAME}",[Defines the place where data are found])
+
+dnl Set PACKAGE_SOUND_DIR in config.h.
+AC_DEFINE_UNQUOTED(PACKAGE_SOUND_DIR, "${package_prefix}/${DATADIRNAME}/sounds/linphone",[Defines the place where linphone sounds are found])
+
+
+dnl check if we have the getifaddrs() sytem call
+AC_CHECK_FUNCS(getifaddrs)
+
+dnl check for osip2
+LP_CHECK_OSIP2
+
+dnl setup flags for exosip library
+LP_SETUP_EXOSIP
+
+if test "$console_ui" = "true" ; then
+dnl check gnu readline
+LP_CHECK_READLINE
+else
+echo "Console interface compilation is disabled."
+fi
+
+AC_WORDS_BIGENDIAN
+
+dnl normaly this should only by done by mediastreamer2/configure.ac
+dnl but to workaround bugs when cross-compiling for arm-linux,
+dnl we need to have SPEEX_LIBS defined
+dnl Furthermore it is good to repeat here all mediastreamer2 toggles
+dnl since top-level configure --help will not print them.
+
+PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, build_speex=yes)
+AC_SUBST(SPEEX_LIBS)
+
+dnl conditionnal build of video support
+AC_ARG_ENABLE(video,
+ [ --enable-video Turn on video support compiling],
+ [case "${enableval}" in
+ yes) video=true ;;
+ no) video=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
+ esac],[video=true])
+
+AC_ARG_WITH( ffmpeg,
+ [ --with-ffmpeg Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
+ [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
+
+AC_ARG_WITH( sdl,
+ [ --with-sdl Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
+ [ libsdldir=${withval}],[ libsdldir=/usr ])
+
+AC_ARG_ENABLE(x11,
+ [ --disable-x11 Disable X11 support],
+ [case "${enableval}" in
+ yes) enable_x11=true ;;
+ no) enable_x11=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-x11) ;;
+ esac],[enable_x11=true])
+
+if test "$video" = "true"; then
+
+ if test "$enable_x11" = "true"; then
+ AC_CHECK_HEADERS(X11/Xlib.h)
+ fi
+ AC_DEFINE(VIDEO_ENABLED,1,[defined if video support is available])
+fi
+
+AC_ARG_ENABLE(alsa,
+ [ --enable-alsa Turn on alsa native support compiling],
+ [case "${enableval}" in
+ yes) alsa=true ;;
+ no) alsa=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsa) ;;
+ esac],[alsa=true])
+
+AC_ARG_ENABLE(artsc,
+ [ --enable-artsc Turn on artsc (kde) sound input/output (auto) ],
+ [case "${enableval}" in
+ yes) artsc=true ;;
+ no) artsc=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
+ esac],[artsc=false])
+
+AC_ARG_ENABLE(portaudio,
+ [ --enable-portaudio Turn on portaudio native support compiling],
+ [case "${enableval}" in
+ yes) portaudio=true ;;
+ no) portaudio=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-portaudio) ;;
+ esac],[portaudio=false])
+
+dnl build console if required
+AM_CONDITIONAL(BUILD_CONSOLE, test x$console_ui = xtrue)
+dnl special things for arm-linux cross compilation toolchain
+AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes)
+dnl compilation of gtk user interface
+AM_CONDITIONAL(BUILD_GTK_UI, [test x$gtk_ui = xtrue ] )
+AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes )
+
+dnl check getenv
+AH_TEMPLATE([HAVE_GETENV])
+AC_CHECK_FUNC([getenv], AC_DEFINE([HAVE_GETENV], [1], [If present, the getenv function allows fim to read environment variables.]))
+
+dnl
+AC_MSG_CHECKING([for sighandler_t])
+AC_TRY_COMPILE([#include <signal.h>],[sighandler_t *f;],
+has_sighandler_t=yes,has_sighandler_t=no)
+AC_MSG_RESULT($has_sighandler_t)
+if test "$has_sighandler_t" = "yes" ; then
+ AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] )
+fi
+
+##################################################
+# Stricter build options (after external packages)
+##################################################
+
+
+AC_ARG_ENABLE(strict,
+ AC_HELP_STRING([--enable-strict],
+ [Build with stricter options (gcc only) @<:@yes@:>@]),[
+ strictness="${enableval}"],[strictness=yes]
+)
+
+if test "$GCC$strictness" = "yesyes" ; then
+ STRICT_OPTIONS="-Wall "
+ STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+fi
+
+AC_SUBST(STRICT_OPTIONS)
+
+top_srcdir=`dirname $0`
+
+AC_ARG_ENABLE([external-mediastreamer],
+ [AS_HELP_STRING([--enable-external-mediastreamer],[Use external mediastreamer library])],,
+ [enable_external_mediastreamer=no])
+
+AS_CASE($enable_external_mediastreamer,
+ [yes],[
+ PKG_CHECK_MODULES([MEDIASTREAMER], [mediastreamer])
+ MS2_VERSION=`$PKG_CONFIG --modversion mediastreamer`
+ AM_CONDITIONAL(EXTERNAL_MEDIASTREAMER, [true])],
+ [no],[
+ AC_CONFIG_SUBDIRS( mediastreamer2 )
+ MEDIASTREAMER_DIR=${top_srcdir}/mediastreamer2
+ MEDIASTREAMER_CFLAGS="-I\$(top_srcdir)/mediastreamer2/include"
+ MEDIASTREAMER_LIBS="\$(top_builddir)/mediastreamer2/src/libmediastreamer.la"
+dnl need to temporary change quotes to allow square brackets
+ changequote(<<, >>)
+ MS2_VERSION=`grep -e '^.C_INIT(' $MEDIASTREAMER_DIR/configure.ac | sed -e 's:\([^(]\+\)(\[mediastreamer\],\[\(.*\)\]):\2:g'`
+ changequote([, ])
+ AM_CONDITIONAL(EXTERNAL_MEDIASTREAMER, [false])],
+ [AC_MSG_ERROR([bad value '${enable_external_mediastreamer}' for --enable-external-mediastreamer])])
+
+AC_SUBST(MEDIASTREAMER_CFLAGS)
+AC_SUBST(MEDIASTREAMER_LIBS)
+AC_SUBST([MS2_VERSION])
+
+dnl check for db2html (docbook) to generate html user manual
+AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no)
+AM_CONDITIONAL(ENABLE_MANUAL, test x$have_sgmltools$build_manual = xyesyes )
+
+dnl for external use of linphone libs
+LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone"
+LINPHONE_LIBS="-L${libdir} -llinphone"
+
+if test x$mingw_found = xyes ; then
+ LINPHONE_LIBS="$LINPHONE_LIBS $OSIP_LIBS"
+fi
+AC_SUBST(LINPHONE_CFLAGS)
+AC_SUBST(LINPHONE_LIBS)
+
+AC_DEFINE_UNQUOTED(LINPHONE_VERSION,"$PACKAGE_VERSION",[Linphone's version number])
+
+AC_DEFINE_UNQUOTED(LINPHONE_PLUGINS_DIR, "${package_prefix}/lib/liblinphone/plugins" ,[path of liblinphone plugins, not mediastreamer2 plugins])
+LINPHONE_PLUGINS_DIR="${package_prefix}/lib/liblinphone/plugins"
+AC_SUBST(LINPHONE_PLUGINS_DIR)
+
+AC_ARG_ENABLE(external-ortp,
+ [ --enable-external-ortp Use external oRTP library],
+ [case "${enableval}" in
+ yes) external_ortp=true ;;
+ no) external_ortp=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
+ esac],[external_ortp=false])
+
+if test "$external_ortp" = 'true'; then
+ PKG_CHECK_MODULES([ORTP], [ortp])
+ ORTP_VERSION=`$PKG_CONFIG --modversion ortp`
+else
+ AC_CONFIG_SUBDIRS( oRTP )
+ ORTP_CFLAGS="-I\$(top_srcdir)/oRTP/include"
+ ORTP_LIBS="\$(top_builddir)/oRTP/src/libortp.la"
+ if test x$ac_cv_c_bigendian = xyes ; then
+ ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
+ fi
+ changequote(<<, >>)
+ ORTP_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/oRTP/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
+ changequote([, ])
+fi
+AC_SUBST(ORTP_CFLAGS)
+AC_SUBST(ORTP_LIBS)
+AC_SUBST([ORTP_VERSION])
+
+AM_CONDITIONAL(EXTERNAL_ORTP, [test "$external_ortp" = 'true'])
+
+dnl ##################################################
+dnl # Check for doxygen
+dnl ##################################################
+
+AC_PATH_PROG(DOXYGEN,doxygen,false)
+AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
+
+
+AC_OUTPUT([
+Makefile
+m4/Makefile
+po/Makefile.in
+pixmaps/Makefile
+coreapi/Makefile
+coreapi/help/Makefile
+coreapi/help/Doxyfile
+coreapi/help/doxygen.dox
+gtk/Makefile
+console/Makefile
+share/Makefile
+share/C/Makefile
+share/fr/Makefile
+share/it/Makefile
+share/ja/Makefile
+share/cs/Makefile
+share/linphone.pc
+share/linphone.desktop
+scripts/Makefile
+linphone.spec
+linphone.iss
+])
+
+echo "Linphone build configuration ended."
+
+if test x$gtk_ui = xtrue ; then
+ echo "* GTK interface will be compiled."
+fi
+if test x$console_ui = xtrue ; then
+ echo "* Console interface will be compiled."
+fi
+
+echo "Now type 'make' to compile, and then 'make install' as root to install it."
+++ /dev/null
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT([linphone],[3.3.99.3],[linphone-developers@nongnu.org])
-AC_CANONICAL_SYSTEM
-
-dnl Source packaging numbers
-
-LINPHONE_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
-LINPHONE_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
-LINPHONE_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
-LINPHONE_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
-
-dnl program extension
-LINPHONE_VERSION=$LINPHONE_MAJOR_VERSION.$LINPHONE_MINOR_VERSION.${LINPHONE_MICRO_VERSION}
-if test "$LINPHONE_EXTRA_VERSION" != "" ;then
- LINPHONE_VERSION=$LINPHONE_VERSION.${LINPHONE_EXTRA_VERSION}
-fi
-
-LIBLINPHONE_SO_CURRENT=4 dnl increment this number when you add/change/remove an interface
-LIBLINPHONE_SO_REVISION=0 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
-LIBLINPHONE_SO_AGE=0 dnl increment this number when you add an interface, set to 0 if you remove an interface
-
-LIBLINPHONE_SO_VERSION=$LIBLINPHONE_SO_CURRENT:$LIBLINPHONE_SO_REVISION:$LIBLINPHONE_SO_AGE
-
-AC_SUBST(LIBLINPHONE_SO_VERSION, $LIBLINPHONE_SO_VERSION)
-AC_SUBST(LINPHONE_VERSION)
-
-AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION A full featured audio/video sip phone.])
-AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
-
-AM_INIT_AUTOMAKE([tar-ustar])
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
-AC_CONFIG_HEADER(config.h)
-AC_CONFIG_MACRO_DIR([m4])
-AC_SUBST([mkdir_p])
-AC_ISC_POSIX
-AC_PROG_CC
-AC_C_INLINE
-AM_PROG_CC_STDC
-AC_HEADER_STDC
-AM_PROG_CC_C_O
-
-case $target_os in
- *mingw32ce)
- CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501"
- CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
- LIBS="$LIBS -lws2 -liphlpapi"
- mingw_found=yes
- mingwce_found=yes
- ;;
- *mingw*)
- CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501 "
- CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
- LIBS="$LIBS -lws2_32"
- GUI_FLAGS="-mwindows"
- CONSOLE_FLAGS="-mconsole"
- mingw_found=yes
- ;;
- *darwin*)
- dnl use macport installation
- ACLOCAL_MACOS_FLAGS="-I /opt/local/share/aclocal"
- ;;
-esac
-
-AC_SUBST(ACLOCAL_MACOS_FLAGS)
-AC_SUBST(CONSOLE_FLAGS)
-AC_SUBST(GUI_FLAGS)
-
-dnl localization tools
-ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL],[AC_PROG_INTLTOOL])
-dnl Initialize libtool
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
-AM_PROG_LIBTOOL
-AC_ENABLE_SHARED(yes)
-AC_ENABLE_STATIC(no)
-
-
-AC_CONFIG_COMMANDS([libtool-hacking],[
-if test "$mingw_found" = "yes" ; then
- echo "Hacking libtool to work with mingw..."
- sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
- cp -f ./libtool.tmp ./libtool
- rm -f ./libtool.tmp
-fi
-],[mingw_found=$mingw_found])
-
-dnl Add the languages which your application supports here.
-PKG_PROG_PKG_CONFIG
-ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN"
-AC_SUBST(ALL_LINGUAS)
-AC_DEFINE_UNQUOTED(LINPHONE_ALL_LANGS, "$ALL_LINGUAS", [All supported languages])
-
-if test "$mingw_found" != "yes" ; then
-dnl gettext macro does not work properly under mingw.
-AM_GNU_GETTEXT([external])
-LIBS="$LIBS $LIBINTL"
-else
- if test "$mingwce_found" != "yes" ; then
- AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible])
- AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible])
- LIBS="$LIBS -L/usr/lib -lintl"
- else
- dnl gettext macro does not work properly under mingw.
- AM_GNU_GETTEXT([external])
- LIBS="$LIBS $LIBINTL"
- fi
-fi
-
-GETTEXT_PACKAGE=linphone
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[The name of the gettext package name])
-AC_CHECK_LIB(intl,libintl_gettext)
-
-AC_CHECK_FUNCS([get_current_dir_name strndup stpcpy] )
-
-dnl conditionnal build of console interface.
-AC_ARG_ENABLE(console_ui,
- [ --enable-console_ui=[yes/no] Turn on or off compilation of console interface [default=yes]],
- [case "${enableval}" in
- yes) console_ui=true ;;
- no) console_ui=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-console_ui) ;;
- esac],[console_ui=true])
-
-dnl conditionnal build of gtk interface.
-AC_ARG_ENABLE(gtk_ui,
- [ --enable-gtk_ui=[yes/no] Turn on or off compilation of gtk interface [default=yes]],
- [case "${enableval}" in
- yes) gtk_ui=true ;;
- no) gtk_ui=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk_ui) ;;
- esac],[gtk_ui=true])
-
-
-if test "$gtk_ui" = "true" ; then
- PKG_CHECK_MODULES(LIBGTK, gtk+-2.0 >= 2.4.0 gthread-2.0)
- AC_SUBST(LIBGTK_CFLAGS)
- AC_SUBST(LIBGTK_LIBS)
-else
- echo "GTK interface compilation is disabled."
-fi
-
-
-dnl os-specific problems not handled by existing macros.
-case "$host_os" in
- *freebsd*)
- LDFLAGS="$LDFLAGS -pthread"
- ;;
-esac
-
-case "$host_cpu" in
- *arm*)
- AC_DEFINE(__ARM__,1,[Defined if we are compiling for arm processor])
- use_arm_toolchain=yes
- ;;
-esac
-
-AC_ARG_WITH( configdir,
- [ --with-configdir Set a APPDATA subdir where linphone is supposed to find its config (windows only) ],
- [ configdir=${withval}],[ configdir="Linphone" ])
-
-AC_DEFINE_UNQUOTED(LINPHONE_CONFIG_DIR,"$configdir",[Windows appdata subdir where linphonerc can be found])
-
-AC_ARG_ENABLE(manual,
- [ --disable-manual Do not attempt to build html linphone's user documentation],
- [case "${enableval}" in
- yes) build_manual=yes ;;
- no) build_manual=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-manual) ;;
- esac],[build_manual=yes])
-
-AC_ARG_ENABLE(date,
- [ --enable-date Use build date in internal version number],
- [case "${enableval}" in
- yes) use_date=yes ;;
- no) use_date=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-date) ;;
- esac],[use_date=no])
-
-if test x$use_date = xyes ; then
- AC_DEFINE(USE_BUILDDATE_VERSION,1,[Tell whether date_version.h must be used])
-fi
-
-
-dnl enable ipv6 support
-AC_ARG_ENABLE(ipv6,
- [ --enable-ipv6 Turn on ipv6 support],
- [case "${enableval}" in
- yes) ipv6=true;;
- no) ipv6=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
- esac],[ipv6=true])
-IPV6_CFLAGS=
-if test x$ipv6 = xtrue ; then
- IPV6_CFLAGS=-DINET6
-fi
-AC_SUBST(IPV6_CFLAGS)
-
-dnl enable truespeech codec support
-AC_ARG_ENABLE(truespeech,
- [ --enable-truespeech Turn on TrueSpeech support (x86 only)],
- [case "${enableval}" in
- yes) truespeech=true;;
- no) truespeech=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-truespeech) ;;
- esac],[truespeech=false])
-TRUESPEECH_CFLAGS=
-if test x$truespeech = xtrue ; then
- TRUESPEECH_CFLAGS=-DTRUESPEECH
-fi
-AC_SUBST(TRUESPEECH_CFLAGS)
-AM_CONDITIONAL([BUILD_TRUESPEECH], [test x$truespeech = xtrue])
-
-AC_ARG_ENABLE(nonstandard-gsm,
- [ --enable-nonstandard-gsm Enable GSM codec at nonstandard rates (11025hz, 16000hz)],
- [case "${enableval}" in
- yes) exotic_gsm=yes
- AC_DEFINE(ENABLE_NONSTANDARD_GSM,1,[Defined when using gsm at nonstandard rates])
- ;;
- no) exotic_gsm=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-nonstandard-gsm) ;;
- esac],[exotic_gsm=no])
-
-
-dnl support for RSVP (by Vincent Maury)
-AC_ARG_ENABLE(rsvp,
-[ --enable-rsvp enable support for QoS reservations.],
-AC_DEFINE(VINCENT_MAURY_RSVP,1,[Tell whether RSVP support
-should be compiled.]) )
-
-if test "x${prefix}" = "xNONE"; then
- package_prefix=${ac_default_prefix}
-else
- package_prefix=${prefix}
-fi
-
-if test x$mingw_found = xyes ; then
-dnl allow binaries to install everywhere
-package_prefix="."
-fi
-
-dnl Set PACKAGE_LOCALE_DIR in config.h.
-DATADIRNAME=share
-AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${package_prefix}/${DATADIRNAME}/locale",[Defines the place where locales can be found])
-
-AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/${DATADIRNAME}",[Defines the place where data are found])
-
-dnl Set PACKAGE_SOUND_DIR in config.h.
-AC_DEFINE_UNQUOTED(PACKAGE_SOUND_DIR, "${package_prefix}/${DATADIRNAME}/sounds/linphone",[Defines the place where linphone sounds are found])
-
-
-dnl check if we have the getifaddrs() sytem call
-AC_CHECK_FUNCS(getifaddrs)
-
-dnl check for osip2
-LP_CHECK_OSIP2
-
-dnl setup flags for exosip library
-LP_SETUP_EXOSIP
-
-if test "$console_ui" = "true" ; then
-dnl check gnu readline
-LP_CHECK_READLINE
-else
-echo "Console interface compilation is disabled."
-fi
-
-AC_WORDS_BIGENDIAN
-
-dnl normaly this should only by done by mediastreamer2/configure.ac
-dnl but to workaround bugs when cross-compiling for arm-linux,
-dnl we need to have SPEEX_LIBS defined
-dnl Furthermore it is good to repeat here all mediastreamer2 toggles
-dnl since top-level configure --help will not print them.
-
-PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, build_speex=yes)
-AC_SUBST(SPEEX_LIBS)
-
-dnl conditionnal build of video support
-AC_ARG_ENABLE(video,
- [ --enable-video Turn on video support compiling],
- [case "${enableval}" in
- yes) video=true ;;
- no) video=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
- esac],[video=true])
-
-AC_ARG_WITH( ffmpeg,
- [ --with-ffmpeg Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
- [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
-
-AC_ARG_WITH( sdl,
- [ --with-sdl Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
- [ libsdldir=${withval}],[ libsdldir=/usr ])
-
-AC_ARG_ENABLE(x11,
- [ --disable-x11 Disable X11 support],
- [case "${enableval}" in
- yes) enable_x11=true ;;
- no) enable_x11=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-x11) ;;
- esac],[enable_x11=true])
-
-if test "$video" = "true"; then
-
- if test "$enable_x11" = "true"; then
- AC_CHECK_HEADERS(X11/Xlib.h)
- fi
- AC_DEFINE(VIDEO_ENABLED,1,[defined if video support is available])
-fi
-
-AC_ARG_ENABLE(alsa,
- [ --enable-alsa Turn on alsa native support compiling],
- [case "${enableval}" in
- yes) alsa=true ;;
- no) alsa=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsa) ;;
- esac],[alsa=true])
-
-AC_ARG_ENABLE(artsc,
- [ --enable-artsc Turn on artsc (kde) sound input/output (auto) ],
- [case "${enableval}" in
- yes) artsc=true ;;
- no) artsc=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
- esac],[artsc=false])
-
-AC_ARG_ENABLE(portaudio,
- [ --enable-portaudio Turn on portaudio native support compiling],
- [case "${enableval}" in
- yes) portaudio=true ;;
- no) portaudio=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-portaudio) ;;
- esac],[portaudio=false])
-
-dnl build console if required
-AM_CONDITIONAL(BUILD_CONSOLE, test x$console_ui = xtrue)
-dnl special things for arm-linux cross compilation toolchain
-AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes)
-dnl compilation of gtk user interface
-AM_CONDITIONAL(BUILD_GTK_UI, [test x$gtk_ui = xtrue ] )
-AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes )
-
-dnl check getenv
-AH_TEMPLATE([HAVE_GETENV])
-AC_CHECK_FUNC([getenv], AC_DEFINE([HAVE_GETENV], [1], [If present, the getenv function allows fim to read environment variables.]))
-
-dnl
-AC_MSG_CHECKING([for sighandler_t])
-AC_TRY_COMPILE([#include <signal.h>],[sighandler_t *f;],
-has_sighandler_t=yes,has_sighandler_t=no)
-AC_MSG_RESULT($has_sighandler_t)
-if test "$has_sighandler_t" = "yes" ; then
- AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] )
-fi
-
-##################################################
-# Stricter build options (after external packages)
-##################################################
-
-
-AC_ARG_ENABLE(strict,
- AC_HELP_STRING([--enable-strict],
- [Build with stricter options (gcc only) @<:@yes@:>@]),[
- strictness="${enableval}"],[strictness=yes]
-)
-
-if test "$GCC$strictness" = "yesyes" ; then
- STRICT_OPTIONS="-Wall "
- STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
- CFLAGS="$CFLAGS -fno-strict-aliasing"
-fi
-
-AC_SUBST(STRICT_OPTIONS)
-
-AC_CONFIG_SUBDIRS( mediastreamer2 )
-
-dnl check for db2html (docbook) to generate html user manual
-AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no)
-AM_CONDITIONAL(ENABLE_MANUAL, test x$have_sgmltools$build_manual = xyesyes )
-
-dnl for external use of linphone libs
-LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone "
-LINPHONE_LIBS="-L${libdir} -llinphone"
-
-if test x$mingw_found = xyes ; then
- LINPHONE_LIBS="$LINPHONE_LIBS $OSIP_LIBS"
-fi
-AC_SUBST(LINPHONE_CFLAGS)
-AC_SUBST(LINPHONE_LIBS)
-
-
-AC_DEFINE_UNQUOTED(LINPHONE_VERSION,"$PACKAGE_VERSION",[Linphone's version number])
-
-AC_DEFINE_UNQUOTED(LINPHONE_PLUGINS_DIR, "${package_prefix}/lib/liblinphone/plugins" ,[path of liblinphone plugins, not mediastreamer2 plugins])
-LINPHONE_PLUGINS_DIR="${package_prefix}/lib/liblinphone/plugins"
-AC_SUBST(LINPHONE_PLUGINS_DIR)
-
-AC_ARG_ENABLE(external-ortp,
- [ --enable-external-ortp Use external oRTP library],
- [case "${enableval}" in
- yes) external_ortp=true ;;
- no) external_ortp=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
- esac],[external_ortp=false])
-
-if test "$external_ortp" = 'true'; then
- LP_CHECK_ORTP
-else
- AC_CONFIG_SUBDIRS( oRTP )
- ORTP_CFLAGS="-I\$(top_srcdir)/oRTP/include"
- ORTP_LIBS="\$(top_builddir)/oRTP/src/libortp.la"
- if test x$ac_cv_c_bigendian = xyes ; then
- ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
- fi
-fi
-AC_SUBST(ORTP_CFLAGS)
-AC_SUBST(ORTP_LIBS)
-
-AM_CONDITIONAL(EXTERNAL_ORTP, [test "$external_ortp" = 'true'])
-
-dnl Packaging: Pick oRTP version from ${top_srcdir}/oRTP/configure.ac
-dnl Feel free to propose an alternative & cleaner version...
-top_srcdir=`dirname $0`
-changequote(, )dnl
-ORTP_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/oRTP/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
-MS2_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/mediastreamer2/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
-changequote([, ])dnl
-AC_SUBST([ORTP_VERSION])
-AC_SUBST([MS2_VERSION])
-
-dnl ##################################################
-dnl # Check for doxygen
-dnl ##################################################
-
-AC_PATH_PROG(DOXYGEN,doxygen,false)
-AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
-
-
-AC_OUTPUT([
-Makefile
-m4/Makefile
-po/Makefile.in
-pixmaps/Makefile
-coreapi/Makefile
-coreapi/help/Makefile
-coreapi/help/Doxyfile
-coreapi/help/doxygen.dox
-gtk/Makefile
-console/Makefile
-share/Makefile
-share/C/Makefile
-share/fr/Makefile
-share/it/Makefile
-share/ja/Makefile
-share/cs/Makefile
-share/linphone.pc
-share/linphone.desktop
-scripts/Makefile
-linphone.spec
-linphone.iss
-])
-
-echo "Linphone build configuration ended."
-
-if test x$gtk_ui = xtrue ; then
- echo "* GTK interface will be compiled."
-fi
-if test x$console_ui = xtrue ; then
- echo "* Console interface will be compiled."
-fi
-
-echo "Now type 'make' to compile, and then 'make install' as root to install it."
-I$(top_srcdir)/coreapi\
$(ORTP_CFLAGS) \
-I$(top_srcdir)/exosip \
- -I$(top_srcdir)/mediastreamer2/include
-
-
+ $(MEDIASTREAMER_CFLAGS)
bin_PROGRAMS = linphonec linphonecsh
linphonec_SOURCES = linphonec.c linphonec.h commands.c
linphonec_CFLAGS=$(COMMON_CFLAGS) $(CONSOLE_FLAGS)
linphonec_LDADD = $(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS) \
- $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+ $(MEDIASTREAMER_LIBS) \
$(ORTP_LIBS) \
$(SPEEX_LIBS) \
$(OSIP_LIBS)
sipomatic_LDADD= $(INTLLIBS) \
$(top_builddir)/coreapi/liblinphone.la \
- $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+ $(MEDIASTREAMER_LIBS) \
$(ORTP_LIBS) \
$(SPEEX_LIBS) \
$(OSIP_LIBS)
static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args);
static int lpc_cmd_unmute_mic(LinphoneCore *lc, char *args);
static int lpc_cmd_rtp_no_xmit_on_audio_mute(LinphoneCore *lc, char *args);
+#ifdef VIDEO_ENABLED
+static int lpc_cmd_camera(LinphoneCore *lc, char *args);
static int lpc_cmd_video_window(LinphoneCore *lc, char *args);
+#endif
static int lpc_cmd_states(LinphoneCore *lc, char *args);
+static int lpc_cmd_identify(LinphoneCore *lc, char *args);
+static int lpc_cmd_ringback(LinphoneCore *lc, char *args);
/* Command handler helpers */
static void linphonec_proxy_add(LinphoneCore *lc);
"'help <command>'\t: displays specific help for command.\n"
"'help advanced'\t: shows advanced commands.\n"
},
- { "call", lpc_cmd_call, "Call a SIP uri",
- "'call <sip-url>' \t: initiate a call to the specified destination.\n"
- "'call show' \t: show all the current calls with their id and status.\n"
+ { "call", lpc_cmd_call, "Call a SIP uri or number",
+#ifdef VIDEO_ENABLED
+ "'call <sip-url or number> [--audio-only]' \t: initiate a call to the specified destination.\n"
+#else
+ "'call <sip-url or number>' \t: initiate a call to the specified destination.\n"
+#endif
},
{ "calls", lpc_cmd_calls, "Show all the current calls with their id and status.",
NULL
"'resume <call id>' : hold off the call with given id\n"},
{ "mute", lpc_cmd_mute_mic,
"Mute microphone and suspend voice transmission."},
+#ifdef VIDEO_ENABLED
+ { "camera", lpc_cmd_camera, "Send camera output for current call.",
+ "'camera on'\t: allow sending of local camera video to remote end.\n"
+ "'camera off'\t: disable sending of local camera's video to remote end.\n"},
+#endif
{ "unmute", lpc_cmd_unmute_mic,
"Unmute microphone and resume voice transmission."},
{ "duration", lpc_cmd_duration, "Print duration in seconds of the last call.", NULL },
"Set the rtp_no_xmit_on_audio_mute configuration parameter",
" If set to 1 then rtp transmission will be muted when\n"
" audio is muted , otherwise rtp is always sent."},
+#ifdef VIDEO_ENABLED
{ "vwindow", lpc_cmd_video_window, "Control video display window",
"'vwindow show': shows video window\n"
"'vwindow hide': hides video window\n"
"'vwindow pos <x> <y>': Moves video window to x,y pixel coordinates\n"
"'vwindow size <width> <height>': Resizes video window"
},
+#endif
{ "states", lpc_cmd_states, "Show internal states of liblinphone, registrations and calls, according to linphonecore.h definitions",
"'states global': shows global state of liblinphone \n"
"'states calls': shows state of calls\n"
"'staticpic set' : Set path to picture that should be used.\n"
"'staticpic fps' : Get/set frames per seconds for picture emission.\n"
},
+ { "identify", lpc_cmd_identify, "Returns the user-agent string of far end",
+ "'identify' \t: returns remote user-agent string for current call.\n"
+ "'identify <id>' \t: returns remote user-agent string for call with supplied id.\n"
+ },
+ { "ringback", lpc_cmd_ringback, "Specifies a ringback tone to be played to remote end during incoming calls",
+ "'ringback <path of mono .wav file>'\t: Specifies a ringback tone to be played to remote end during incoming calls\n"
+ "'ringback disable'\t: Disable playing of ringback tone to callers\n"
+ },
{ NULL,NULL,NULL,NULL}
};
}
{
LinphoneCall *call;
+ LinphoneCallParams *cp=linphone_core_create_default_call_parameters (lc);
+ char *opt;
if ( linphone_core_in_call(lc) )
{
linphonec_out("Terminate or hold on the current call first.\n");
return 1;
}
- if ( NULL == (call=linphone_core_invite(lc, args)) )
+ opt=strstr(args,"--audio-only");
+ if (opt){
+ opt[0]='\0';
+ linphone_call_params_enable_video (cp,FALSE);
+ }
+ if ( NULL == (call=linphone_core_invite_with_params(lc, args,cp)) )
{
linphonec_out("Error from linphone_core_invite.\n");
}
{
snprintf(callee_name,sizeof(callee_name),"%s",args);
}
+ linphone_call_params_destroy(cp);
}
return 1;
}
lpc_cmd_terminate(LinphoneCore *lc, char *args)
{
if (linphone_core_get_calls(lc)==NULL){
- linphonec_out("No active calls");
+ linphonec_out("No active calls\n");
return 1;
}
if (!args)
LinphoneCall *call=linphonec_get_call(id);
if (call){
if (linphone_core_terminate_call(lc,call)==-1){
- linphonec_out("Could not stop the call with id %li",id);
+ linphonec_out("Could not stop the call with id %li\n",id);
}
}else return 0;
return 1;
}
linphone_core_remove_proxy_config(lc,cfg);
linphonec_out("Proxy %s removed.\n", cfg->reg_proxy);
- linphone_proxy_config_destroy(cfg);
}
static int
return 1;
}
+#ifdef VIDEO_ENABLED
static int lpc_cmd_video_window(LinphoneCore *lc, char *args){
char subcommand[64];
int a,b;
int err;
-#ifdef VIDEO_ENABLED
err=sscanf(args,"%s %i %i",subcommand,&a,&b);
if (err>=1){
if (strcmp(subcommand,"pos")==0){
lpc_video_params.refresh=TRUE;
}else return 0;
}
-#else
- linphonec_out("Sorry, this version of linphonec wasn't compiled with video support.");
-#endif
+
return 1;
}
+#endif
static void lpc_display_global_state(LinphoneCore *lc){
linphonec_out("Global liblinphone state\n%s\n",
return 0;
}
+#ifdef VIDEO_ENABLED
+static int lpc_cmd_camera(LinphoneCore *lc, char *args){
+ LinphoneCall *call=linphone_core_get_current_call(lc);
+ bool_t activated=FALSE;
+
+ if (linphone_core_video_enabled (lc)==FALSE){
+ linphonec_out("Video is disabled, re-run linphonec with -V option.");
+ return 1;
+ }
+
+ if (args){
+ if (strcmp(args,"on")==0)
+ activated=TRUE;
+ else if (strcmp(args,"off")==0)
+ activated=FALSE;
+ else
+ return 0;
+ }
+
+ if (call==NULL){
+ if (args){
+ linphonec_camera_enabled=activated;
+ }
+ if (linphonec_camera_enabled){
+ linphonec_out("Camera is enabled. Video stream will be setup immediately for outgoing and incoming calls.\n");
+ }else{
+ linphonec_out("Camera is disabled. Calls will be established with audio-only, with the possibility to later add video using 'camera on'.\n");
+ }
+ }else{
+ const LinphoneCallParams *cp=linphone_call_get_current_params (call);
+ if (args){
+ linphone_call_enable_camera(call,activated);
+ if ((activated && !linphone_call_params_video_enabled (cp))){
+ /*update the call to add the video stream*/
+ LinphoneCallParams *ncp=linphone_call_params_copy(cp);
+ linphone_call_params_enable_video(ncp,TRUE);
+ linphone_core_update_call(lc,call,ncp);
+ linphone_call_params_destroy (ncp);
+ linphonec_out("Trying to bring up video stream...\n");
+ }
+ }
+ if (linphone_call_camera_enabled (call))
+ linphonec_out("Camera is allowed for current call.\n");
+ else linphonec_out("Camera is dis-allowed for current call.\n");
+ }
+ return 1;
+}
+
+#endif
+
+static int lpc_cmd_identify(LinphoneCore *lc, char *args){
+ LinphoneCall *call;
+ const char *remote_ua;
+ if (args==NULL){
+ call=linphone_core_get_current_call(lc);
+ if (call==NULL) {
+ linphonec_out("There is currently running call. Specify call id.\n");
+ return 0;
+ }
+ }else{
+ call=linphonec_get_call(atoi(args));
+ if (call==NULL){
+ return 0;
+ }
+ }
+ remote_ua=linphone_call_get_remote_user_agent(call);
+ if (remote_ua){
+ linphonec_out("Remote user agent string is: %s\n",remote_ua);
+ }
+ return 1;
+}
+
+static int lpc_cmd_ringback(LinphoneCore *lc, char *args){
+ if (!args) return 0;
+ if (strcmp(args,"disable")==0){
+ linphone_core_set_remote_ringback_tone(lc,NULL);
+ linphonec_out("Disabling ringback tone.\n");
+ return 1;
+ }
+ linphone_core_set_remote_ringback_tone (lc,args);
+ linphonec_out("Using %s as ringback tone to be played to callers.",args);
+ return 1;
+}
+
/***************************************************************************
*
* Command table management funx
static ortp_pipe_t server_sock;
#endif /*_WIN32_WCE*/
+bool_t linphonec_camera_enabled=TRUE;
+
extern VideoParams lpc_video_params;
}
+static void linphonec_call_updated(LinphoneCall *call){
+ const LinphoneCallParams *cp=linphone_call_get_current_params(call);
+ if (!linphone_call_camera_enabled (call) && linphone_call_params_video_enabled (cp)){
+ linphonec_out("Far end requests to share video.\nType 'camera on' if you agree.");
+ }
+}
+
static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState st, const char *msg){
char *from=linphone_call_get_remote_address_as_string(call);
long id=(long)linphone_call_get_user_pointer (call);
break;
case LinphoneCallIncomingReceived:
linphonec_call_identify(call);
+ linphone_call_enable_camera (call,linphonec_camera_enabled);
id=(long)linphone_call_get_user_pointer (call);
linphonec_set_caller(from);
if ( auto_answer) {
case LinphoneCallOutgoingInit:
linphonec_call_identify(call);
break;
+ case LinphoneCallUpdatedByRemote:
+ linphonec_call_updated(call);
+ break;
default:
break;
}
{
fclose (mylogfile);
}
-
+ printf("\n");
exit(exit_status);
}
LinphoneCall *linphonec_get_call(long id);
void linphonec_call_identify(LinphoneCall* call);
+extern bool_t linphonec_camera_enabled;
+
#endif /* def LINPHONEC_H */
/****************************************************************************
INCLUDES = \
-I$(top_srcdir)\
- -I$(top_srcdir)/mediastreamer2/include
+ $(MEDIASTREAMER_CFLAGS)
lib_LTLIBRARIES=liblinphone.la
liblinphone_la_LIBADD= \
$(EXOSIP_LIBS) \
- $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+ $(MEDIASTREAMER_LIBS) \
$(ORTP_LIBS)
if BUILD_WIN32
test_lsd_SOURCES=test_lsd.c
-test_lsd_LDADD=liblinphone.la
+test_lsd_LDADD=liblinphone.la \
+ $(MEDIASTREAMER_LIBS) \
+ $(ORTP_LIBS)
AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \
$(ORTP_CFLAGS) \
$(OSIP_CFLAGS) \
+ $(MEDIASTREAMER_CFLAGS) \
$(EXOSIP_CFLAGS) \
-DENABLE_TRACE \
-DLOG_DOMAIN=\"LinphoneCore\" \
return sal_address_as_string_uri_only(u);
}
+static bool_t strings_equals(const char *s1, const char *s2){
+ if (s1==NULL && s2==NULL) return TRUE;
+ if (s1!=NULL && s2!=NULL && strcmp(s1,s2)==0) return TRUE;
+ return FALSE;
+}
+
+/**
+ * Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port.
+ * Returns TRUE if they are equal.
+**/
+bool_t linphone_address_weak_compare(const LinphoneAddress *a1, const LinphoneAddress *a2){
+ const char *u1,*u2;
+ const char *h1,*h2;
+ int p1,p2;
+ u1=linphone_address_get_username(a1);
+ u2=linphone_address_get_username(a2);
+ p1=linphone_address_get_port_int(a1);
+ p2=linphone_address_get_port_int(a2);
+ h1=linphone_address_get_domain(a1);
+ h2=linphone_address_get_domain(a2);
+ return strings_equals(u1,u2) && strings_equals(h1,h2) && p1==p2;
+}
+
/**
* Destroys a LinphoneAddress object.
**/
int linphone_address_get_port_int(const LinphoneAddress *u) {
return sal_address_get_port_int(u);
}
+
const char* linphone_address_get_port(const LinphoneAddress *u) {
return sal_address_get_port(u);
}
#include "linphonecore.h"
#include "private.h"
#include "mediastreamer2/mediastream.h"
+#include "lpconfig.h"
+static void register_failure(SalOp *op, SalError error, SalReason reason, const char *details);
static void linphone_connect_incoming(LinphoneCore *lc, LinphoneCall *call){
if (lc->ringstream!=NULL){
linphone_call_start_media_streams(call);
}
+static bool_t is_duplicate_call(LinphoneCore *lc, const LinphoneAddress *from, const LinphoneAddress *to){
+ MSList *elem;
+ for(elem=lc->calls;elem!=NULL;elem=elem->next){
+ LinphoneCall *call=(LinphoneCall*)elem->data;
+ if (linphone_address_weak_compare(call->log->from,from) &&
+ linphone_address_weak_compare(call->log->to, to)){
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
static void call_received(SalOp *h){
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(h));
char *barmesg;
const char *from,*to;
char *tmp;
LinphoneAddress *from_parsed;
-
+ LinphoneAddress *from_addr, *to_addr;
+ const char * early_media=linphone_core_get_remote_ringback_tone (lc);
+
/* first check if we can answer successfully to this invite */
if (lc->presence_mode==LinphoneStatusBusy ||
lc->presence_mode==LinphoneStatusOffline ||
}
from=sal_op_get_from(h);
to=sal_op_get_to(h);
+ from_addr=linphone_address_new(from);
+ to_addr=linphone_address_new(to);
+
+ if (is_duplicate_call(lc,from_addr,to_addr)){
+ ms_warning("Receiving duplicated call, refusing this one.");
+ sal_call_decline(h,SalReasonBusy,NULL);
+ linphone_address_destroy(from_addr);
+ linphone_address_destroy(to_addr);
+ return;
+ }
- call=linphone_call_new_incoming(lc,linphone_address_new(from),linphone_address_new(to),h);
-
+ call=linphone_call_new_incoming(lc,from_addr,to_addr,h);
sal_call_set_local_media_description(h,call->localdesc);
call->resultdesc=sal_call_get_final_media_description(h);
if (call->resultdesc)
linphone_call_unref(call);
return;
}
+
+
/* the call is acceptable so we can now add it to our list */
- if(linphone_core_add_call(lc,call)!= 0)
- {
- ms_warning("we cannot handle anymore call\n");
- sal_call_decline(h,SalReasonMedia,NULL);
- linphone_call_unref(call);
- return;
- }
+ linphone_core_add_call(lc,call);
+
from_parsed=linphone_address_new(sal_op_get_from(h));
linphone_address_clean(from_parsed);
tmp=linphone_address_as_string(from_parsed);
}else{
/*TODO : play a tone within the context of the current call */
}
- sal_call_notify_ringing(h);
+ sal_call_notify_ringing(h,early_media!=NULL);
#if !(__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)
linphone_call_init_media_streams(call);
+ if (early_media!=NULL){
+ linphone_call_start_early_media (call);
+ }
#endif
ms_free(barmesg);
ms_free(tmp);
if (lc->current_call!=call){
ms_error("Inconsitency detected: current call is %p but call %p is being paused !",lc->current_call,call);
}
+ }else{
+ linphone_call_set_state(call, LinphoneCallUpdatedByRemote,"Call updated by remote");
}
/*accept the modification (sends a 200Ok)*/
sal_call_accept(op);
static void call_terminated(SalOp *op, const char *from){
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
LinphoneCall *call=(LinphoneCall*)sal_op_get_user_pointer(op);
+
+ if (call==NULL) return;
if (linphone_call_get_state(call)==LinphoneCallEnd || linphone_call_get_state(call)==LinphoneCallError){
ms_warning("call_terminated: ignoring.");
sal_op_authenticate(h,&sai);
ai->usecount++;
}else{
+ if (ai && ai->works==FALSE) {
+ register_failure(h, SalErrorFailure, SalReasonForbidden, _("Authentication failure"));
+ }
if (lc->vtable.auth_info_requested)
lc->vtable.auth_info_requested(lc,realm,username);
}
char *msg;
cfg->registered=registered;
+ linphone_proxy_config_set_error(cfg,LinphoneErrorNone);
linphone_proxy_config_set_state(cfg, registered ? LinphoneRegistrationOk : LinphoneRegistrationCleared ,
registered ? "Registration sucessful" : "Unregistration done");
if (lc->vtable.display_status){
lc->vtable.display_status(lc,msg);
ms_free(msg);
}
+ if (error== SalErrorFailure && reason == SalReasonForbidden) {
+ linphone_proxy_config_set_error(cfg, LinphoneErrorBadCredentials);
+ } else if (error == SalErrorNoResponse) {
+ linphone_proxy_config_set_error(cfg, LinphoneErrorNoResponse);
+ }
linphone_proxy_config_set_state(cfg,LinphoneRegistrationFailed,details);
}
helloworld_SOURCES=helloworld.c
-helloworld_LDADD=$(top_builddir)/coreapi/liblinphone.la
+helloworld_LDADD=$(top_builddir)/coreapi/liblinphone.la \
+ $(MEDIASTREAMER_LIBS) \
+ $(ORTP_LIBS)
INCLUDES=-I$(top_srcdir)/coreapi \
- -I$(top_srcdir)/mediastreamer2/include
+ $(MEDIASTREAMER_CFLAGS)
AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \
$(ORTP_CFLAGS) \
$(OSIP_CFLAGS) \
+ $(MEDIASTREAMER_CFLAGS) \
$(EXOSIP_CFLAGS) \
-DENABLE_TRACE \
-DLOG_DOMAIN=\"LinphoneCore\" \
#include "mediastreamer2/mediastream.h"
#include "mediastreamer2/msvolume.h"
#include "mediastreamer2/msequalizer.h"
+#include "mediastreamer2/msfileplayer.h"
+#ifdef VIDEO_ENABLED
+static MSWebCam *get_nowebcam_device(){
+ return ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),"StaticImage: Static picture");
+}
+#endif
static MSList *make_codec_list(LinphoneCore *lc, const MSList *codecs, bool_t only_one_codec){
return l;
}
-static SalMediaDescription *create_local_media_description(LinphoneCore *lc,
- LinphoneCall *call, const char *username, bool_t only_one_codec){
+SalMediaDescription *create_local_media_description(LinphoneCore *lc,
+ LinphoneCall *call, bool_t with_video, bool_t only_one_codec){
MSList *l;
PayloadType *pt;
+ const char *me=linphone_core_get_identity(lc);
+ LinphoneAddress *addr=linphone_address_new(me);
+ const char *username=linphone_address_get_username (addr);
SalMediaDescription *md=sal_media_description_new();
+
md->nstreams=1;
strncpy(md->addr,call->localip,sizeof(md->addr));
strncpy(md->username,username,sizeof(md->username));
if (lc->dw_audio_bw>0)
md->streams[0].bandwidth=lc->dw_audio_bw;
- if (linphone_core_video_enabled (lc)){
+ if (with_video){
md->nstreams++;
md->streams[1].port=call->video_port;
md->streams[1].proto=SalProtoRtpAvp;
if (lc->dw_video_bw)
md->streams[1].bandwidth=lc->dw_video_bw;
}
+ linphone_address_destroy(addr);
return md;
}
}
}
-LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to)
+LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params)
{
LinphoneCall *call=ms_new0(LinphoneCall,1);
call->dir=LinphoneCallOutgoing;
call->core=lc;
linphone_core_get_local_ip(lc,linphone_address_get_domain(to),call->localip);
linphone_call_init_common(call,from,to);
- call->localdesc=create_local_media_description (lc,call,
- linphone_address_get_username(from),FALSE);
+ call->params=*params;
+ call->localdesc=create_local_media_description (lc,call,params->has_video,FALSE);
+ call->camera_active=params->has_video;
if (linphone_core_get_firewall_policy(call->core)==LinphonePolicyUseStun)
linphone_core_run_stun_tests(call->core,call);
discover_mtu(lc,linphone_address_get_domain (to));
LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, SalOp *op){
LinphoneCall *call=ms_new0(LinphoneCall,1);
- LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
char *to_str;
char *from_str;
linphone_address_clean(from);
linphone_core_get_local_ip(lc,linphone_address_get_domain(from),call->localip);
linphone_call_init_common(call, from, to);
+ call->params.has_video=linphone_core_video_enabled(lc);
call->localdesc=create_local_media_description (lc,call,
- linphone_address_get_username(me),lc->sip_conf.only_one_codec);
+ call->params.has_video,lc->sip_conf.only_one_codec);
+ call->camera_active=call->params.has_video;
if (linphone_core_get_firewall_policy(call->core)==LinphonePolicyUseStun)
linphone_core_run_stun_tests(call->core,call);
discover_mtu(lc,linphone_address_get_domain(from));
- linphone_address_destroy(me);
return call;
}
return "LinphoneCallEnd";
case LinphoneCallPausedByRemote:
return "LinphoneCallPausedByRemote";
+ case LinphoneCallUpdatedByRemote:
+ return "LinphoneCallUpdatedByRemote";
}
return "undefined state";
}
}
}
+/**
+ * Returns current parameters associated to the call.
+**/
+const LinphoneCallParams * linphone_call_get_current_params(const LinphoneCall *call){
+ return &call->params;
+}
+
/**
* Returns the remote address associated to this call
*
return call->refer_to;
}
+/**
+ * Returns direction of the call (incoming or outgoing).
+**/
LinphoneCallDir linphone_call_get_dir(const LinphoneCall *call){
return call->log->dir;
}
+/**
+ * Returns the far end's user agent description string, if available.
+**/
+const char *linphone_call_get_remote_user_agent(LinphoneCall *call){
+ if (call->op){
+ return sal_op_get_remote_ua (call->op);
+ }
+ return NULL;
+}
+
/**
* Returns true if this calls has received a transfer that has not been
* executed yet.
return time(NULL)-call->media_start_time;
}
+/**
+ * Indicate whether camera input should be sent to remote end.
+**/
+void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){
+#ifdef VIDEO_ENABLED
+ if (call->videostream!=NULL && call->videostream->ticker!=NULL){
+ LinphoneCore *lc=call->core;
+ MSWebCam *nowebcam=get_nowebcam_device();
+ if (call->camera_active!=enable && lc->video_conf.device!=nowebcam){
+ video_stream_change_camera(call->videostream,
+ enable ? lc->video_conf.device : nowebcam);
+ }
+ }
+ call->camera_active=enable;
+#endif
+}
+
+/**
+ *
+**/
+bool_t linphone_call_camera_enabled (const LinphoneCall *call){
+ return call->camera_active;
+}
+
+/**
+ *
+**/
+void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled){
+ cp->has_video=enabled;
+}
+
+/**
+ *
+**/
+bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp){
+ return cp->has_video;
+}
+
+/**
+ *
+**/
+LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp){
+ LinphoneCallParams *ncp=ms_new0(LinphoneCallParams,1);
+ memcpy(ncp,cp,sizeof(LinphoneCallParams));
+ return ncp;
+}
+
+/**
+ *
+**/
+void linphone_call_params_destroy(LinphoneCallParams *p){
+ ms_free(p);
+}
+
/**
* @}
**/
return prof;
}
-void linphone_call_start_media_streams(LinphoneCall *call){
+static void setup_ring_player(LinphoneCore *lc, LinphoneCall *call){
+ int pause_time=3000;
+ audio_stream_play(call->audiostream,lc->sound_conf.ringback_tone);
+ ms_filter_call_method(call->audiostream->soundread,MS_FILE_PLAYER_LOOP,&pause_time);
+}
+
+static void _linphone_call_start_media_streams(LinphoneCall *call, bool_t send_early_media){
LinphoneCore *lc=call->core;
LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
const char *tool="linphone-" LINPHONE_VERSION;
if (stream->port==0 || stream->dir==SalStreamRecvOnly){
captcard=NULL;
playfile=NULL;
- }else if (stream->dir==SalStreamSendOnly){
+ }else if (stream->dir==SalStreamSendOnly || send_early_media){
playcard=NULL;
captcard=NULL;
recfile=NULL;
+ if (send_early_media)
+ playfile=NULL;
}
/*if playfile are supplied don't use soundcards*/
if (lc->use_files) {
recfile,
playcard,
captcard,
- linphone_core_echo_cancellation_enabled(lc));
+ send_early_media ? FALSE : linphone_core_echo_cancellation_enabled(lc));
post_configure_audio_streams(call);
+ if (send_early_media) setup_ring_player(lc,call);
audio_stream_set_rtcp_information(call->audiostream, cname, tool);
}else ms_warning("No audio stream accepted ?");
}
}
#ifdef VIDEO_ENABLED
- {
+ if (!send_early_media){
const SalStreamDescription *stream=sal_media_description_find_stream(call->resultdesc,
SalProtoRtpAvp,SalVideo);
used_pt=-1;
VideoStreamDir dir=VideoStreamSendRecv;
MSWebCam *cam=lc->video_conf.device;
bool_t is_inactive=FALSE;
+
+ call->params.has_video=TRUE;
video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc));
video_stream_enable_self_view(call->videostream,lc->video_conf.selfview);
if (stream->dir==SalStreamSendOnly && lc->video_conf.capture ){
- cam=ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),"StaticImage: Static picture");
+ cam=get_nowebcam_device();
dir=VideoStreamSendOnly;
}else if (stream->dir==SalStreamRecvOnly && lc->video_conf.display ){
dir=VideoStreamRecvOnly;
/*either inactive or incompatible with local capabilities*/
is_inactive=TRUE;
}
+ if (call->camera_active==FALSE){
+ cam=get_nowebcam_device();
+ }
if (!is_inactive){
video_stream_set_direction (call->videostream, dir);
video_stream_start(call->videostream,
}
+void linphone_call_start_media_streams(LinphoneCall *call){
+ _linphone_call_start_media_streams(call,FALSE);
+}
+
+void linphone_call_start_early_media(LinphoneCall *call){
+ _linphone_call_start_media_streams(call,TRUE);
+}
static void linphone_call_log_fill_stats(LinphoneCallLog *log, AudioStream *st){
audio_stream_get_local_rtp_stats (st,&log->local_stats);
}
}
-
gain=lp_config_get_float(lc->config,"sound","playback_gain_db",0);
linphone_core_set_playback_gain_db (lc,gain);
+
+ linphone_core_set_remote_ringback_tone (lc,lp_config_get_string(lc->config,"sound","ringback_tone",NULL));
}
static void sip_config_read(LinphoneCore *lc)
return l;
}
+static MSList *codec_append_if_new(MSList *l, PayloadType *pt){
+ MSList *elem;
+ for (elem=l;l!=NULL;l=elem->next){
+ PayloadType *ept=(PayloadType*)elem->data;
+ if (pt==ept)
+ return l;
+ }
+ l=ms_list_append(l,pt);
+ return l;
+}
+
static void codecs_config_read(LinphoneCore *lc)
{
int i;
if (pt){
if (!ms_filter_codec_supported(pt->mime_type)){
ms_warning("Codec %s is not supported by mediastreamer2, removed.",pt->mime_type);
- }else audio_codecs=ms_list_append(audio_codecs,pt);
+ }else audio_codecs=codec_append_if_new(audio_codecs,pt);
}
}
audio_codecs=add_missing_codecs(SalAudio,audio_codecs);
if (pt){
if (!ms_filter_codec_supported(pt->mime_type)){
ms_warning("Codec %s is not supported by mediastreamer2, removed.",pt->mime_type);
- }else video_codecs=ms_list_append(video_codecs,(void *)pt);
+ }else video_codecs=codec_append_if_new(video_codecs,(void *)pt);
}
}
video_codecs=add_missing_codecs(SalVideo,video_codecs);
/**
* Returns the default identity SIP address.
*
- * @ingroup proxiesb
+ * @ingroup proxies
* This is an helper function:
*
* If no default proxy is set, this will return the primary contact (
* @ingroup call_control
* @param lc the LinphoneCore object
* @param url the destination of the call (sip address, or phone number).
+ *
+ * The application doesn't own a reference to the returned LinphoneCall object.
+ * Use linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.
+ *
+ * @Returns a LinphoneCall object or NULL in case of failure
**/
LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url){
+ LinphoneCall *call;
+ LinphoneCallParams *p=linphone_core_create_default_call_parameters (lc);
+ call=linphone_core_invite_with_params(lc,url,p);
+ linphone_call_params_destroy(p);
+ return call;
+}
+
+
+/**
+ * Initiates an outgoing call according to supplied call parameters
+ *
+ * @ingroup call_control
+ * @param lc the LinphoneCore object
+ * @param url the destination of the call (sip address, or phone number).
+ * @param p call parameters
+ *
+ * The application doesn't own a reference to the returned LinphoneCall object.
+ * Use linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.
+ *
+ * @Returns a LinphoneCall object or NULL in case of failure
+**/
+LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const char *url, const LinphoneCallParams *p){
LinphoneAddress *addr=linphone_core_interpret_url(lc,url);
if (addr){
LinphoneCall *call;
- call=linphone_core_invite_address(lc,addr);
+ call=linphone_core_invite_address_with_params(lc,addr,p);
linphone_address_destroy(addr);
return call;
}
*
* @ingroup call_control
* @param lc the LinphoneCore object
- * @param real_parsed_url the destination of the call (sip address).
+ * @param addr the destination of the call (sip address).
*
* The LinphoneAddress can be constructed directly using linphone_address_new(), or
* created by linphone_core_interpret_url().
+ * The application doesn't own a reference to the returned LinphoneCall object.
+ * Use linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.
+ *
+ * @Returns a LinphoneCall object or NULL in case of failure
**/
-LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *real_parsed_url)
+LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *addr){
+ LinphoneCall *call;
+ LinphoneCallParams *p=linphone_core_create_default_call_parameters (lc);
+ call=linphone_core_invite_address_with_params (lc,addr,p);
+ linphone_call_params_destroy(p);
+ return call;
+}
+
+
+/**
+ * Initiates an outgoing call given a destination LinphoneAddress
+ *
+ * @ingroup call_control
+ * @param lc the LinphoneCore object
+ * @param addr the destination of the call (sip address).
+ @param params call parameters
+ *
+ * The LinphoneAddress can be constructed directly using linphone_address_new(), or
+ * created by linphone_core_interpret_url().
+ * The application doesn't own a reference to the returned LinphoneCall object.
+ * Use linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.
+ *
+ * @Returns a LinphoneCall object or NULL in case of failure
+**/
+LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const LinphoneAddress *addr, const LinphoneCallParams *params)
{
int err=0;
const char *route=NULL;
linphone_core_get_default_proxy(lc,&proxy);
route=linphone_core_get_route(lc);
- real_url=linphone_address_as_string(real_parsed_url);
- dest_proxy=linphone_core_lookup_known_proxy(lc,real_parsed_url);
+ real_url=linphone_address_as_string(addr);
+ dest_proxy=linphone_core_lookup_known_proxy(lc,addr);
if (proxy!=dest_proxy && dest_proxy!=NULL) {
ms_message("Overriding default proxy setting for this call:");
parsed_url2=linphone_address_new(from);
- call=linphone_call_new_outgoing(lc,parsed_url2,linphone_address_clone(real_parsed_url));
+ call=linphone_call_new_outgoing(lc,parsed_url2,linphone_address_clone(addr),params);
sal_op_set_route(call->op,route);
if(linphone_core_add_call(lc,call)!= 0)
return FALSE;
}
+/**
+ * Updates a running call according to supplied call parameters.
+ *
+ * For the moment, this is limited to enabling or disabling the video stream.
+ *
+ * @Returns 0 if successful, -1 otherwise.
+**/
+int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, LinphoneCallParams *params){
+ int err;
+
+ if (call->localdesc)
+ sal_media_description_unref(call->localdesc);
+ call->localdesc=create_local_media_description (lc,call,
+ params->has_video,FALSE);
+ if (lc->vtable.display_status)
+ lc->vtable.display_status(lc,_("Modifying call parameters..."));
+ sal_call_set_local_media_description (call->op,call->localdesc);
+ err=sal_call_update(call->op);
+ return err;
+}
+
/**
* Accept an incoming call.
sal_op_set_contact(call->op,contact);
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
linphone_call_init_media_streams(call);
+#else
+ if (call->audiostream!=NULL && call->audiostream->ticker!=NULL){
+ /*case where we sent early media*/
+ linphone_call_stop_media_streams (call);
+ linphone_call_init_media_streams (call);
+ }
#endif
sal_call_accept(call->op);
if (lc->vtable.display_status!=NULL)
**/
void linphone_core_stop_dtmf(LinphoneCore *lc){
MSFilter *f=get_dtmf_gen(lc);
- ms_filter_call_method_noarg (f, MS_DTMF_GEN_STOP);
+ if (f!=NULL)
+ ms_filter_call_method_noarg (f, MS_DTMF_GEN_STOP);
}
return 0;
}
+/**
+ * Specifiies a ring back tone to be played to far end during incoming calls.
+**/
+void linphone_core_set_remote_ringback_tone(LinphoneCore *lc, const char *file){
+ if (lc->sound_conf.ringback_tone){
+ ms_free(lc->sound_conf.ringback_tone);
+ lc->sound_conf.ringback_tone=NULL;
+ }
+ if (file)
+ lc->sound_conf.ringback_tone=ms_strdup(file);
+}
+
+/**
+ * Returns the ring back tone played to far end during incoming calls.
+**/
+const char *linphone_core_get_remote_ringback_tone(const LinphoneCore *lc){
+ return lc->sound_conf.ringback_tone;
+}
+
static PayloadType* find_payload_type_from_list(const char* type, int rate,const MSList* from) {
const MSList *elem;
for(elem=from;elem!=NULL;elem=elem->next){
LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc){
return lc->state;
}
+
+LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc){
+ LinphoneCallParams *p=ms_new0(LinphoneCallParams,1);
+ p->has_video=linphone_core_video_enabled(lc);
+ return p;
+}
+
+const char *linphone_error_to_string(LinphoneError err){
+ switch(err){
+ case LinphoneErrorNone:
+ return "No error";
+ case LinphoneErrorNoResponse:
+ return "No response";
+ case LinphoneErrorBadCredentials:
+ return "Bad credentials";
+ }
+ return "unknown error";
+}
void linphone_address_clean(LinphoneAddress *uri);
char *linphone_address_as_string(const LinphoneAddress *u);
char *linphone_address_as_string_uri_only(const LinphoneAddress *u);
+bool_t linphone_address_weak_compare(const LinphoneAddress *a1, const LinphoneAddress *a2);
void linphone_address_destroy(LinphoneAddress *u);
struct _SipSetupContext;
char * linphone_call_log_to_str(LinphoneCallLog *cl);
+/**
+ * The LinphoneCallParams is an object contaning various call related parameters.
+ * It can be used to retrieve parameters from a currently running call or modify the call's characterisitcs
+ * dynamically.
+**/
+struct _LinphoneCallParams;
+typedef struct _LinphoneCallParams LinphoneCallParams;
+
+LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp);
+void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled);
+bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp);
+void linphone_call_params_destroy(LinphoneCallParams *cp);
+
+/**
+ * Enum describing failure reasons.
+**/
+enum _LinphoneError{
+ LinphoneErrorNone,
+ LinphoneErrorNoResponse, /**<No response received from remote*/
+ LinphoneErrorBadCredentials /**<Authentication failed due to bad or missing credentials*/
+};
+
+typedef enum _LinphoneError LinphoneError;
+
+const char *linphone_error_to_string(LinphoneError err);
+
/**
* The LinphoneCall object represents a call issued or received by the LinphoneCore
**/
LinphoneCallRefered,
LinphoneCallError,
LinphoneCallEnd,
- LinphoneCallPausedByRemote
+ LinphoneCallPausedByRemote,
+ LinphoneCallUpdatedByRemote /**<used when video is asked by remote */
} LinphoneCallState;
const char *linphone_call_state_to_string(LinphoneCallState cs);
const char *linphone_call_get_refer_to(const LinphoneCall *call);
bool_t linphone_call_has_transfer_pending(const LinphoneCall *call);
int linphone_call_get_duration(const LinphoneCall *call);
+const LinphoneCallParams * linphone_call_get_current_params(const LinphoneCall *call);
+void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled);
+bool_t linphone_call_camera_enabled(const LinphoneCall *lc);
+LinphoneError linphone_call_get_error(const LinphoneCall *call);
+const char *linphone_call_get_remote_user_agent(LinphoneCall *call);
void *linphone_call_get_user_pointer(LinphoneCall *call);
void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer);
bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg);
const char * linphone_proxy_config_get_dial_prefix(const LinphoneProxyConfig *cfg);
+LinphoneError linphone_proxy_config_get_error(const LinphoneProxyConfig *cfg);
+
/* destruction is called automatically when removing the proxy config */
void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type);
LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *addr);
+LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const char *url, const LinphoneCallParams *params);
+
+LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const LinphoneAddress *addr, const LinphoneCallParams *params);
+
int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char *refer_to);
bool_t linphone_core_inc_invite_pending(LinphoneCore*lc);
int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call);
+int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, LinphoneCallParams *params);
+
+LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc);
+
LinphoneCall *linphone_core_get_call_by_remote_address(LinphoneCore *lc, const char *remote_address);
void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf);
const char *linphone_core_get_primary_contact(LinphoneCore *lc);
+const char * linphone_core_get_identity(LinphoneCore *lc);
+
void linphone_core_set_guess_hostname(LinphoneCore *lc, bool_t val);
bool_t linphone_core_get_guess_hostname(LinphoneCore *lc);
void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val);
LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc);
-
+const char * linphone_core_get_identity(LinphoneCore *lc);
/*0= no bandwidth limit*/
void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw);
void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw);
const char *linphone_core_get_ring(const LinphoneCore *lc);
void linphone_core_set_ringback(LinphoneCore *lc, const char *path);
const char * linphone_core_get_ringback(const LinphoneCore *lc);
+void linphone_core_set_remote_ringback_tone(LinphoneCore *lc,const char *);
+const char *linphone_core_get_remote_ringback_tone(const LinphoneCore *lc);
int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata);
void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val);
bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc);
int linphone_core_get_current_call_duration(const LinphoneCore *lc);
-const LinphoneAddress *linphone_core_get_remote_address(LinphoneCore *lc);
+
int linphone_core_get_mtu(const LinphoneCore *lc);
void linphone_core_set_mtu(LinphoneCore *lc, int mtu);
for(i=0,j=0;i<local_offer->nstreams;++i){
ms_message("Processing for stream %i",i);
ls=&local_offer->streams[i];
- rs=sal_media_description_find_stream(remote_answer,ls->proto,ls->type);
+ rs=sal_media_description_find_stream((SalMediaDescription*)remote_answer,ls->proto,ls->type);
if (rs) {
initiate_outgoing(ls,rs,&result->streams[j]);
++j;
for(i=0,j=0;i<remote_offer->nstreams;++i){
rs=&remote_offer->streams[i];
ms_message("Processing for stream %i",i);
- ls=sal_media_description_find_stream(local_capabilities,rs->proto,rs->type);
+ ls=sal_media_description_find_stream((SalMediaDescription*)local_capabilities,rs->proto,rs->type);
if (ls){
initiate_incoming(ls,rs,&result->streams[j]);
++j;
#endif
#endif
+
+struct _LinphoneCallParams{
+ bool_t has_video;
+ bool_t pad[3];
+};
+
struct _LinphoneCall
{
struct _LinphoneCore *core;
struct _AudioStream *audiostream; /**/
struct _VideoStream *videostream;
char *refer_to;
+ LinphoneCallParams params;
bool_t refer_pending;
bool_t media_pending;
bool_t audio_muted;
+ bool_t camera_active;
};
-LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to);
+
+LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params);
LinphoneCall * linphone_call_new_incoming(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, SalOp *op);
void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const char *message);
void linphone_call_init_media_streams(LinphoneCall *call);
void linphone_call_start_media_streams(LinphoneCall *call);
-void linphone_call_set_media_streams_dir(LinphoneCall *call, SalStreamDir dir);
+void linphone_call_start_early_media(LinphoneCall *call);
void linphone_call_stop_media_streams(LinphoneCall *call);
const char * linphone_core_get_identity(LinphoneCore *lc);
int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphoneProxyConfig *dest_proxy);
void linphone_core_start_pending_refered_calls(LinphoneCore *lc);
extern SalCallbacks linphone_sal_callbacks;
-
+void linphone_proxy_config_set_error(LinphoneProxyConfig *cfg,LinphoneError error);
struct _LinphoneProxyConfig
{
bool_t dial_escape_plus;
void* user_data;
time_t deletion_date;
+ LinphoneError error;
};
struct _LinphoneAuthInfo
char source;
char *local_ring;
char *remote_ring;
+ char *ringback_tone;
bool_t ec;
bool_t ea;
bool_t agc;
void linphone_core_set_state(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message);
+SalMediaDescription *create_local_media_description(LinphoneCore *lc,
+ LinphoneCall *call, bool_t with_video, bool_t only_one_codec);
+
#define HOLD_OFF (0)
#define HOLD_ON (1)
}
return NULL;
}
+LinphoneError linphone_proxy_config_get_error(const LinphoneProxyConfig *cfg) {
+ return cfg->error;
+}
+void linphone_proxy_config_set_error(LinphoneProxyConfig *cfg,LinphoneError error) {
+ cfg->error = error;
+}
}
}
-const SalStreamDescription *sal_media_description_find_stream(const SalMediaDescription *md,
+SalStreamDescription *sal_media_description_find_stream(SalMediaDescription *md,
SalMediaProto proto, SalStreamType type){
int i;
for(i=0;i<md->nstreams;++i){
- const SalStreamDescription *ss=&md->streams[i];
+ SalStreamDescription *ss=&md->streams[i];
if (ss->proto==proto && ss->type==type) return ss;
}
return NULL;
return ((SalOpBase*)op)->route;
}
+const char *sal_op_get_remote_ua(const SalOp *op){
+ return ((SalOpBase*)op)->remote_ua;
+}
+
void *sal_op_get_user_pointer(const SalOp *op){
return ((SalOpBase*)op)->user_pointer;
}
ms_free(b->origin);
b->origin=NULL;
}
+ if (b->remote_ua){
+ ms_free(b->remote_ua);
+ b->remote_ua=NULL;
+ }
if (b->local_media)
sal_media_description_unref(b->local_media);
if (b->remote_media)
void sal_media_description_unref(SalMediaDescription *md);
bool_t sal_media_description_empty(const SalMediaDescription *md);
bool_t sal_media_description_has_dir(const SalMediaDescription *md, SalStreamDir dir);
-const SalStreamDescription *sal_media_description_find_stream(const SalMediaDescription *md,
+SalStreamDescription *sal_media_description_find_stream(SalMediaDescription *md,
SalMediaProto proto, SalStreamType type);
void sal_media_description_set_dir(SalMediaDescription *md, SalStreamDir stream_dir);
char *from;
char *to;
char *origin;
+ char *remote_ua;
SalMediaDescription *local_media;
SalMediaDescription *remote_media;
void *user_pointer;
const char *sal_op_get_proxy(const SalOp *op);
/*for incoming requests, returns the origin of the packet as a sip uri*/
const char *sal_op_get_network_origin(const SalOp *op);
+/*returns far-end "User-Agent" string */
+const char *sal_op_get_remote_ua(const SalOp *op);
void *sal_op_get_user_pointer(const SalOp *op);
/*Call API*/
int sal_call_set_local_media_description(SalOp *h, SalMediaDescription *desc);
int sal_call(SalOp *h, const char *from, const char *to);
-int sal_call_notify_ringing(SalOp *h);
+int sal_call_notify_ringing(SalOp *h, bool_t early_media);
/*accept an incoming call or, during a call accept a reINVITE*/
int sal_call_accept(SalOp*h);
int sal_call_decline(SalOp *h, SalReason reason, const char *redirection /*optional*/);
int sal_call_hold(SalOp *h, bool_t holdon);
+int sal_call_update(SalOp *h);
SalMediaDescription * sal_call_get_final_media_description(SalOp *h);
int sal_refer(SalOp *h, const char *refer_to);
int sal_refer_accept(SalOp *h);
return 0;
}
-int sal_call_notify_ringing(SalOp *h){
- eXosip_lock();
- eXosip_call_send_answer(h->tid,180,NULL);
- eXosip_unlock();
+int sal_call_notify_ringing(SalOp *h, bool_t early_media){
+ osip_message_t *msg;
+ int err;
+
+ /*if early media send also 180 and 183 */
+ if (early_media && h->sdp_answer){
+ msg=NULL;
+ eXosip_lock();
+ err=eXosip_call_build_answer(h->tid,180,&msg);
+ if (msg){
+ set_sdp(msg,h->sdp_answer);
+ eXosip_call_send_answer(h->tid,180,msg);
+ }
+ msg=NULL;
+ err=eXosip_call_build_answer(h->tid,183,&msg);
+ if (msg){
+ set_sdp(msg,h->sdp_answer);
+ eXosip_call_send_answer(h->tid,183,msg);
+ }
+ eXosip_unlock();
+ }else{
+ eXosip_lock();
+ eXosip_call_send_answer(h->tid,180,NULL);
+ eXosip_unlock();
+ }
return 0;
}
__sal_op_set_network_origin(op,origin);
}
+static void set_remote_ua(SalOp* op, osip_message_t *req){
+ if (op->base.remote_ua==NULL){
+ osip_header_t *h=NULL;
+ osip_message_get_user_agent(req,0,&h);
+ if (h){
+ op->base.remote_ua=ms_strdup(h->hvalue);
+ }
+ }
+}
+
static SalOp *find_op(Sal *sal, eXosip_event_t *ev){
if (ev->cid>0){
return sal_find_call(sal,ev->cid);
sdp_message_t *sdp=eXosip_get_sdp_info(ev->request);
set_network_origin(op,ev->request);
+ set_remote_ua(op,ev->request);
if (sdp){
op->sdp_offering=FALSE;
sdp_message_t *sdp;
SalOp *op=find_op(sal,ev);
if (call_proceeding(sal, ev)==-1) return;
-
+
+ set_remote_ua(op,ev->response);
sdp=eXosip_get_sdp_info(ev->response);
if (sdp){
op->base.remote_media=sal_media_description_new();
}
op->did=ev->did;
-
+ set_remote_ua(op,ev->response);
+
sdp=eXosip_get_sdp_info(ev->response);
if (sdp){
op->base.remote_media=sal_media_description_new();
ctx->keepalive_period=value;
eXosip_set_option (EXOSIP_OPT_UDP_KEEP_ALIVE, &value);
}
+
const char * sal_address_get_port(const SalAddress *addr) {
const osip_from_t *u=(const osip_from_t*)addr;
return null_if_empty(u->url->port);
}
+
int sal_address_get_port_int(const SalAddress *uri) {
const char* port = sal_address_get_port(uri);
if (port != NULL) {
return err;
}
+/* sends a reinvite. Local media description may have changed by application since call establishment*/
+int sal_call_update(SalOp *h){
+ int err=0;
+ osip_message_t *reinvite=NULL;
+
+ eXosip_lock();
+ if(eXosip_call_build_request(h->did,"INVITE",&reinvite) != OSIP_SUCCESS || reinvite==NULL){
+ eXosip_unlock();
+ return -1;
+ }
+ eXosip_unlock();
+ osip_message_set_subject(reinvite,osip_strdup("Phone call parameters updated"));
+ osip_message_set_allow(reinvite, "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO");
+ if (h->base.root->session_expires!=0){
+ osip_message_set_header(reinvite, "Session-expires", "200");
+ osip_message_set_supported(reinvite, "timer");
+ }
+ if (h->base.local_media){
+ h->sdp_offering=TRUE;
+ set_sdp_from_desc(reinvite,h->base.local_media);
+ }else h->sdp_offering=FALSE;
+ eXosip_lock();
+ err = eXosip_call_send_request(h->did, reinvite);
+ eXosip_unlock();
+ return err;
+}
loginframe.c \
linphone.h
-linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \
- $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+linphone_3_LDADD=$(ORTP_LIBS) \
+ $(MEDIASTREAMER_LIBS) \
$(top_builddir)/coreapi/liblinphone.la \
$(LIBGTK_LIBS) $(INTLLIBS)
AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
- -I$(top_srcdir)/mediastreamer2/include/ \
+ $(MEDIASTREAMER_CFLAGS) \
$(ORTP_CFLAGS) \
$(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
$(OSIP_CFLAGS)
-version_date.h: $(top_srcdir)/configure.in
+version_date.h: $(top_srcdir)/configure.ac
echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
newdate:
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
- GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration");
GtkWidget *animation=linphone_gtk_get_widget(callview,"in_call_animation");
GdkPixbufAnimation *pbuf=create_pixbuf_animation("calling_anim.gif");
GtkWidget *answer_button;
gtk_label_set_markup(GTK_LABEL(status),_("<b>Incoming call</b>"));
gtk_widget_show_all(linphone_gtk_get_widget(callview,"answer_decline_panel"));
+ gtk_widget_hide(linphone_gtk_get_widget(callview,"duration_frame"));
+ gtk_widget_hide(linphone_gtk_get_widget(callview,"mute_pause_buttons"));
display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
answer_button=linphone_gtk_get_widget(callview,"accept_call");
gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(callview,"decline_call")),
create_pixmap (linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png")));
- gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
if (pbuf!=NULL){
gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
g_object_unref(G_OBJECT(pbuf));
display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
+ gtk_widget_show(linphone_gtk_get_widget(callview,"duration_frame"));
+ gtk_widget_show(linphone_gtk_get_widget(callview,"mute_pause_buttons"));
gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
gtk_label_set_markup(GTK_LABEL(status),_("<b>In call</b>"));
void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon);
void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
-
+void linphone_gtk_exit_login_frame(void);
+void linphone_gtk_set_ui_config(const char *key, const char *value);
NetworkKindOpticalFiber
};
-static gboolean check_login_ok(LinphoneProxyConfig *cfg){
- if (linphone_proxy_config_is_registered(cfg)){
- linphone_gtk_exit_login_frame();
- return FALSE;
- }
- return TRUE;
-}
-
static void do_login(SipSetupContext *ssctx, const char *identity, const char * passwd){
- GtkWidget *mw=linphone_gtk_get_main_window();
if (sip_setup_context_login_account(ssctx,identity,passwd)==0){
- guint t=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"login_tout"));
- if (t!=0) g_source_remove(t);
- t=g_timeout_add(50,(GSourceFunc)check_login_ok,sip_setup_context_get_proxy_config(ssctx));
- g_object_set_data(G_OBJECT(mw),"login_tout",GINT_TO_POINTER(t));
}
}
static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
+ LinphoneAddress *addr;
+ const char *username;
+ char *tmp;
if (ssctx==NULL) return TRUE;/*not ready ?*/
- do_login(ssctx,linphone_proxy_config_get_identity(cfg),NULL);
+ username=linphone_gtk_get_ui_config ("login_username",NULL);
+ if (username==NULL) {
+ linphone_gtk_set_ui_config_int("automatic_login",0);
+ linphone_gtk_show_login_frame(cfg);
+ return FALSE;
+ }
+ addr=linphone_address_new(linphone_proxy_config_get_identity(cfg));
+ linphone_address_set_username(addr,username);
+ tmp=linphone_address_as_string (addr);
+ do_login(ssctx,tmp,NULL);
+ linphone_address_destroy(addr);
return FALSE;
}
g_free(str);
from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
+ if (linphone_address_get_username(from)[0]=='?'){
+ const char *username=linphone_gtk_get_ui_config ("login_username",NULL);
+ if (username)
+ linphone_address_set_username(from,username);
+ }
ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from));
/*display the last entered username, if not '?????'*/
autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")));
linphone_gtk_set_ui_config_int("automatic_login",autologin);
+ linphone_gtk_set_ui_config("login_username",username);
from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
linphone_address_set_username(from,username);
static LinphoneCore *the_core=NULL;
static GtkWidget *the_ui=NULL;
+static void linphone_gtk_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState rs, const char *msg);
static void linphone_gtk_show(LinphoneCore *lc);
static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid);
static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url);
.description = N_("if set automatically answer incoming calls")
},
#ifdef WIN32
- { /* zsd addition */
+ {
.long_name = "workdir",
.short_name = '\0',
.arg = G_OPTION_ARG_STRING,
LinphoneCoreVTable vtable={0};
vtable.call_state_changed=linphone_gtk_call_state_changed;
+ vtable.registration_state_changed=linphone_gtk_registration_state_changed;
vtable.show=linphone_gtk_show;
vtable.notify_presence_recv=linphone_gtk_notify_recv;
vtable.new_unknown_subscriber=linphone_gtk_new_unknown_subscriber;
struct stat filestat;
const char *license_file=PACKAGE_DATA_DIR "/linphone/COPYING";
GtkWidget *about;
+ const char *tmp;
GdkPixbuf *logo=create_pixbuf(
linphone_gtk_get_ui_config("logo","linphone-banner.png"));
+ static const char *defcfg="defcfg";
about=linphone_gtk_create_window("about");
gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL);
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("title","Linphone"));
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("home","http://www.linphone.org"));
if (logo) gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about),logo);
-
+ tmp=linphone_gtk_get_ui_config("artists",defcfg);
+ if (tmp!=defcfg){
+ const char *tmp2[2];
+ tmp2[0]=tmp;
+ tmp2[1]=NULL;
+ gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(about),tmp2);
+ }
+ tmp=linphone_gtk_get_ui_config("translators",defcfg);
+ if (tmp!=defcfg)
+ gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(about),tmp);
+ tmp=linphone_gtk_get_ui_config("comments",defcfg);
+ if (tmp!=defcfg)
+ gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about),tmp);
gtk_widget_show(about);
}
linphone_gtk_update_call_buttons (call);
}
+static void linphone_gtk_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg,
+ LinphoneRegistrationState rs, const char *msg){
+ switch (rs){
+ case LinphoneRegistrationOk:
+ if (cfg){
+ SipSetup *ss=linphone_proxy_config_get_sip_setup(cfg);
+ if (ss && (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_LOGIN)){
+ linphone_gtk_exit_login_frame();
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+
static void icon_popup_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){
GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(status_icon),"menu");
gtk_menu_popup(GTK_MENU(menu),NULL,NULL,gtk_status_icon_position_menu,status_icon,button,activate_time);
static const char *search_icon;
static gboolean update_check_menu;
static gboolean buttons_have_borders;
+ static gboolean show_abcd;
GtkWidget *w=linphone_gtk_get_main_window();
if (!config_loaded){
title=linphone_gtk_get_ui_config("title","Linphone");
search_icon=linphone_gtk_get_ui_config("directory_search_icon",NULL);
update_check_menu=linphone_gtk_get_ui_config_int("update_check_menu",0);
buttons_have_borders=linphone_gtk_get_ui_config_int("buttons_border",1);
+ show_abcd=linphone_gtk_get_ui_config_int("show_abcd",1);
config_loaded=TRUE;
}
linphone_gtk_configure_window(w,"main_window");
if (update_check_menu){
gtk_widget_show(linphone_gtk_get_widget(w,"versioncheck_item"));
}
+ if (!show_abcd){
+ gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_A"));
+ gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_B"));
+ gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_C"));
+ gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_D"));
+ gtk_table_resize(GTK_TABLE(linphone_gtk_get_widget(w,"dtmf_table")),4,3);
+ }
}
void linphone_gtk_manage_login(void){
}
-void linphone_gtk_close(GtkWidget *mw){
+gboolean linphone_gtk_close(GtkWidget *mw){
/*shutdown calls if any*/
LinphoneCore *lc=linphone_gtk_get_core();
if (linphone_core_in_call(lc)){
}
linphone_core_enable_video_preview(lc,FALSE);
gtk_widget_hide(mw);
+ return TRUE;
}
static void linphone_gtk_init_main_window(){
<child>
<object class="GtkMenuItem" id="menuitem4">
<property name="visible">True</property>
- <property name="label" translatable="yes">Aid_e</property>
+ <property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu3">
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="add_contact_button">
+ <property name="label" translatable="yes">Add contact</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image6</property>
+ <signal name="clicked" handler="linphone_gtk_add_contact"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkFrame" id="duration_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<child>
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox4">
+ <object class="GtkHButtonBox" id="mute_pause_buttons">
<property name="visible">True</property>
<property name="layout_style">spread</property>
<child>
</object>
</child>
</object>
+ <object class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ </object>
</interface>
<?xml version="1.0"?>
<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="adjustment1">
- <property name="upper">3001</property>
+ <property name="value">500</property>
<property name="lower">500</property>
- <property name="page_increment">10</property>
+ <property name="upper">3001</property>
<property name="step_increment">1</property>
+ <property name="page_increment">10</property>
<property name="page_size">10</property>
- <property name="value">500</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
- <property name="upper">65535</property>
+ <property name="value">1</property>
<property name="lower">1</property>
- <property name="page_increment">10</property>
+ <property name="upper">65535</property>
<property name="step_increment">1</property>
+ <property name="page_increment">10</property>
<property name="page_size">10</property>
- <property name="value">1</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
- <property name="upper">65535</property>
+ <property name="value">1</property>
<property name="lower">1</property>
- <property name="page_increment">10</property>
+ <property name="upper">65535</property>
<property name="step_increment">1</property>
+ <property name="page_increment">10</property>
<property name="page_size">10</property>
- <property name="value">1</property>
</object>
<object class="GtkAdjustment" id="adjustment4">
- <property name="upper">65535</property>
+ <property name="value">1</property>
<property name="lower">1</property>
- <property name="page_increment">10</property>
+ <property name="upper">65535</property>
<property name="step_increment">1</property>
+ <property name="page_increment">10</property>
<property name="page_size">10</property>
- <property name="value">1</property>
</object>
<object class="GtkAdjustment" id="adjustment5">
- <property name="upper">100000</property>
<property name="lower">-1</property>
- <property name="page_increment">10</property>
+ <property name="upper">100000</property>
<property name="step_increment">1</property>
+ <property name="page_increment">10</property>
<property name="page_size">10</property>
- <property name="value">0</property>
</object>
<object class="GtkAdjustment" id="adjustment6">
- <property name="upper">100000</property>
<property name="lower">-1</property>
- <property name="page_increment">10</property>
+ <property name="upper">100000</property>
<property name="step_increment">1</property>
+ <property name="page_increment">10</property>
<property name="page_size">10</property>
- <property name="value">0</property>
</object>
<object class="GtkListStore" id="model1">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</object>
<object class="GtkListStore" id="model2">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</object>
<object class="GtkListStore" id="model3">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</object>
<object class="GtkListStore" id="model4">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</object>
<object class="GtkListStore" id="model5">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</object>
<object class="GtkListStore" id="model6">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</object>
<object class="GtkListStore" id="model7">
<columns>
+ <!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
</row>
</data>
</object>
- <!-- interface-requires gtk+ 2.16 -->
- <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkWindow" id="parameters">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Settings</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <signal handler="linphone_gtk_mtu_set" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_mtu_set"/>
</object>
<packing>
<property name="position">0</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">adjustment1</property>
- <signal handler="linphone_gtk_mtu_changed" name="value_changed"/>
+ <signal name="value_changed" handler="linphone_gtk_mtu_changed"/>
</object>
<packing>
<property name="position">1</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <signal handler="linphone_gtk_use_sip_info_dtmf_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_use_sip_info_dtmf_toggled"/>
</object>
<packing>
<property name="position">1</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="draw_indicator">True</property>
- <signal handler="linphone_gtk_ipv6_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_ipv6_toggled"/>
</object>
<packing>
<property name="position">2</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">adjustment2</property>
- <signal handler="linphone_gtk_video_port_changed" name="value_changed"/>
+ <signal name="value_changed" handler="linphone_gtk_video_port_changed"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">adjustment3</property>
- <signal handler="linphone_gtk_audio_port_changed" name="value_changed"/>
+ <signal name="value_changed" handler="linphone_gtk_audio_port_changed"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">adjustment4</property>
- <signal handler="linphone_gtk_sip_port_changed" name="value_changed"/>
+ <signal name="value_changed" handler="linphone_gtk_sip_port_changed"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
- <signal handler="linphone_gtk_no_firewall_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_no_firewall_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">no_nat</property>
- <signal handler="linphone_gtk_use_nat_address_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_use_nat_address_toggled"/>
</object>
<packing>
<property name="position">0</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_nat_address_changed" name="changed"/>
+ <signal name="changed" handler="linphone_gtk_nat_address_changed"/>
</object>
<packing>
<property name="position">1</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">no_nat</property>
- <signal handler="linphone_gtk_use_stun_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_use_stun_toggled"/>
</object>
<packing>
<property name="position">0</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_stun_server_changed" name="changed"/>
+ <signal name="changed" handler="linphone_gtk_stun_server_changed"/>
</object>
<packing>
<property name="position">1</property>
<object class="GtkFileChooserButton" id="ring_chooser">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_ring_file_set" name="file_set"/>
+ <signal name="file_set" handler="linphone_gtk_ring_file_set"/>
</object>
<packing>
<property name="position">0</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_stock">True</property>
- <signal handler="linphone_gtk_play_ring_file" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_play_ring_file"/>
</object>
<packing>
<property name="position">1</property>
<object class="GtkEntry" id="alsa_dev">
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_alsa_special_device_changed" name="editing_done"/>
+ <signal name="editing_done" handler="linphone_gtk_alsa_special_device_changed"/>
</object>
<packing>
<property name="left_attach">1</property>
<object class="GtkComboBox" id="capture_device">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_capture_device_changed" name="changed"/>
<property name="model">model1</property>
+ <signal name="changed" handler="linphone_gtk_capture_device_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer1"/>
<attributes>
<object class="GtkComboBox" id="ring_device">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_ring_device_changed" name="changed"/>
<property name="model">model2</property>
+ <signal name="changed" handler="linphone_gtk_ring_device_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer2"/>
<attributes>
<object class="GtkComboBox" id="playback_device">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_playback_device_changed" name="changed"/>
<property name="model">model3</property>
+ <signal name="changed" handler="linphone_gtk_playback_device_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer3"/>
<attributes>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <signal handler="linphone_gtk_echo_cancelation_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_echo_cancelation_toggled"/>
</object>
<packing>
<property name="left_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame4">
+ <object class="GtkFrame" id="video_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<child>
<child>
<object class="GtkComboBox" id="webcams">
<property name="visible">True</property>
- <signal handler="linphone_gtk_cam_changed" name="changed"/>
<property name="model">model4</property>
+ <signal name="changed" handler="linphone_gtk_cam_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer4"/>
<attributes>
<child>
<object class="GtkComboBox" id="video_size">
<property name="visible">True</property>
- <property name="active">0</property>
- <signal handler="linphone_gtk_video_size_changed" name="changed"/>
<property name="model">model5</property>
+ <property name="active">0</property>
+ <signal name="changed" handler="linphone_gtk_video_size_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer5"/>
<attributes>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="video_frame">
+ <object class="GtkLabel" id="video_frame_title">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>Video</b></property>
<property name="use_markup">True</property>
</packing>
</child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkHBox" id="hbox11">
<object class="GtkFrame" id="frame11">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip-text" translatable="yes">This section defines your SIP address when not using a SIP account</property>
+ <property name="tooltip_text" translatable="yes">This section defines your SIP address when not using a SIP account</property>
<property name="label_xalign">0</property>
<child>
<object class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_update_my_contact" name="changed"/>
+ <signal name="changed" handler="linphone_gtk_update_my_contact"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_update_my_contact" name="changed"/>
+ <signal name="changed" handler="linphone_gtk_update_my_contact"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_add_proxy" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_add_proxy"/>
<child>
<object class="GtkHBox" id="hbox14">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_edit_proxy" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_edit_proxy"/>
<child>
<object class="GtkHBox" id="hbox16">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_remove_proxy" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_remove_proxy"/>
<child>
<object class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<object class="GtkButton" id="create_phonics">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal handler="linphone_gtk_create_fonics_account" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_create_fonics_account"/>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_clear_passwords" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_clear_passwords"/>
<child>
<object class="GtkHBox" id="hbox18">
<property name="visible">True</property>
</packing>
</child>
</object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkHBox" id="hbox10">
<object class="GtkComboBox" id="codec_view">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="active">0</property>
- <signal handler="linphone_gtk_codec_view_changed" name="changed"/>
<property name="model">model6</property>
+ <property name="active">0</property>
+ <signal name="changed" handler="linphone_gtk_codec_view_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer6"/>
<attributes>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_stock">True</property>
- <signal handler="linphone_gtk_codec_up" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_codec_up"/>
</object>
<packing>
<property name="expand">False</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_stock">True</property>
- <signal handler="linphone_gtk_codec_down" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_codec_down"/>
</object>
<packing>
<property name="expand">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_codec_enable" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_codec_enable"/>
<child>
<object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_codec_disable" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_codec_disable"/>
<child>
<object class="GtkHBox" id="hbox9">
<property name="visible">True</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip-text" translatable="yes">0 stands for "unlimited"</property>
+ <property name="tooltip_text" translatable="yes">0 stands for "unlimited"</property>
<property name="adjustment">adjustment5</property>
- <signal handler="linphone_gtk_upload_bw_changed" name="value_changed"/>
+ <signal name="value_changed" handler="linphone_gtk_upload_bw_changed"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip-text" translatable="yes">0 stands for "unlimited"</property>
+ <property name="tooltip_text" translatable="yes">0 stands for "unlimited"</property>
<property name="adjustment">adjustment6</property>
- <signal handler="linphone_gtk_download_bw_changed" name="value_changed"/>
+ <signal name="value_changed" handler="linphone_gtk_download_bw_changed"/>
</object>
<packing>
<property name="left_attach">1</property>
</packing>
</child>
</object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkHBox" id="hbox15">
<child>
<object class="GtkComboBox" id="lang_combo">
<property name="visible">True</property>
- <signal handler="linphone_gtk_lang_changed" name="changed"/>
<property name="model">model7</property>
+ <signal name="changed" handler="linphone_gtk_lang_changed"/>
<child>
<object class="GtkCellRendererText" id="renderer7"/>
<attributes>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <signal handler="linphone_gtk_ui_level_toggled" name="toggled"/>
+ <signal name="toggled" handler="linphone_gtk_ui_level_toggled"/>
</object>
</child>
</object>
</packing>
</child>
</object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkHBox" id="hbox4">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal handler="linphone_gtk_parameters_closed" name="clicked"/>
+ <signal name="clicked" handler="linphone_gtk_parameters_closed"/>
<child>
<object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
lp_config_set_int(cfg,"GtkUi",key,val);
}
+void linphone_gtk_set_ui_config(const char *key , const char * val){
+ LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+ lp_config_set_string(cfg,"GtkUi",key,val);
+}
static void parse_item(const char *item, const char *window_name, GtkWidget *w, gboolean show){
char tmp[64];
-Subproject commit f2ddc59ed02f26ff828243fa400abae925b6f730
+Subproject commit 9492b114126f17d06ca365757ada450ad72d5eb5
status-red.png \
status-offline.png \
contact-orange.png dialer-orange.png history-orange.png\
-startcall-green.png stopcall-red.png
+startcall-green.png stopcall-red.png addcall-green.png
EXTRA_DIST=$(pixmap_DATA)
LINPHONE_RINGS=rings/orig.wav \
rings/oldphone.wav \
rings/oldphone-mono.wav \
+ rings/oldphone-mono-30s.caf \
rings/rock.wav \
rings/bigben.wav \
rings/toy.wav \