add sofia-sip 1.12.4 (plus some patches through 12/21/2006) to in tree libs

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3774 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2006-12-21 06:30:28 +00:00
1 parent 0cdfa4fe13
commit 2ecac238f3
719 files changed
+311340 -2

No files matched your search

@@ -0,0 +1,325 @@
2006-01-18 Martti Mela <martti.mela@nokia.com>
* soa.c: removed #include <netat/sysglue.h> (with __APPLE_CC__)
2006-01-17 Martti Mela <martti.mela@nokia.com>
* if no EPROTO is found in OS X, redefine to EPROTOTYPE
M ./libsofia-sip-ua/soa/soa.c +8
2005-10-17 Pekka Pessi <Pekka.Pessi@nokia.com>
* Restore version numbers after our offer is rejected.
M ./libsofia-sip-ua/soa/soa_static.c +3
2005-10-15 Pekka Pessi <Pekka.Pessi@nokia.com>
* Updated API of soa_get_local_sdp() and friends.
Added parameter for returning SDP C structure to soa_get_capability_sdp(),
soa_get_remote_sdp(), soa_get_user_sdp(), and soa_get_local_sdp().
M ./libsofia-sip-ua/soa/soa.c -35 +58
M ./libsofia-sip-ua/soa/soa.h -4 +8
M ./libsofia-sip-ua/soa/test_soa.c -17 +18
* Updated SOA_VALID_ACTIONS().
M ./libsofia-sip-ua/soa/soa.c -1 +13
* Added soa_name.
M ./libsofia-sip-ua/soa/soa.c +1
M ./libsofia-sip-ua/soa/soa_session.h +1
M ./libsofia-sip-ua/soa/soa_static.c +1
* Removed annoying "last modified".
M ./libsofia-sip-ua/soa/soa.c -1
M ./libsofia-sip-ua/soa/soa.h -1
M ./libsofia-sip-ua/soa/soa_add.h -1
M ./libsofia-sip-ua/soa/soa_asynch.c -1
M ./libsofia-sip-ua/soa/soa_session.h -1
M ./libsofia-sip-ua/soa/soa_static.c -1
M ./libsofia-sip-ua/soa/soa_tag.c -1
M ./libsofia-sip-ua/soa/soa_tag.h -1
M ./libsofia-sip-ua/soa/test_soa.c -1
* Logging each API call except predicates.
M ./libsofia-sip-ua/soa/soa.c -5 +99
* Naming soa_sip_require() and soa_sip_supported() consistently.
The SIP headers are called Require and Supported.
M ./libsofia-sip-ua/soa/soa.c -6 +6
M ./libsofia-sip-ua/soa/soa.h -2 +2
M ./libsofia-sip-ua/soa/soa_asynch.c -2 +2
M ./libsofia-sip-ua/soa/soa_session.h -4 +4
M ./libsofia-sip-ua/soa/soa_static.c -2 +2
M ./libsofia-sip-ua/soa/test_soa.c -2 +2
2005-10-12 Pekka Pessi <Pekka.Pessi@nokia.com>
* Updated SOA_VALID_ACTIONS().
M ./libsofia-sip-ua/soa/soa.c -1 +13
* Added soa_name.
M ./libsofia-sip-ua/soa/soa.c +1
M ./libsofia-sip-ua/soa/soa_session.h +1
M ./libsofia-sip-ua/soa/soa_static.c +1
* Removed annoying "last modified".
M ./libsofia-sip-ua/soa/soa.c -1
M ./libsofia-sip-ua/soa/soa.h -1
M ./libsofia-sip-ua/soa/soa_add.h -1
M ./libsofia-sip-ua/soa/soa_asynch.c -1
M ./libsofia-sip-ua/soa/soa_session.h -1
M ./libsofia-sip-ua/soa/soa_static.c -1
M ./libsofia-sip-ua/soa/soa_tag.c -1
M ./libsofia-sip-ua/soa/soa_tag.h -1
M ./libsofia-sip-ua/soa/test_soa.c -1
* Logging each API call except predicates.
M ./libsofia-sip-ua/soa/soa.c -5 +99
* Naming soa_sip_require() and soa_sip_supported() consistently.
The SIP headers are called Require and Supported.
M ./libsofia-sip-ua/soa/soa.c -6 +6
M ./libsofia-sip-ua/soa/soa.h -2 +2
M ./libsofia-sip-ua/soa/soa_asynch.c -2 +2
M ./libsofia-sip-ua/soa/soa_session.h -4 +4
M ./libsofia-sip-ua/soa/soa_static.c -2 +2
M ./libsofia-sip-ua/soa/test_soa.c -2 +2
2005-10-12 Pekka Pessi <Pekka.Pessi@nokia.com>
* Added more logging.
M ./libsofia-sip-ua/soa/soa_static.c -1 +17
* Using SDP O/A result to determine media activity.
M ./libsofia-sip-ua/soa/soa.c -2 +2
* Sanitized soa_sdp_upgrade_is_needed().
M ./libsofia-sip-ua/soa/soa_static.c -27 +11
* Fixed active tests.
M ./libsofia-sip-ua/soa/test_soa.c -36 +36
* Fixed soa_get_paramlist() for complex cases.
M ./libsofia-sip-ua/soa/soa.c -1 +1
2005-09-29 Pekka Pessi <Pekka.Pessi@nokia.com>
* Added SOATAG_ACTIVE_* stuff.
M ./libsofia-sip-ua/soa/soa_tag.c +98
M ./libsofia-sip-ua/soa/soa_tag.h +31
* Removed mss-related tags.
M ./libsofia-sip-ua/soa/soa_tag.c -263
M ./libsofia-sip-ua/soa/soa_tag.h -89
* Using sdp tags to pass session descriptions.
M ./libsofia-sip-ua/soa/soa.c -1 +1
M ./libsofia-sip-ua/soa/soa_tag.c -6 +5
M ./libsofia-sip-ua/soa/soa_tag.h -17 +20
M ./libsofia-sip-ua/soa/test_soa.c +20
2005-09-28 Pekka Pessi <Pekka.Pessi@nokia.com>
* Returning remote sdp via soa_get_paramlist().
M soa.c +5
* soa_get_paramlist() just returns NULL if given NULL session.
M soa.c -6 +4
* Returning local and user SDP via tags.
M soa.c -5 +17
* Keeping track of soa instance name.
M soa.c -2 +13
M soa_session.h +1
* Always upgrading a freshly created session.
M soa_static.c -1 +1
* Updated documentation. Glare.
M soa.docs -10 +79
* Added (selective!) hold, media upgrade.
M soa_session.h +2
M soa_static.c -52 +174
M test_soa.c -4 +65
* Added more bits to activity (so we can indicate SOA_ACTIVE_REJECTED).
M soa_session.h -4 +4
* Updated the mode update: keep track of rejected status, too.
M soa.c -20 +28
* Bump ss_user_version if parameters change.
M soa.c -2 +9
* Removed soa_static_actions.
M soa_static.c -24
* Updated API to handle separately user-supplied SDP and negotiated SDP.
M soa.c -146 +180
M soa.h -11 +18
M soa_session.h -36 +30
M soa_static.c -73 +475
M test_soa.c -22 +40
* Not using soa_static_actions.
M test_soa.c -1 +1
* Updated soa_static_get_paramlist() prototype.
M soa_static.c -3 +16
* Removed last traces of "default".
M soa.c -51 +1
M soa_add.h -2
* Added tag parameters to soa_get_paramlist() prototype.
M soa.c -9 +23
M soa.h -1 +2
M soa_session.h -2 +4
M test_soa.c -1 +1
* Not testing asynch.
M test_soa.c +6
* Not testing removed parameters.
M test_soa.c -13 +20
* Not compiling soa_asynch.c
M Makefile.am -1 +1
* Include "soa_tag.h" in "soa_session.h", too.
M soa_session.h +3
* Moved tags to soa_tag.h
M soa.h -200
* Removed mss-related parameters. Added hold.
M soa.c -117 +12
M soa_session.h -13 +1
* Renamed "local" as "user".
M soa_asynch.c -7 +7
* Added soatag_user_sdp().
M soa_tag.c -10 +42
* Added soa_tag.h.
A soa_tag.h
2005-09-26 Pekka Pessi <Pekka.Pessi@nokia.com>
* Updated call flows.
M soa.docs -57 +67
* Added some code for soa_static_generate_offer().
M soa_static.c -18 +60
* Fixed soa_static_set_local_sdp().
M soa_static.c -1 +1
* Added setter functions for sdp in soa_static.
M soa_static.c -6 +44
* Using explicit soa_set_local_sdp() with "static" soa instance.
M test_soa.c -3 +9
* Added session sdp: soa_get_session_sdp(), soatag_session_sdp.
M soa.h +16
* Comments.
M soa.c -2 +2
* Not expanding "local" sdp with o=, s=, t= and c=.
M soa.c -45
* Added local/remote/session sdp to soa_get_params().
M soa.c +11
* Added handling of soatag_local_sdp tag.
M soa.c -2 +25
* Added session description ss_desc
M soa_session.h +2
* Added soatag_local_sdp and soatag_remote_sdp.
M soa.h +12
M soa_tag.c +32
2005-09-22 Kai Vehmanen <kai.vehmanen@nokia.com>
* soa.c (soa_get_remote_version): Added.
* soa.c (soa_get_local_version): Added.
* soa_session.h: Added ssd_version field to
soa_description struct.
2005-09-19 Kai Vehmanen <kai.vehmanen@nokia.com>
* soa_static.c: Fix generating offers.
2005-08-17 Pekka Pessi <Pekka.Pessi@nokia.com>
* Updated API. Added tester.
@@ -0,0 +1,28 @@
PROJECT_NAME = "soa"
OUTPUT_DIRECTORY = ../docs/html/soa
INPUT = soa.docs sofia-sip/soa.h sofia-sip/soa_add.h soa.c
INPUT += sofia-sip/soa_tag.h soa_tag.c
@INCLUDE = ../docs/Doxyfile.conf
TAGFILES += ../docs/docs.doxytags=../docs
TAGFILES += ../docs/su.doxytags=../su
TAGFILES += ../docs/ipt.doxytags=../ipt
TAGFILES += ../docs/bnf.doxytags=../bnf
TAGFILES += ../docs/url.doxytags=../url
TAGFILES += ../docs/msg.doxytags=../msg
TAGFILES += ../docs/sip.doxytags=../sip
TAGFILES += ../docs/sresolv.doxytags=../sresolv
TAGFILES += ../docs/tport.doxytags=../tport
TAGFILES += ../docs/nta.doxytags=../nta
TAGFILES += ../docs/sdp.doxytags=../sdp
TAGFILES += ../docs/nua.doxytags=../nua
GENERATE_TAGFILE = ../docs/soa.doxytags
ALIASES += soa="@ref index \"soa\""
# When GENERATE_TAGFILE=YES, we should use \ref main
#ALIASES += soa="@ref main \"soa\""
@INCLUDE = ../sip/sip.doxyaliases
@@ -0,0 +1,63 @@
#
# Makefile.am for soa module
#
# Copyright (C) 2005,2006 Nokia Corporation
# Contact: Pekka Pessi <pekka.pessi@nokia.com>
# Licensed under LGPL. See file COPYING.
# ----------------------------------------------------------------------
# Header paths
INCLUDES = -I$(srcdir)/../sdp -I../sdp \
-I$(srcdir)/../sip -I../sip \
-I$(srcdir)/../msg -I../msg \
-I$(srcdir)/../url -I../url \
-I$(srcdir)/../ipt -I../ipt \
-I$(srcdir)/../bnf -I../bnf \
-I$(srcdir)/../su -I../su
# ----------------------------------------------------------------------
# Build targets
noinst_LTLIBRARIES = libsoa.la
check_PROGRAMS = test_soa
TESTS = test_soa
# ----------------------------------------------------------------------
# Rules for building the targets
BUILT_SOURCES = soa_tag_ref.c
nobase_include_sofia_HEADERS = \
sofia-sip/soa.h sofia-sip/soa_session.h \
sofia-sip/soa_add.h sofia-sip/soa_tag.h
libsoa_la_SOURCES = soa.c soa_static.c \
soa_tag.c soa_tag_ref.c
COVERAGE_INPUT = $(libsoa_la_SOURCES) $(include_sofia_HEADERS)
LDADD = libsoa.la \
../sip/libsip.la \
../msg/libmsg.la \
../url/liburl.la \
../sdp/libsdp.la \
../ipt/libipt.la \
../bnf/libbnf.la \
../su/libsu.la
test_soa_LDFLAGS = -static
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile soa.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
include ../sofia.am
TAG_DLL_FLAGS = LIST=soa_tag_list
@@ -0,0 +1,713 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Makefile.am for soa module
#
# Copyright (C) 2005,2006 Nokia Corporation
# Contact: Pekka Pessi <pekka.pessi@nokia.com>
# Licensed under LGPL. See file COPYING.
# ----------------------------------------------------------------------
# Header paths
# common Makefile targets for libsofia-sip-ua modules
# ---------------------------------------------------
SOURCES = $(libsoa_la_SOURCES) test_soa.c
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
check_PROGRAMS = test_soa$(EXEEXT)
DIST_COMMON = $(nobase_include_sofia_HEADERS) $(srcdir)/../sofia.am \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
subdir = libsofia-sip-ua/soa
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/sac-general.m4 \
$(top_srcdir)/m4/sac-openssl.m4 $(top_srcdir)/m4/sac-su.m4 \
$(top_srcdir)/m4/sac-su2.m4 $(top_srcdir)/m4/sac-tport.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/libsofia-sip-ua/su/sofia-sip/su_configure.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsoa_la_LIBADD =
am_libsoa_la_OBJECTS = soa.lo soa_static.lo soa_tag.lo soa_tag_ref.lo
libsoa_la_OBJECTS = $(am_libsoa_la_OBJECTS)
test_soa_SOURCES = test_soa.c
test_soa_OBJECTS = test_soa.$(OBJEXT)
test_soa_LDADD = $(LDADD)
test_soa_DEPENDENCIES = libsoa.la ../sip/libsip.la ../msg/libmsg.la \
../url/liburl.la ../sdp/libsdp.la ../ipt/libipt.la \
../bnf/libbnf.la ../su/libsu.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/libsofia-sip-ua/su/sofia-sip
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libsoa_la_SOURCES) test_soa.c
DIST_SOURCES = $(libsoa_la_SOURCES) test_soa.c
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(include_sofiadir)"
nobase_include_sofiaHEADERS_INSTALL = $(install_sh_DATA)
HEADERS = $(nobase_include_sofia_HEADERS)
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COREFOUNDATION_FALSE = @COREFOUNDATION_FALSE@
COREFOUNDATION_TRUE = @COREFOUNDATION_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWFLAG = @CWFLAG@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_COVERAGE_FALSE = @ENABLE_COVERAGE_FALSE@
ENABLE_COVERAGE_TRUE = @ENABLE_COVERAGE_TRUE@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
EXPENSIVE_CHECKS_FALSE = @EXPENSIVE_CHECKS_FALSE@
EXPENSIVE_CHECKS_TRUE = @EXPENSIVE_CHECKS_TRUE@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_VERSION = @GLIB_VERSION@
HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
HAVE_GLIB_FALSE = @HAVE_GLIB_FALSE@
HAVE_GLIB_TRUE = @HAVE_GLIB_TRUE@
HAVE_MINGW32_FALSE = @HAVE_MINGW32_FALSE@
HAVE_MINGW32_TRUE = @HAVE_MINGW32_TRUE@
HAVE_NTLM_FALSE = @HAVE_NTLM_FALSE@
HAVE_NTLM_TRUE = @HAVE_NTLM_TRUE@
HAVE_TLS_FALSE = @HAVE_TLS_FALSE@
HAVE_TLS_TRUE = @HAVE_TLS_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBVER_SOFIA_SIP_UA_AGE = @LIBVER_SOFIA_SIP_UA_AGE@
LIBVER_SOFIA_SIP_UA_CUR = @LIBVER_SOFIA_SIP_UA_CUR@
LIBVER_SOFIA_SIP_UA_GLIB_AGE = @LIBVER_SOFIA_SIP_UA_GLIB_AGE@
LIBVER_SOFIA_SIP_UA_GLIB_CUR = @LIBVER_SOFIA_SIP_UA_GLIB_CUR@
LIBVER_SOFIA_SIP_UA_GLIB_REV = @LIBVER_SOFIA_SIP_UA_GLIB_REV@
LIBVER_SOFIA_SIP_UA_GLIB_SOVER = @LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
LIBVER_SOFIA_SIP_UA_REV = @LIBVER_SOFIA_SIP_UA_REV@
LIBVER_SOFIA_SIP_UA_SOVER = @LIBVER_SOFIA_SIP_UA_SOVER@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MINGW_ENVIRONMENT = @MINGW_ENVIRONMENT@
MOSTLYCLEANFILES = @MOSTLYCLEANFILES@
NDEBUG_FALSE = @NDEBUG_FALSE@
NDEBUG_TRUE = @NDEBUG_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
REPLACE_LIBADD = @REPLACE_LIBADD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOFIA_CFLAGS = @SOFIA_CFLAGS@
SOFIA_GLIB_PKG_REQUIRES = @SOFIA_GLIB_PKG_REQUIRES@
STRIP = @STRIP@
TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@
VERSION = @VERSION@
VER_LIBSOFIA_SIP_UA_MAJOR_MINOR = @VER_LIBSOFIA_SIP_UA_MAJOR_MINOR@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_LD = @ac_ct_LD@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
include_sofiadir = @include_sofiadir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
INCLUDES = -I$(srcdir)/../sdp -I../sdp \
-I$(srcdir)/../sip -I../sip \
-I$(srcdir)/../msg -I../msg \
-I$(srcdir)/../url -I../url \
-I$(srcdir)/../ipt -I../ipt \
-I$(srcdir)/../bnf -I../bnf \
-I$(srcdir)/../su -I../su
# ----------------------------------------------------------------------
# Build targets
noinst_LTLIBRARIES = libsoa.la
TESTS = test_soa
# ----------------------------------------------------------------------
# Rules for building the targets
BUILT_SOURCES = soa_tag_ref.c
nobase_include_sofia_HEADERS = \
sofia-sip/soa.h sofia-sip/soa_session.h \
sofia-sip/soa_add.h sofia-sip/soa_tag.h
libsoa_la_SOURCES = soa.c soa_static.c \
soa_tag.c soa_tag_ref.c
COVERAGE_INPUT = $(libsoa_la_SOURCES) $(include_sofia_HEADERS)
LDADD = libsoa.la \
../sip/libsip.la \
../msg/libmsg.la \
../url/liburl.la \
../sdp/libsdp.la \
../ipt/libipt.la \
../bnf/libbnf.la \
../su/libsu.la
test_soa_LDFLAGS = -static
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile soa.docs $(BUILT_SOURCES)
AM_CFLAGS = $(CWFLAG) $(SOFIA_CFLAGS)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
TAG_AWK = $(top_srcdir)/libsofia-sip-ua/su/tag_dll.awk
INTERNAL_INCLUDES = \
-I$(srcdir)/../features -I../features \
-I$(srcdir)/../ipt -I../ipt \
-I$(srcdir)/../iptsec -I../iptsec \
-I$(srcdir)/../bnf -I../bnf \
-I$(srcdir)/../http -I../http \
-I$(srcdir)/../msg -I../msg \
-I$(srcdir)/../nth -I../nth \
-I$(srcdir)/../nta -I../nta \
-I$(srcdir)/../nea -I../nea \
-I$(srcdir)/../nua -I../nua \
-I$(srcdir)/../soa -I../soa \
-I$(srcdir)/../sdp -I../sdp \
-I$(srcdir)/../sip -I../sip \
-I$(srcdir)/../soa -I../soa \
-I$(srcdir)/../sresolv -I../sresolv \
-I$(srcdir)/../tport -I../tport \
-I$(srcdir)/../stun -I../stun \
-I$(srcdir)/../url -I../url \
-I$(srcdir)/../su -I../su
# ----------------------------------------------------------------------
# Sofia specific rules
TAG_DLL_FLAGS = LIST=soa_tag_list
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../sofia.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libsofia-sip-ua/soa/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libsofia-sip-ua/soa/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libsoa.la: $(libsoa_la_OBJECTS) $(libsoa_la_DEPENDENCIES)
$(LINK) $(libsoa_la_LDFLAGS) $(libsoa_la_OBJECTS) $(libsoa_la_LIBADD) $(LIBS)
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
test_soa$(EXEEXT): $(test_soa_OBJECTS) $(test_soa_DEPENDENCIES)
@rm -f test_soa$(EXEEXT)
$(LINK) $(test_soa_LDFLAGS) $(test_soa_OBJECTS) $(test_soa_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soa_static.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soa_tag.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soa_tag_ref.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_soa.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-nobase_include_sofiaHEADERS: $(nobase_include_sofia_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(include_sofiadir)" || $(mkdir_p) "$(DESTDIR)$(include_sofiadir)"
@$(am__vpath_adj_setup) \
list='$(nobase_include_sofia_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__vpath_adj) \
echo " $(nobase_include_sofiaHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(include_sofiadir)/$$f'"; \
$(nobase_include_sofiaHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(include_sofiadir)/$$f"; \
done
uninstall-nobase_include_sofiaHEADERS:
@$(NORMAL_UNINSTALL)
@$(am__vpath_adj_setup) \
list='$(nobase_include_sofia_HEADERS)'; for p in $$list; do \
$(am__vpath_adj) \
echo " rm -f '$(DESTDIR)$(include_sofiadir)/$$f'"; \
rm -f "$(DESTDIR)$(include_sofiadir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list='$(TESTS)'; \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
;; \
*) \
echo "PASS: $$tst"; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
*) \
failed=`expr $$failed + 1`; \
echo "FAIL: $$tst"; \
;; \
esac; \
else \
skip=`expr $$skip + 1`; \
echo "SKIP: $$tst"; \
fi; \
done; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all tests failed"; \
else \
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
skipped="($$skip tests were not run)"; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
test -z "$$skipped" || echo "$$skipped"; \
test -z "$$report" || echo "$$report"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
else :; fi
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. $(distdir)/sofia-sip
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(include_sofiadir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-nobase_include_sofiaHEADERS
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-nobase_include_sofiaHEADERS
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
clean-checkPROGRAMS clean-generic clean-libtool \
clean-noinstLTLIBRARIES ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man \
install-nobase_include_sofiaHEADERS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-nobase_include_sofiaHEADERS
built-sources: $(BUILT_SOURCES)
clean-built-sources:
-rm -rf $(BUILT_SOURCES) $(BUILT_SOURCES:%=$(srcdir)/%)
*_tag_ref.c: $(TAG_AWK)
%_tag_ref.c: %_tag.c
$(AWK) -f $(TAG_AWK) NODLL=1 $(TAG_DLL_FLAGS) $<
@ENABLE_COVERAGE_TRUE@coverage:
@ENABLE_COVERAGE_TRUE@ @$(top_srcdir)/scripts/coverage $(COVERAGE_FLAGS) $(COVERAGE_INPUT)
../bnf/libbnf.la ../http/libhttp.la ../ipt/libipt.la ../iptsec/libiptsec.la \
../msg/libmsg.la ../nea/libnea.la ../nta/libnta.la ../nth/libnth.la \
../nua/libnua.la ../sdp/libsdp.la ../sip/libsip.la ../soa/libsoa.la \
../sresolv/libsresolv.la ../stun/libstun.la ../su/libsu.la \
../tport/libtport.la ../url/liburl.la:
$(MAKE) -C $(@D) $(@F)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
File diff suppressed because it is too large. Load diff
+887
View File
@@ -0,0 +1,887 @@
/**@MODULEPAGE "soa" - SDP Offer/Answer Engine Module
@section soa_meta Module Information
The Sofia SIP @b soa module consists of an asynchronous SDP Offer/Answer engine
library. The interface to library is defined in <soa.h>.
@CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>
@STATUS @SofiaSIP Core library
@LICENSE LGPL
@section soa_oveview Using soa engine
SIP uses SDP and a negotiation procedure known as "SDP
Offer-Answer Model" to establish the multimedia sessions. The
SDP Offer-Answer negotiation is specified in
<a href="http://ietf.org/rfc/rfc3264.txt">RFC 3264</a>.
The soa engine is implemented in object-oriented manner. The default soa
object just implements the basic SDP negotiation and basic SIP call model. A
more complex soa object implementation can manipulate the call model and
initiate actions on behalf of application.
@section soa_model SDP Offer/Answer Model
The basic capabilities provided by Offer/Answer mechanism include
-# generating SDP offer (section 5)
-# processing SDP offer, generating SDP answer (section 6)
-# processing SDP answer (section 7)
-# modifying session (section 8)
-# indicating capabilities (section 9)
The offerer indicates its capabilities in the offer:
- the media streams it wants to establish
- transport addresses it uses to receive by media streams
(IP addresses, port numbers, transport protocols)
- the codecs used by particular streams
- codec parameters (for instance, codec profile used by H.263)
The answerer indicates which parts of the offer are acceptable to
it in the answer:
- the media streams it agrees to establish
- transport addresses answerer uses to receive by media streams
- the codecs and codec parameters used by particular streams
Note that the capabilites indicate what the party generating the
SDP is prepared to receive. They can send anything the other end
accepts.
There may be other things, like encryption keys included in the
session description.
The advanced capabilities are required by more complicated negotiation
involving two or more offer-answer rounds. For instance, an extension known
as session <i>preconditions</i> is defined
<a href="http://ietf.org/rfc/rfc3312.txt">RFC 3312</a>.
Another example of two-phase negotiation is presented in RFC
3264 section 10.2, showing how a single codec can be selected.
@section soa_motivation SOA Design
Why to have simple interface? Is it not simple enough to include SDP offer
with your INVITE, and act on SDP answer in 200 OK?
Our design goal is to allow application to follow the simple call
model, regardless of the underlying complications - early
sessions, preconditions, session timers, 3rd party call control.
In other words, we would like a have a simple "cooked" interface
toward naive applications even if the underlying call follows the
byzantine call model chosen by 3GPP.
@section soa_with_sip Using SDP Offer/Answer with SIP
Using SDP Offer/Answer with SIP is specified in
<a href="http://ietf.org/rfc/rfc3261.txt">RFC 3261</a>,
<a href="http://ietf.org/rfc/rfc3262.txt">RFC 3262 (100rel and PRACK)</a>, and
<a href="http://ietf.org/rfc/rfc3211.txt">RFC 3311 (UPDATE)</a>.
There is a @ref soa_sdp_oa_use_cases "separate page listing scenarios".
The rules for sending offers:
- offer may be sent in INVITE
- if there was no offer in INVITE, offer MUST be sent in first
reliable response to INVITE
- offer may be sent in 100rel (reliable 1XX series response)
- offer may be sent in PRACK
- offer may be sent in UPDATE
PRACK may only be sent when an unacknowledged 100rel (reliable 1XX
series response) is received. UPDATE may be sent during early or
established dialog.
Only one INVITE request may be pending within a dialog. Only one
non-INVITE request may be pending within a dialog (in one
direction): it is not possible to send UPDATE if no final response
has been received to PRACK.
If there is already an offer/answer exchange in progress, no offer
MUST be sent. Offer/answer exchange is in progress if offer has
been sent but no answer has been received, or if an offer has been
received but no answer has been generated.
The rules for sending answer:
- when offer is received with INVITE
- answer MAY be sent with next end-to-end 1XX or 2XX response
- answer MUST be sent in a reliable response (100rel or 2XX)
- when offer is received in 2XX response
- answer MUST be sent in ACK
- when offer is received with 100rel response
- answer MUST be sent with PRACK
- when offer is received with PRACK or UPDATE
- answer MUST be sent with 2XX response to PRACK or UPDATE
Offer or answer in PRACK MUST be processed even if we have already
sent 2XX to INVITE.
The rules for receiving answer:
- if offer was sent in INVITE, first session description in any
non-error response to INVITE is treated as the answer
- if offer was sent in 2XX response, session description in
ACK is answer
- if offer was sent in 100rel response, session description in
PRACK is answer
- if offer was sent in PRACK or UPDATE, session description in
2XX response is answer
Rules for situations when endpoint MUST ignore the SDP:
- If offer was sent in INVITE, only the first session description in
any non-error (1XX or 2XX) response to INVITE is processed, rest
are ignored
- If no offer was sent in 2XX response to INVITE, SDP in ACK is ignored
- If no offer was sent in PRACK, SDP in response to it is ignored
- If no offer was sent in UPDATE, SDP in response to it is ignored
The re-INVITEs and UPDATEs are sent for two different purposes:
updating or modifying SIP state, or updating or modifying the
associated session. Session timer extension (not yet an rfc) is an
example of the first. Putting a call on hold, or adding video to
audio-only call is an example of the second. So, upon receiving
re-INVITE, there might be quite different things happening. The
application can just return a 200 OK with previous SDP, sometimes
it must indicate call being on hold and sometimes ask user for
permission (for adding video).
Rules for resolving glare (both endpoints trying to send offer at the same
time):
- if a offer is received while UAS has generated an offer,
it must be rejected (with SIP 491 response).
@section soa_use_cases SOA and SDP Offer/Answer Scenarios
Note that due to limitations in space
- soa_set_params() is referred as @c set_params
- soa_set_remote_sdp() is referred as @c set_remote
- soa_generate_offer() followed by soa_get_session_sdp()
is referred as @c gen_offer
- soa_generate_answer() followed by soa_get_session_sdp()
is referred as @c gen_answer
- soa_process_answer() is referred as @c proc_answer
@subsection soa_uc_basic_out Basic Call Out
This is the "basic" outbound call model.
<pre>
APPL NUA SOA REMOTE
| | | |
0 | | | |
1 |----INVITE---->| | |
2 | |--set_params-->| |
3 | |---gen_offer-->| |
4 | | | |
5 | |-------------------INVITE(sdp offer)-->|
6 | | | |
7 | | | |
8 | | | |
9 | |< - - - - - - - - - - 180 Ringing - - -|
10 |< - - 180 - - -| | |
11 | | | |
12 | |<-------------------200(sdp answer)----|
13 | |--set_remote-->| |
14 | |--proc_answer->| |
15 |<-----200------| | |
16 | | | |
17 | |----activate-->| |
18 |<----active----| | |
19 | |-------------------------ACK---------->|
20 | | | |
21 | | | |
22 | | | |
| | | |
</pre>
@subsection soa_uc_basic_in Basic Call In
This is the "basic" inbound call model.
<pre>
APPL NUA SOA REMOTE
| | | |
0 | | | |
1 | |<------------------INVITE(sdp offer)---|
2 | | | |
3 | |--set_remote-->| |
4 | | | |
5 |<---INVITE-----| | |
6 | | | |
7 | | | |
8 |- - -180- - - >| | |
9 | |- - - - - - - - - - 180 Ringing - - - >|
10 | | | |
11 | | | |
12 |-----200------>| | |
13 | |--set_params-->| |
14 | | | |
15 | |--gen_answer-->| |
16 | | | |
17 |<----active----| | |
18 | |----activate-->| |
19 | |--------------------200 (sdp answer)-->|
20 | | | |
21 | | | |
22 | |<------------------------ACK-----------|
23 |<-----ACK------| | |
24 | | | |
| | | |
</pre>
@subsection soa_uc_basic_3p 3rd Party Call In
The 3rd-party call model just reverses the O/A roles of callee and caller.
<pre>
t APPL NUA SOA REMOTE
| | | |
0 | | | |
1 | |<----------------------INVITE----------|
2 | | | |
3 |<---INVITE-----| | |
4 | | | |
5 | | | |
6 | | | |
7 |----200 OK---->| | |
8 | |--set_params-->| |
9 | | | |
10 | |--gen_offer--->| |
11 | | | |
12 | | | |
13 | |----------------------200 (off) ------>|
14 | | | |
15 | | | |
16 | |<---------------------ACK (ans)--------|
17 | |--set_remote-->| |
18 | |--proc_answer->| |
19 |<----ACK-------| | |
20 |<----active----| | |
21 | |----activate-->| |
22 | | | |
| | | |
</pre>
@subsection soa_uc_early_out Callout with Early Media
It is possible to establish media session before call is completed. In this
case, the 180 Ringing contains the SDP answer. A copy of SDP answer is
included in the 200 OK response, too, because the 180 Ringing is not
acknowledged and it may be lost.
This is preferred to the basic call model above, as the endpoints has more
time to establish the media session.
<pre>
t APPL NUA SOA REMOTE
| | | |
0 | | | |
1 |----INVITE---->| | |
2 | |--set_params-->| |
3 | | | |
4 | |--gen_offer--->| |
5 | | | |
6 | | | |
7 | |-------------------INVITE(sdp offer)-->|
8 | | | |
9 | | | |
10 | | | |
11 | |<-------------------180(sdp answer)----|
12 | |--set_remote-->| |
13 |<-----180------|--proc_answer->| |
14 | | | |
15 | | | |
16 | | | |
17 | |<-----------------200(copy of answer)--|
18 | (copy is ignored) | |
19 | | | |
20 |<-----200------| | |
21 | |----activate-->| |
22 |<----active----| | |
23 | |-------------------------ACK---------->|
24 | | | |
| | | |
</pre>
@subsection soa_uc_early_in Call In Establishing Early Media
The mirror of the previous scenario:
<pre>
t APPL NUA SOA REMOTE
| | | |
0 | | | |
1 | |<------------------INVITE(sdp offer)---|
2 | |--set_remote-->| |
3 |<---INVITE-----| | |
4 | | | |
5 | | | |
6 |---180 Ring--->| | |
7 | |--set_params-->| |
8 | |--gen_offer--->| |
9 | | (Note 1) |
10 | | | |
11 | |-------------------180 (sdp answer)--->|
12 | | | |
13 | | | |
14 | | | |
15 |----200 OK---->| | |
16 | |--set_params-->| |
17 | | | |
18 | | | |
19 | |-----------------200 (copy of answer)->|
20 | |----activate-->| |
21 |<----active----| | |
22 | |<------------------------ACK-----------|
23 |<-----ACK------| | |
24 | | | |
| | | |
</pre>
<b>Note 1:</b> the user expectation (set by ordinary telephone) here is
that callee sends a ringing tone towards caller and discards any media sent
by caller until the call is accepted (200 OK is sent towards caller).
@subsection soa_uc_100rel_out Call Out with PRACK
Here is second alternative establishing media session before call is
completed. In this case, the 180 Ringing contains the SDP answer. The 180
Ringing is now sent reliably. In other words, it is acknowledged by a PRACK
request.
<pre>
t APPL NUA SOA REMOTE
| | | |
0 | | | |
1 |----INVITE---->| | |
2 | |--set_params-->| |
3 | | | |
4 | |--gen_offer--->| |
5 | | | |
6 | | | |
7 | |-------------------INVITE(sdp offer)-->|
8 | | | |
9 | | | |
10 | |<-------------------183(sdp answer)----|
11 | |--set_remote-->| |
12 | |--proc_answer->| |
13 |<-----183------| | |
14 | | | |
15 | |-----------------------PRACK---------->|
16 | |<--------------------200/PRACK---------|
17 |<--200/PRACK---| | |
18 | | | |
19 | | | |
20 | |<--------------------180 Ringing-------|
21 |<-----180------| | |
22 | |-----------------------PRACK---------->|
23 | |<--------------------200/PRACK---------|
24 |<--200/PRACK---| | |
25 | | | |
26 | | | |
27 | |<----------------------200 OK----------|
28 |<--200/INVITE--| | |
29 | |----activate-->| |
30 |<----active----| | |
31 | |-----------------------ACK------------>|
32 | | | |
| | | |
</pre>
@subsection soa_uc_100rel_in Call In with PRACK
The mirror of the previous scenario:
<pre>
t APPL NUA SOA REMOTE
| | | |
0 | | | |
1 | |<------------------INVITE(sdp offer)---|
2 | |--set_remote-->| |
3 |<---INVITE-----| | |
4 | | | |
5 | | | |
6 |-183 Progress->| | |
7 | |--set_params-->| |
8 | |--gen_answer-->| |
9 | | | |
10 | |-------------------183 (sdp answer)--->|
11 | | | |
12 | |<----------------------PRACK-----------|
13 |<----PRACK-----| | |
14 | |---------------------200/PRACK-------->|
15 | | | |
16 |--180 Ringing->| | |
17 | |---------------------180 Ringing------>|
18 | | | |
19 | |<----------------------PRACK-----------|
20 |<----PRACK-----| | |
21 | |---------------------200/PRACK-------->|
22 | | | |
23 | | | |
24 | | | |
25 |----200 OK---->| | |
26 | |----activate-->| |
27 |<----active----| | |
28 | |---------------------200/INVITE------->|
29 | | | |
30 | |<-----------------------ACK------------|
31 |<-----ACK------| | |
32 | | | |
| | | |
</pre>
<b>Note 1:</b> the user expectation (set by ordinary telephone) here is that
callee sends a ringing tone towards caller and discards any media sent by
callee until the call is accepted at t=26 (200 OK is sent towards caller).
The application starts to alert user at t=13 when it knows that the
media session has been successfully established.
*/
/**
@page soa_sdp_oa_use_cases Use Cases for SIP and SDP Offer/Answer
This page contains a list of use cases or call scenarios for SIP and SDP
Offer/Answer.
There are a few call scenarios that we expect to see when dealing with more
telephone-like side of SIP:
- calling to existing PSTN networks (early session)
- doing resource reservations
- calling to 3G IMS
- call hunting
- having external party setting up your call, etc.
@section soa_use_case_1 Case #1: Basic Call
This is the basic SIP call model with the most simple offer-answer exchange.
<pre>
A B
| |
|----INVITE (offer)---->|
| |
| |
|< - - 180 Ringing - - -|
| |
| |
|<----200 (answer)------|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_2 Case #2: Early Media
Another case, slightly more complex. The SDP answer is sent with
180 Ringing in order to establish an "early session". B might
not be a SIP phone, but a gateway to PSTN, for instance. Using this
"early session" B can play tones like "burr-burr" or "the
subscriber you tried to reach is not in the coverage...":
<pre>
A B
| |
|----INVITE (offer)---->|
| |
| |
|<----180 (answer)------|
| |
| |
|<----200 (answer')-----|
|----------ACK--------->|
| |
| |
</pre>
After receiving answer in 180 Ringing, A simply ignores SDP in
subsequent responses.
Nothing special here, right? But SIP is not so simple,
unfortunately. There are hairy cases because of "early sessions",
"forking", "preconditions" and other reasons.
Now lets go through some hairy cases.
@section soa_use_case_3 Case #3: Early Dialog, Early Media
This case is a call using 100rel, early dialog and early media. It
is used when the session should be established before call alerts.
<pre>
A B
| |
|----INVITE (offer)---->|
| |
|<----183 (answer)------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
|<---------180----------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
| |
| |
|<---------200----------|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_4 Case #4: UPDATE with Offer
This is a call model with two rounds of offer/answer and 100rel.
It can be used, for instance, when the endpoints have to make sure
that there are enough network capacity for the call to succeed.
They can establish a new radio bearer, for instance, before
progressing with the call. The initial offer would contain SDP
attribute "inactive", the second "sendrev":
<pre>
A B
| |
|----INVITE (offer)---->|
| |
| |
|<----183 (answer)------|
|--------PRACK--------->|
|<-----200/PRACK--------|
| |
| |
|----UPDATE (offer2)--->|
|<-200/UPDATE (answer2)-|
| |
|<---------180----------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
| |
|<---------200----------|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_5 Case #5: 2nd Offer in PRACK
Alternative 1 to above, two rounds of offer/answer and 100rel, no
UPDATE. It can used, for instance, when caller wants to make sure
there is only one audio or video codec that is used during the
call. The initial offer would contain SDP attribute "inactive";
the second "sendrev":
<pre>
A B
| |
|----INVITE (offer)---->|
| |
|<----183 (answer)------|
|-----PRACK(offer2)---->|
|<--200/PRACK(answer2)--|
| |
| |
|<---------180----------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
| |
|<---------200----------|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_6 Case #6: Callee Making 2nd Offer
Alternative 2 to above: two rounds of offer/answer and 100rel, but
now it is B who wants to do two rounds and initiates second
Offer-Answer exchange:
<pre>
A B
| |
|----INVITE (offer)---->|
| |
|<----183 (answer)------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
| |
|<---UPDATE (offer2)----|
|-200/UPDATE (answer2)->|
| |
|<---------180----------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
| |
|<---------200----------|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_7 Case #7: 3GPP Call Model
Here is a third alternative, know as "3GPP call model", where
there is not 2 but 3 offer-answer rounds, allowing A and B to do
precise resource reservations after they have agreed on media,
codecs and transport addresses used during the call:
<pre>
A B
| |
|----INVITE (offer)---->|
| |
| |
|<----183 (answer)------|
|-----PRACK(offer2)---->|
|<--200/PRACK(answer2)--|
| |
<< resource reservations are done now >>
| |
|----UPDATE (offer3)--->|
|<-200/UPDATE (answer3)-|
| |
|<---------180----------|
|--------PRACK--------->|
|<-----200/PRACK------->|
| |
| |
|<---------200----------|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_8 Case #8: Forking
Now, another complication. Here B has two terminals, let say,
fixed (B1) and mobile (B2) phone, both alert when B receives a
call using procedure known as forking:
<pre>
A B's proxy B1 B2
| | | |
|----INVITE (offer)---->| | |
| |-INVITE (off)->| |
| |-----------INVITE (off)------->|
| | | |
| |<--180 (ans1)--| |
|<------180 (ans1)------| | |
| | | |
| |<----------180 (ans2)----------|
|<------180 (ans2)------| | |
| | | |
| | | |
| |<----------200 (ans2')---------|
|<------200 (ans2')-----| | |
| |----CANCEL---->| |
| |<--200/CANCEL--| |
| |<-----487------| |
| | | |
|----------ACK----------------------------------------->|
| | | |
| | | |
</pre>
Here we have two calls initially established, but the call to B1
along with "early session" is should be dropped when B2 picks up
the call (and 200 OK is returned).
@section soa_use_case_9 Case #9: 3rd Party Call Control
Now something different: 3rd party call model, where "C"
establishes the call:
<pre>
A C B
| | |
|<-------INVITE---------| |
| | |
| | |
|------200 (offer)----->| |
| |----INVITE (offer)---->|
| | |
| | |
| |<-----200 (answer)-----|
|<-----ACK (answer)-----| |
| | |
| |----------ACK--------->|
| | |
</pre>
@section soa_use_case_10 Case #10: Upgrade Session with Re-INVITE
The session is upgraded: a new media is added to the session.
<pre>
A B
| |
|----INVITE (offer1)--->|
| |
| |
|< - - 180 Ringing - - -|
| |
| |
|<----200 (answer2)-----|
|----------ACK--------->|
| |
| |
| |
| |
|----INVITE (offer2)--->|
| |
|<----200 (answer2)-----|
|----------ACK--------->|
| |
| |
</pre>
@section soa_use_case_10 Case #10: Upgrade Session with Re-INVITE
The session upgraded is rejected.
<pre>
A B
| |
|----INVITE (offer1)--->|
| |
| |
|< - - 180 Ringing - - -|
| |
| |
|<----200 (answer2)-----|
|----------ACK--------->|
| |
| |
| |
| |
|----INVITE (offer2)--->|
| |
|<---------488----------|
|----------ACK--------->|
| |
| |
</pre>
*/
/** @typedef struct soa_session soa_session_t;
@brief "soa" session object.
The @soa session object is responsible for
@ref soa_with_sip "SDP offer/answer negotiation"
defined in @RFC3264. The session object is used to
store the SDP template from user, remote SDP received from the network and
the negotiation result, local SDP.
@par Functions used to create, copy and destroy "soa" session objects:
@code
soa_session_t *soa_create(char const *name, su_root_t *, soa_magic_t *);
soa_session_t *soa_clone(soa_session_t *, su_root_t *, soa_magic_t *);
void soa_destroy(soa_session_t *);
@endcode
@par Functions used to set and get parameters for "soa" session objects:
@code
int soa_set_params(soa_session_t *ss,
tag_type_t tag, tag_value_t value, ...);
int soa_get_params(soa_session_t const *ss,
tag_type_t tag, tag_value_t value, ...);
tagi_t *soa_get_paramlist(soa_session_t const *ss,
tag_type_t tag, tag_value_t value, ...);
@endcode
@par Functions used to obtain status information from "soa" session objects:
@code
int soa_error_as_sip_response(soa_session_t *soa,
char const **return_phrase);
char const *soa_error_as_sip_reason(soa_session_t *soa);
int soa_get_warning(soa_session_t *ss, char const **return_phrase);
@endcode
@par Functions used to store and retrieve SDP descriptions:
@code
int soa_set_capability_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
int soa_get_capability_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
int soa_set_remote_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
int soa_get_remote_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
int soa_clear_remote_sdp(soa_session_t *ss);
int soa_get_remote_version(soa_session_t const *ss);
int soa_set_user_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
int soa_get_user_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
int soa_get_user_version(soa_session_t const *ss);
int soa_get_local_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
@endcode
@par Functions for executing Offer/Answer negotiation steps:
@code
int soa_init_offer_answer(soa_session_t *ss);
int soa_generate_offer(soa_session_t *, int always, soa_callback_f *);
int soa_generate_answer(soa_session_t *, soa_callback_f *);
int soa_process_answer(soa_session_t *, soa_callback_f *);
int soa_process_reject(soa_session_t *, soa_callback_f *);
int soa_is_complete(soa_session_t const *ss);
@endcode
@par Functions for signaling events of session signaling:
@code
int soa_activate(soa_session_t *, char const *option);
int soa_deactivate(soa_session_t *, char const *option);
void soa_terminate(soa_session_t *, char const *option);
@endcode
These functions are used to activate actions taken by @soa, for instance,
a COMEDIA connection is established with soa_activate().
@par Functions for Checking Activated Media:
@code
int soa_is_audio_active(soa_session_t const *ss);
int soa_is_video_active(soa_session_t const *ss);
int soa_is_remote_audio_active(soa_session_t const *ss);
int soa_is_remote_video_active(soa_session_t const *ss);
@endcode
*/
@@ -0,0 +1,289 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
/**@CFILE soa_asynch.c
*
* @brief Static implementation of Sofia SDP Offer/Answer Engine
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Tue Aug 16 17:06:06 EEST 2005
*/
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
struct soa_asynch_complete;
#define SU_MSG_ARG_T struct soa_asynch_completed
#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_tagarg.h>
#include <sofia-sip/su_strlst.h>
#include "sofia-sip/soa.h"
#include <sofia-sip/sdp.h>
#include "sofia-sip/soa_session.h"
#define NONE ((void *)-1)
#define XXX assert(!"implemented")
typedef struct soa_asynch_session
{
soa_session_t sss_session[1];
}
soa_asynch_session_t;
struct soa_asynch_completed
{
soa_session_t *completed_session;
unsigned completed_terminated;
int (*completed_call)(soa_session_t *, soa_callback_f *);
};
static int soa_asynch_init(char const *, soa_session_t *, soa_session_t *);
static void soa_asynch_deinit(soa_session_t *);
static int soa_asynch_set_params(soa_session_t *ss, tagi_t const *tags);
static int soa_asynch_get_params(soa_session_t const *ss, tagi_t *tags);
static tagi_t *soa_asynch_get_paramlist(soa_session_t const *ss);
static int soa_asynch_generate_offer(soa_session_t *ss,
soa_callback_f *completed);
static int soa_asynch_generate_answer(soa_session_t *ss,
soa_callback_f *completed);
static int soa_asynch_process_answer(soa_session_t *ss,
soa_callback_f *completed);
static int soa_asynch_activate(soa_session_t *ss, char const *option);
static int soa_asynch_deactivate(soa_session_t *ss, char const *option);
static void soa_asynch_terminate(soa_session_t *ss, char const *option);
struct soa_session_actions const soa_asynch_actions =
{
(sizeof soa_asynch_actions),
sizeof (struct soa_asynch_session),
soa_asynch_init,
soa_asynch_deinit,
soa_asynch_set_params,
soa_asynch_get_params,
soa_asynch_get_paramlist,
soa_base_media_features,
soa_base_sip_require,
soa_base_sip_supported,
soa_base_remote_sip_features,
soa_base_set_capability_sdp,
soa_base_set_remote_sdp,
soa_base_set_local_sdp,
soa_asynch_generate_offer,
soa_asynch_generate_answer,
soa_asynch_process_answer,
soa_asynch_activate,
soa_asynch_deactivate,
soa_asynch_terminate
};
/* Initialize session */
static int soa_asynch_init(char const *name,
soa_session_t *ss,
soa_session_t *parent)
{
return soa_base_init(name, ss, parent);
}
static void soa_asynch_deinit(soa_session_t *ss)
{
soa_base_deinit(ss);
}
static int soa_asynch_set_params(soa_session_t *ss, tagi_t const *tags)
{
return soa_base_set_params(ss, tags);
}
static int soa_asynch_get_params(soa_session_t const *ss, tagi_t *tags)
{
return soa_base_get_params(ss, tags);
}
static tagi_t *soa_asynch_get_paramlist(soa_session_t const *ss)
{
return soa_base_get_paramlist(ss);
}
static void soa_asynch_completed(su_root_magic_t *magic,
su_msg_r msg,
struct soa_asynch_completed *arg)
{
soa_session_t *ss = arg->completed_session;
if (arg->completed_terminated == ss->ss_terminated) {
if (ss->ss_in_progress) {
soa_callback_f *completed = ss->ss_in_progress;
ss->ss_in_progress = NULL;
/* Update local activity */
if (arg->completed_call(ss, NULL) < 0)
/* XXX - Process error */;
completed(ss->ss_magic, ss);
}
}
soa_session_unref(ss);
}
static int soa_asynch_generate_offer(soa_session_t *ss,
soa_callback_f *completed)
{
sdp_session_t *sdp;
sdp_media_t *m;
uint16_t port = 5004;
su_msg_r msg;
if (ss->ss_user->ssd_sdp == NULL) {
if (ss->ss_caps->ssd_unparsed == NULL)
return soa_set_status(ss, 500, "No local session available");
}
if (ss->ss_user->ssd_sdp)
return 0; /* We are done */
/* Generate a dummy SDP offer based on our capabilities */
if (soa_set_local_sdp(ss, ss->ss_caps->ssd_unparsed, -1) < 0)
return -1;
sdp = ss->ss_user->ssd_sdp; assert(ss->ss_user->ssd_sdp);
for (m = sdp->sdp_media; m; m = m->m_next)
if (m->m_port == 0)
m->m_port = port, port += 2;
/* We pretend to be asynchronous */
if (su_msg_create(msg,
su_root_task(ss->ss_root),
su_root_task(ss->ss_root),
soa_asynch_completed,
sizeof (struct soa_asynch_completed)) == -1)
return soa_set_status(ss, 500, "Internal error");
su_msg_data(msg)->completed_session = soa_session_ref(ss);
su_msg_data(msg)->completed_terminated = ss->ss_terminated;
su_msg_data(msg)->completed_call = soa_base_generate_offer;
su_msg_send(msg);
ss->ss_in_progress = completed;
return 1; /* Indicate caller of async operation */
}
static int soa_asynch_generate_answer(soa_session_t *ss,
soa_callback_f *completed)
{
sdp_session_t *sdp;
sdp_media_t *m;
uint16_t port = 5004;
su_msg_r msg;
if (ss->ss_user->ssd_sdp == NULL) {
if (ss->ss_caps->ssd_unparsed == NULL)
return soa_set_status(ss, 500, "No local session available");
}
if (ss->ss_user->ssd_sdp)
return 0; /* We are done */
/* Generate a dummy SDP offer based on our capabilities */
if (soa_set_local_sdp(ss, ss->ss_caps->ssd_unparsed, -1) < 0)
return -1;
sdp = ss->ss_user->ssd_sdp; assert(ss->ss_user->ssd_sdp);
for (m = sdp->sdp_media; m; m = m->m_next)
if (m->m_port == 0)
m->m_port = port, port += 2;
/* We pretend to be asynchronous */
if (su_msg_create(msg,
su_root_task(ss->ss_root),
su_root_task(ss->ss_root),
soa_asynch_completed,
sizeof (struct soa_asynch_completed)) == -1)
return soa_set_status(ss, 500, "Internal error");
su_msg_data(msg)->completed_session = soa_session_ref(ss);
su_msg_data(msg)->completed_terminated = ss->ss_terminated;
su_msg_data(msg)->completed_call = soa_base_generate_answer;
su_msg_send(msg);
ss->ss_in_progress = completed;
return 1; /* Indicate caller of async operation */
}
static int soa_asynch_process_answer(soa_session_t *ss,
soa_callback_f *completed)
{
su_msg_r msg;
/* We pretend to be asynchronous */
if (su_msg_create(msg,
su_root_task(ss->ss_root),
su_root_task(ss->ss_root),
soa_asynch_completed,
sizeof (struct soa_asynch_completed)) == -1)
return soa_set_status(ss, 500, "Internal error");
su_msg_data(msg)->completed_session = soa_session_ref(ss);
su_msg_data(msg)->completed_terminated = ss->ss_terminated;
su_msg_data(msg)->completed_call = soa_base_process_answer;
su_msg_send(msg);
ss->ss_in_progress = completed;
return 1; /* Indicate caller of async operation */
}
static int soa_asynch_activate(soa_session_t *ss, char const *option)
{
return soa_base_activate(ss, option);
}
static int soa_asynch_deactivate(soa_session_t *ss, char const *option)
{
return soa_base_deactivate(ss, option);
}
static void soa_asynch_terminate(soa_session_t *ss, char const *option)
{
ss->ss_in_progress = NULL;
soa_description_free(ss, ss->ss_user);
soa_base_terminate(ss, option);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,606 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
/**@CFILE soa_tag.c Tags and tag lists for Offer/Answer Engine
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Wed Aug 3 20:28:17 EEST 2005
*/
#include "config.h"
#include <sofia-sip/su.h>
#if 1
#define TAG_NAMESPACE soa_tag_namespace
#else
/* Definition used by tag_dll.awk */
#define TAG_NAMESPACE "soa"
#endif
#include <sofia-sip/soa.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/sdp_tag.h>
#include <string.h>
char const soa_tag_namespace[] = "soa";
/** Filter soa tags. */
int soa_tag_filter(tagi_t const *f, tagi_t const *t)
{
char const *ns;
if (!t || !t->t_tag)
return 0;
ns = t->t_tag->tt_ns;
if (!ns)
return 0;
return ns == soa_tag_namespace || strcmp(ns, soa_tag_namespace) == 0;
}
/**@def SOATAG_ANY()
*
* Filter tag matching any SOATAG_*() item.
*/
tag_typedef_t soatag_any = NSTAG_TYPEDEF(*);
/**@def SOATAG_CAPS_SDP(x)
* Pass parsed capability description to soa session object.
*
* @par Used with
* soa_set_params() \n
* soa_get_params() \n
*
* @par Parameter type
* #sdp_session_t *
*
* @par Values
* #sdp_session_t describing @soa capabilities
*
* Corresponding tag taking reference parameter is SOATAG_CAPS_SDP_REF()
*/
tag_typedef_t soatag_caps_sdp = SDPTAG_TYPEDEF(caps_sdp);
/**@def SOATAG_CAPS_SDP_STR(x)
* Pass capability description to @soa session object.
*
* @par Used with
* soa_set_param() \n
* soa_get_params() \n
*
* @par Parameter type
* char const *
*
* @par Values
* String containing SDP description of @soa capabilities
*
* Corresponding tag taking reference parameter is SOATAG_CAPS_SDP_STR_REF()
*/
tag_typedef_t soatag_caps_sdp_str = STRTAG_TYPEDEF(caps_sdp_str);
/**@def SOATAG_LOCAL_SDP(x)
* Get parsed local session description from soa session object.
*
* @par Used with
* soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* #sdp_session_t *
*
* @par Values
* pointer to #sdp_session_t.
*
* Corresponding tag taking reference parameter is SOATAG_LOCAL_SDP_REF()
*
* @sa soa_get_local_sdp(), SOATAG_LOCAL_SDP_STR(), SOATAG_USER_SDP(),
* SOATAG_USER_SDP_STR().
*/
tag_typedef_t soatag_local_sdp = SDPTAG_TYPEDEF(local_sdp);
/**@def SOATAG_LOCAL_SDP_STR(x)
* Get local session description as a string from soa session object.
*
* @par Used with
* soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* char const *
*
* @par Values
* String containing SDP offer or answer.
*
* Corresponding tag taking reference parameter is SOATAG_LOCAL_SDP_STR_REF()..
*
* @sa soa_get_local_sdp(), SOATAG_LOCAL_SDP(),
* SOATAG_USER_SDP(), SOATAG_USER_SDP_STR().
*/
tag_typedef_t soatag_local_sdp_str = STRTAG_TYPEDEF(local_sdp_str);
/**@def SOATAG_REMOTE_SDP(x)
* Pass parsed remote session description to soa session object.
*
* @par Used with
* soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* #sdp_session_t *
*
* @par Values
* pointer to #sdp_session_t.
*
* Corresponding tag taking reference parameter is SOATAG_REMOTE_SDP_REF()
*
* @sa soa_set_remote_sdp(), soa_get_remote_sdp(), SOATAG_REMOTE_SDP_STR(),
* SOATAG_LOCAL_SDP(), SOATAG_LOCAL_SDP_STR().
*/
tag_typedef_t soatag_remote_sdp = SDPTAG_TYPEDEF(remote_sdp);
/**@def SOATAG_REMOTE_SDP_STR(x)
* Pass media description file name to the NUA stack.
*
* Pass name of media description file that contains media templates
* (normally mss.sdp) to the NUA stack.
*
* @par Used with
* soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* char const *
*
* @par Values
* String containing SDP description received from remote end.
*
* Corresponding tag taking reference parameter is SOATAG_REMOTE_SDP_STR_REF()
*
* @sa soa_set_remote_sdp(), soa_get_remote_sdp(), SOATAG_REMOTE_SDP(),
* SOATAG_LOCAL_SDP(), SOATAG_LOCAL_SDP_STR().
*/
tag_typedef_t soatag_remote_sdp_str = STRTAG_TYPEDEF(remote_sdp_str);
/**@def SOATAG_USER_SDP(x)
* Pass parsed user session description to soa session object.
*
* User SDP is used as basis for SDP Offer/Answer negotiation. It can be
* very minimal, consisting just sdp_session_t structures, sdp_media_t
* structures and sdp_rtpmap_t structures listing te supported media, used
* RTP port number, and RTP payload descriptions of supported codecs.
*
* When generating the offer or answer the user SDP is augmented with the
* required SDP lines (v=, o=, t=, c=, a=rtpmap, etc.) as required. The
* complete offer or answer generated by @soa is passed in
* SOATAG_LOCAL_SDP() (SOATAG_LOCAL_SDP_STR() contains same in text format).
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* #sdp_session_t *
*
* @par Values
* pointer to #sdp_session_t.
*
* Corresponding tag taking reference parameter is SOATAG_USER_SDP_REF()
*
* @sa soa_set_user_sdp(), soa_get_user_sdp(), SOATAG_USER_SDP_STR(),
* SOATAG_LOCAL_SDP(), SOATAG_LOCAL_SDP_STR().
*/
tag_typedef_t soatag_user_sdp = SDPTAG_TYPEDEF(user_sdp);
/**@def SOATAG_USER_SDP_STR(x)
* Pass unparsed user session description to soa session object.
*
* User SDP is used as basis for SDP Offer/Answer negotiation. It can be
* very minimal, listing just m= lines with the port numbers and RTP payload
* numbers of supported codecs, like
* @code
* SOATAG_USER_SDP_STR("m=audio 5004 RTP/AVP 0 8")
* @endcode
* When generating the offer or answer the user SDP is augmented with the
* required SDP lines (v=, o=, t=, c=, a=rtpmap, etc.) as required. The
* complete offer or answer generated by @soa is passed in
* SOATAG_LOCAL_SDP_STR() (SOATAG_LOCAL_SDP() contains session in parsed
* format).
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* char const *
*
* @par Values
* String containing minimal SDP description.
*
* Corresponding tag taking reference parameter is SOATAG_USER_SDP_STR_REF()
*
* @sa soa_set_user_sdp(), soa_get_user_sdp(), SOATAG_USER_SDP(),
* SOATAG_LOCAL_SDP(), SOATAG_LOCAL_SDP_STR()
*/
tag_typedef_t soatag_user_sdp_str = STRTAG_TYPEDEF(user_sdp_str);
/**@def SOATAG_AF(x)
*
* Preferred address family for media.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* enum #soa_af {
* #SOA_AF_ANY,
* #SOA_AF_IP4_ONLY, #SOA_AF_IP6_ONLY,
* #SOA_AF_IP4_IP6, #SOA_AF_IP6_IP4
* }
*
* @par Values
* - #SOA_AF_ANY (0) any address family (default)
* - #SOA_AF_IP4_ONLY (1) only IP version 4
* - #SOA_AF_IP6_ONLY (2) only IP version 6
* - #SOA_AF_IP4_IP6 (3) either IP version 4 or 6, version 4 preferred
* - #SOA_AF_IP6_IP4 (4) either IP version 4 or 6, version 6 preferred
*
* Corresponding tag taking reference parameter is SOATAG_AF_REF()
*
* @sa SOATAG_ADDRESS()
*/
tag_typedef_t soatag_af = INTTAG_TYPEDEF(af);
/**@def SOATAG_ADDRESS(x)
*
* Pass media address.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* char const *
*
* @par Values
* NUL-terminated C string containing a domain name,
* IPv4 address, or IPv6 address.
*
* Corresponding tag taking reference parameter is SOATAG_ADDRESS_REF()
*
* @sa SOATAG_AF()
*/
tag_typedef_t soatag_address = STRTAG_TYPEDEF(address);
/**@def SOATAG_RTP_SELECT(x)
*
* When generating answer or second offer, @soa can include all the supported
* codecs, only one codec, or only the codecs supported by both ends in the
* list of payload types on the m= line.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* enum {
* #SOA_RTP_SELECT_SINGLE, #SOA_RTP_SELECT_COMMON, #SOA_RTP_SELECT_ALL
* } \n
* (int in range 0..2)
*
* @par Values
* - #SOA_RTP_SELECT_SINGLE (0) - select the best common codec
* - #SOA_RTP_SELECT_COMMON (1) - select all common codecs
* - #SOA_RTP_SELECT_ALL (2) - select all local codecs
*
* The default value is 0, only one RTP codec is selected. Note, however,
* that if there is no common codec (no local codec is supported by remote
* end), all the codecs are included in the list. In that case the media
* line is rejected, too, unless SOATAG_RTP_MISMATCH(1) has been used.
*
* Corresponding tag taking a reference parameter is SOATAG_RTP_SELECT_REF().
*
* @sa SOATAG_RTP_MISMATCH(), SOATAG_RTP_SORT(), SOATAG_AUDIO_AUX()
*/
tag_typedef_t soatag_rtp_select = INTTAG_TYPEDEF(rtp_select);
/**@def SOATAG_AUDIO_AUX(x)
*
* The named audio codecs are considered auxiliary, that is, they are
* considered as common codec only when they are the only codec listed on
* the media line.
*
* When generating answer or second offer soa includes auxiliary audio
* codecs in the list of codecs even if it is selecting only one codec or
* common codecs.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* A string with whitespace separated list of codec names.
*
* @par Values
* E.g., "telephone-event cn".
*
* By default, there are no auxiliary audio codecs.
*
* Corresponding tag taking a reference parameter is
* SOATAG_AUDIO_AUX_REF().
*
* @since New in @VERSION_1_12_2.
*
* @sa SOATAG_RTP_SELECT(), SOATAG_RTP_MISMATCH(), SOATAG_RTP_SORT()
*/
tag_typedef_t soatag_audio_aux = STRTAG_TYPEDEF(audio_aux);
/**@def SOATAG_RTP_SORT(x)
*
* When selecting the common codecs, soa can either select first local codec
* supported by remote end, or first remote codec supported by local codecs.
* The preference is indicated with ordering: the preferred codec is
* first and so on.
*
* The auxiliary audio codecs (specified with SOATAG_AUDIO_AUX()) are listed
* after other codecs.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* enum {
* #SOA_RTP_SORT_DEFAULT, #SOA_RTP_SORT_LOCAL, #SOA_RTP_SORT_REMOTE
* } \n
* (int in range 0..2)
*
* @par Values
* - #SOA_RTP_SORT_DEFAULT (0) - select by local preference
* if media is recvonly, remote preference othewise
* - #SOA_RTP_SORT_LOCAL (1) - always select by local preference
* - #SOA_RTP_SORT_REMOTE (2) - always select by remote preference
*
* The default value is #SOA_RTP_SORT_DEFAULT (0).
*
* Corresponding tag taking reference parameter is SOATAG_RTP_SORT_REF()
*
* @sa SOATAG_RTP_SELECT(), SOATAG_RTP_MISMATCH(), SOATAG_AUDIO_AUX()
*/
tag_typedef_t soatag_rtp_sort = INTTAG_TYPEDEF(rtp_sort);
/**@def SOATAG_RTP_MISMATCH(x)
*
* Accept media line even if the SDP negotation code determines that there
* are no common codecs between local and remote media. Normally, if the soa
* determines there are no common codecs, the media line is rejected.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* Boolean (int)
*
* @par Values
* 0 - reject media if there are no common codecs \n
* 1 (!= 0) - accept media even if there are no common codecs \n
*
* Default value is 0.
*
* Corresponding tag taking reference parameter is SOATAG_RTP_MISMATCH_REF()
*
* @sa SOATAG_RTP_SELECT(), SOATAG_RTP_MISMATCH(), SOATAG_AUDIO_AUX()
*/
tag_typedef_t soatag_rtp_mismatch = BOOLTAG_TYPEDEF(rtp_mismatch);
/**@def SOATAG_ACTIVE_AUDIO(x)
*
* Audio session status.
*
* @par Used with
*
* @par Parameter type
* enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
* #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
* #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
*
* @par Values
* - #SOA_ACTIVE_REJECTED (-8)
* - #SOA_ACTIVE_INACTIVE (0)
* - #SOA_ACTIVE_SENDONLY (1)
* - #SOA_ACTIVE_RECVONLY (2)
* - #SOA_ACTIVE_SENDRECV (3)
*
* Corresponding tag taking reference parameter is SOATAG_ACTIVE_AUDIO_REF()
*
*/
tag_typedef_t soatag_active_audio = INTTAG_TYPEDEF(active_audio);
/**@def SOATAG_ACTIVE_VIDEO(x)
*
* Video session status
*
* @par Used with
*
* @par Parameter type
* enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
* #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
* #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
*
* @par Values
* - #SOA_ACTIVE_REJECTED (-8)
* - #SOA_ACTIVE_INACTIVE (0)
* - #SOA_ACTIVE_SENDONLY (1)
* - #SOA_ACTIVE_RECVONLY (2)
* - #SOA_ACTIVE_SENDRECV (3)
*
* Corresponding tag taking reference parameter is SOATAG_ACTIVE_VIDEO_REF()
*/
tag_typedef_t soatag_active_video = INTTAG_TYPEDEF(active_video);
/**@def SOATAG_ACTIVE_IMAGE(x)
*
* Active image session status
*
* @par Used with
* #nua_i_active \n
* #nua_i_state \n
*
* @par Parameter type
* enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
* #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
* #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
*
* @par Values
* - #SOA_ACTIVE_REJECTED (-8)
* - #SOA_ACTIVE_INACTIVE (0)
* - #SOA_ACTIVE_SENDONLY (1)
* - #SOA_ACTIVE_RECVONLY (2)
* - #SOA_ACTIVE_SENDRECV (3)
*
* @par Parameter type
* enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
* #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
* #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
*
* @par Values
* - #SOA_ACTIVE_REJECTED (-8)
* - #SOA_ACTIVE_INACTIVE (0)
* - #SOA_ACTIVE_SENDONLY (1)
* - #SOA_ACTIVE_RECVONLY (2)
* - #SOA_ACTIVE_SENDRECV (3)
*
* Corresponding tag taking reference parameter is SOATAG_ACTIVE_IMAGE_REF()
*/
tag_typedef_t soatag_active_image = INTTAG_TYPEDEF(active_image);
/**@def SOATAG_ACTIVE_CHAT(x)
*
* Active chat session status.
*
* @par Used with
* #nua_i_active \n
* #nua_i_state \n
*
* @par Parameter type
* enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
* #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
* #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
*
* @par Values
* - #SOA_ACTIVE_REJECTED (-8)
* - #SOA_ACTIVE_INACTIVE (0)
* - #SOA_ACTIVE_SENDONLY (1)
* - #SOA_ACTIVE_RECVONLY (2)
* - #SOA_ACTIVE_SENDRECV (3)
*
* Corresponding tag taking reference parameter is SOATAG_ACTIVE_CHAT_REF()
*/
tag_typedef_t soatag_active_chat = INTTAG_TYPEDEF(active_chat);
/**@def SOATAG_SRTP_ENABLE(x)
*
* Enable SRTP
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* boolean (int)
*
* @par Values
* @c !=0 enable \n
* @c 0 disable
*
* Corresponding tag taking reference parameter is
* SOATAG_SRTP_ENABLE_REF()
*
* @todo SRTP functionality is not implemented.
*/
tag_typedef_t soatag_srtp_enable = BOOLTAG_TYPEDEF(srtp_enable);
/**@def SOATAG_SRTP_CONFIDENTIALITY(x)
*
* Enable SRTP confidentiality negotiation.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* boolean (int)
*
* @par Values
* @c != 0 enable SRTP confidentiality \n
* @c 0 disable SRTP conidentiality
*
* Corresponding tag taking reference parameter is
* SOATAG_SRTP_CONFIDENTIALITY_REF()
*
* @todo SRTP functionality is not implemented.
*/
tag_typedef_t soatag_srtp_confidentiality =
BOOLTAG_TYPEDEF(srtp_confidentiality);
/**@def SOATAG_SRTP_INTEGRITY(x)
*
* Enable SRTP integrity protection
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* boolean (int)
*
* @par Values
* @c !=0 enable \n
* @c 0 disable
*
* Corresponding tag taking reference parameter is
* SOATAG_SRTP_INTEGRITY_REF()
*
* @todo SRTP functionality is not implemented.
*/
tag_typedef_t soatag_srtp_integrity = BOOLTAG_TYPEDEF(srtp_integrity);
/**@def SOATAG_HOLD(x)
*
* Hold media stream or streams. When putting a SIP session on hold, the
* application can include, e.g., SOATAG_HOLD("audio") or
* SOATAG_HOLD("video") or SOATAG_HOLD("audio, video") or SOATAG_HOLD("*")
* as @soa parameters. When resuming the session, it can include
* SOATAG_HOLD(NULL). Note that last SOATAG_HOLD() in the tag list will
* override the SOATAG_HOLD() tags before it.
*
* @par Used with
* soa_set_params(), soa_get_params(), soa_get_paramlist() \n
*
* @par Parameter type
* character string
*
* @par Values
* Comma-separated media name ("audio", "video") or wildcard ("*").
*
* Corresponding tag taking reference parameter is SOATAG_HOLD_REF()
*
* @sa soa_set_params(), nua_invite(), @ref nua_event_diagram_call_hold
*/
tag_typedef_t soatag_hold = STRTAG_TYPEDEF(hold);
@@ -0,0 +1,153 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SOA_H
/** Defined when <sofia-sip/soa.h> has been included. */
#define SOA_H
/**@file sofia-sip/soa.h SDP Offer/Answer (RFC 3264) Interface.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
* @author Kai Vehmanen <Kai.Vehmanen@nokia.com>
*
* @date Created: Fri Jul 15 15:43:53 EEST 2005 ppessi
*/
#ifndef SU_WAIT_H
#include <sofia-sip/su_wait.h>
#endif
#ifndef SU_TAG_H
#include <sofia-sip/su_tag.h>
#endif
SOFIA_BEGIN_DECLS
typedef struct soa_session soa_session_t;
struct sdp_session_s;
#ifndef SOA_MAGIC_T
#define SOA_MAGIC_T void
#endif
typedef SOA_MAGIC_T soa_magic_t;
typedef int soa_callback_f(soa_magic_t *arg, soa_session_t *session);
SOFIAPUBFUN soa_session_t *soa_create(char const *name, su_root_t *, soa_magic_t *);
SOFIAPUBFUN soa_session_t *soa_clone(soa_session_t *, su_root_t *, soa_magic_t *);
SOFIAPUBFUN void soa_destroy(soa_session_t *);
SOFIAPUBFUN int soa_set_params(soa_session_t *ss,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int soa_get_params(soa_session_t const *ss,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN tagi_t *soa_get_paramlist(soa_session_t const *ss,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int soa_error_as_sip_response(soa_session_t *soa,
char const **return_phrase);
SOFIAPUBFUN char const *soa_error_as_sip_reason(soa_session_t *soa);
SOFIAPUBFUN int soa_get_warning(soa_session_t *ss, char const **return_phrase);
SOFIAPUBFUN int soa_set_capability_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_capability_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN int soa_set_remote_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_remote_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN int soa_clear_remote_sdp(soa_session_t *ss);
SOFIAPUBFUN int soa_get_remote_version(soa_session_t const *ss);
SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_user_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN int soa_get_user_version(soa_session_t const *ss);
SOFIAPUBFUN int soa_get_local_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN char const * const * soa_sip_require(soa_session_t const *ss);
SOFIAPUBFUN char const * const * soa_sip_supported(soa_session_t const *ss);
SOFIAPUBFUN int soa_remote_sip_features(soa_session_t *ss,
char const * const * support,
char const * const * required);
SOFIAPUBFUN char **soa_media_features(soa_session_t *ss, int live, su_home_t *home);
SOFIAPUBFUN int soa_generate_offer(soa_session_t *, int always, soa_callback_f *);
SOFIAPUBFUN int soa_generate_answer(soa_session_t *, soa_callback_f *);
SOFIAPUBFUN int soa_process_answer(soa_session_t *, soa_callback_f *);
SOFIAPUBFUN int soa_process_reject(soa_session_t *, soa_callback_f *);
SOFIAPUBFUN int soa_activate(soa_session_t *, char const *option);
SOFIAPUBFUN int soa_deactivate(soa_session_t *, char const *option);
SOFIAPUBFUN void soa_terminate(soa_session_t *, char const *option);
SOFIAPUBFUN int soa_is_complete(soa_session_t const *ss);
SOFIAPUBFUN int soa_init_offer_answer(soa_session_t *ss);
SOFIAPUBFUN int soa_is_audio_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_video_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_image_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_chat_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_audio_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_video_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_image_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_chat_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_tag_filter(tagi_t const *f, tagi_t const *t);
SOFIA_END_DECLS
#endif
@@ -0,0 +1,48 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SOA_ADD_H
#define SOA_ADD_H
/**@file sofia-sip/soa_add.h Register SDP Offer/Answer Interface Instances.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Mon Aug 1 15:43:53 EEST 2005 ppessi
*/
#include <sofia-sip/su_config.h>
SOFIA_BEGIN_DECLS
struct soa_session_actions;
SOFIAPUBVAR struct soa_session_actions const soa_default_actions;
SOFIAPUBFUN int soa_add(char const *name, struct soa_session_actions const *handler);
SOFIAPUBFUN struct soa_session_actions const *soa_find(char const *name);
SOFIA_END_DECLS
#endif /* SOA_ADD_H */
@@ -0,0 +1,275 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SOA_SESSION_H
#define SOA_SESSION_H
/**@file sofia-sip/soa_session.h
*
* Internal API for SDP Offer/Answer Interface.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Mon Aug 1 15:43:53 EEST 2005 ppessi
*/
#ifndef SOA_H
#include "sofia-sip/soa.h"
#endif
#ifndef SOA_TAG_H
#include "sofia-sip/soa_tag.h"
#endif
#ifndef SDP_H
#include <sofia-sip/sdp.h>
#endif
#ifndef SU_STRLST_H
#include <sofia-sip/su_strlst.h>
#endif
SOFIA_BEGIN_DECLS
struct soa_session_actions
{
int sizeof_soa_session_actions;
int sizeof_soa_session;
char const *soa_name;
int (*soa_init)(char const *name, soa_session_t *ss, soa_session_t *parent);
void (*soa_deinit)(soa_session_t *ss);
int (*soa_set_params)(soa_session_t *ss, tagi_t const *tags);
int (*soa_get_params)(soa_session_t const *ss, tagi_t *tags);
tagi_t *(*soa_get_paramlist)(soa_session_t const *ss,
tag_type_t, tag_value_t, ...);
char **(*soa_media_features)(soa_session_t *, int live, su_home_t *);
char const * const *(*soa_sip_require)(soa_session_t const *ss);
char const * const *(*soa_sip_supported)(soa_session_t const *ss);
int (*soa_remote_sip_features)(soa_session_t *ss,
char const * const * support,
char const * const * required);
int (*soa_set_capability_sdp)(soa_session_t *, sdp_session_t *,
char const *, isize_t);
int (*soa_set_remote_sdp)(soa_session_t *, int new_version,
sdp_session_t *, char const *, isize_t);
int (*soa_set_user_sdp)(soa_session_t *, sdp_session_t *,
char const *, isize_t);
int (*soa_generate_offer)(soa_session_t *ss, soa_callback_f *completed);
int (*soa_generate_answer)(soa_session_t *ss, soa_callback_f *completed);
int (*soa_process_answer)(soa_session_t *ss, soa_callback_f *completed);
int (*soa_process_reject)(soa_session_t *ss, soa_callback_f *completed);
int (*soa_activate_session)(soa_session_t *ss, char const *option);
int (*soa_deactivate_session)(soa_session_t *ss, char const *option);
void (*soa_terminate_session)(soa_session_t *ss, char const *option);
};
SOFIAPUBFUN soa_session_t *soa_session_ref(soa_session_t *ss);
SOFIAPUBFUN void soa_session_unref(soa_session_t *ss);
SOFIAPUBFUN int soa_base_init(char const *name, soa_session_t *,
soa_session_t *parent);
SOFIAPUBFUN void soa_base_deinit(soa_session_t *ss);
SOFIAPUBFUN int soa_base_set_params(soa_session_t *ss, tagi_t const *tags);
SOFIAPUBFUN int soa_base_get_params(soa_session_t const *ss, tagi_t *tags);
SOFIAPUBFUN tagi_t *soa_base_get_paramlist(soa_session_t const *ss,
tag_type_t, tag_value_t, ...);
SOFIAPUBFUN char **soa_base_media_features(soa_session_t *,
int live, su_home_t *);
SOFIAPUBFUN char const * const *soa_base_sip_require(soa_session_t const *ss);
SOFIAPUBFUN char const * const *soa_base_sip_supported(soa_session_t const *ss);
SOFIAPUBFUN int soa_base_remote_sip_features(soa_session_t *ss,
char const * const *support,
char const * const *required);
SOFIAPUBFUN int soa_base_set_capability_sdp(soa_session_t *ss,
sdp_session_t *sdp,
char const *, isize_t);
SOFIAPUBFUN int soa_base_set_remote_sdp(soa_session_t *ss,
int new_version,
sdp_session_t *sdp, char const *, isize_t);
SOFIAPUBFUN int soa_base_set_user_sdp(soa_session_t *ss,
sdp_session_t *sdp, char const *, isize_t);
SOFIAPUBFUN int soa_base_generate_offer(soa_session_t *ss,
soa_callback_f *completed);
SOFIAPUBFUN int soa_base_generate_answer(soa_session_t *ss,
soa_callback_f *completed);
SOFIAPUBFUN int soa_base_process_answer(soa_session_t *ss,
soa_callback_f *completed);
SOFIAPUBFUN int soa_base_process_reject(soa_session_t *ss,
soa_callback_f *completed);
SOFIAPUBFUN int soa_base_activate(soa_session_t *ss, char const *option);
SOFIAPUBFUN int soa_base_deactivate(soa_session_t *ss, char const *option);
SOFIAPUBFUN void soa_base_terminate(soa_session_t *ss, char const *option);
struct soa_description
{
sdp_session_t *ssd_sdp; /**< Session description */
char const *ssd_unparsed; /**< Original session description as string */
char const *ssd_str; /**< Session description as string */
sdp_printer_t *ssd_printer; /**< SDP printer object */
};
struct soa_session
{
su_home_t ss_home[1];
struct soa_session_actions const *ss_actions;
char const *ss_name; /**< Our name */
su_root_t *ss_root;
soa_magic_t *ss_magic; /**< Application data */
soa_callback_f *ss_in_progress;/**< Operation in progress */
/** Incremented once each time session is terminated */
unsigned ss_terminated;
/* XXX - this is part of public API. we should have no bitfields here */
unsigned ss_active:1; /**< Session has been activated */
/* Current Offer-Answer status */
unsigned ss_complete:1; /**< Completed SDP offer-answer */
unsigned ss_unprocessed_remote:1; /**< We have received remote SDP */
unsigned ss_offer_sent:2; /**< We have offered SDP */
unsigned ss_answer_recv:2; /**< We have received SDP answer */
unsigned ss_offer_recv:2; /**< We have received an offer */
unsigned ss_answer_sent:2; /**< We have answered (reliably, if >1) */
unsigned :0; /* Pad */
unsigned ss_oa_rounds; /**< Number of O/A rounds completed */
struct soa_media_activity
{
int ma_audio:4; /**< Audio activity (send/recv) */
int ma_video:4; /**< Video activity (send/recv) */
int ma_image:4; /**< Image activity (send/recv) for JPIP */
int ma_chat:4; /**< Chat activity (send/recv) */
} ss_local_activity[1], ss_remote_activity[1];
/** Capabilities as specified by application */
struct soa_description ss_caps[1];
/** Session description provided by user */
struct soa_description ss_user[1];
unsigned ss_user_version; /**< Version incremented at each change */
/** Remote session description */
struct soa_description ss_remote[1];
unsigned ss_remote_version; /**< Version incremented at each change */
/** Local session description */
struct soa_description ss_local[1];
unsigned ss_local_user_version, ss_local_remote_version;
char const *ss_hold_local;
/** Previous session description (return to this if offer is rejected) */
struct soa_description ss_previous[1];
unsigned ss_previous_user_version, ss_previous_remote_version;
char const *ss_hold_previous;
sdp_session_t *ss_rsession; /**< Processed remote SDP */
/** SIP features required */
char const * const *ss_local_required;
/** SIP features supported */
char const * const *ss_local_support;
/** SIP features required by remote */
char const **ss_remote_required;
/** SIP features supported */
char const **ss_remote_support;
int ss_status; /**< Status from last media operation */
char const *ss_phrase; /**< Phrase from last media operation */
char *ss_reason; /**< Reason generated by media operation */
/* Media parameters */
char const *ss_address;
enum soa_af ss_af;
char const *ss_hold; /**< Media on hold locally */
char const *ss_cname;
/* XXX - this is part of public API. we should have no bitfields here */
/* Codec handling during negotiation */
unsigned ss_rtp_select:2;
unsigned ss_rtp_sort:2;
unsigned ss_rtp_mismatch:1;
unsigned ss_srtp_enable:1,
ss_srtp_confidentiality:1,
ss_srtp_integrity:1;
unsigned :0; /* Pad */
int ss_wcode; /**< Warning code from last media operation */
char const *ss_warning; /**< Warnings text from last media operation */
};
/* ====================================================================== */
SOFIAPUBFUN int soa_has_received_sdp(soa_session_t const *ss);
SOFIAPUBFUN int soa_set_status(soa_session_t *ss,
int status, char const *phrase);
SOFIAPUBFUN void soa_set_activity(soa_session_t *ss,
sdp_media_t const *m, int remote);
SOFIAPUBFUN int soa_description_set(soa_session_t *ss,
struct soa_description *ssd,
sdp_session_t *sdp,
char const *sdp_str,
isize_t sdp_len);
SOFIAPUBFUN void soa_description_free(soa_session_t *,
struct soa_description *ssd);
SOFIAPUBFUN int soa_description_dup(su_home_t *,
struct soa_description *ssd,
struct soa_description const *ssd0);
SOFIAPUBFUN int soa_init_sdp_origin(soa_session_t *ss,
sdp_origin_t *o, char buf[64]);
SOFIAPUBFUN int soa_init_sdp_connection(soa_session_t *,
sdp_connection_t *, char buf[64]);
/* ====================================================================== */
/* Debug log settings */
#define SU_LOG soa_log
#ifdef SU_DEBUG_H
#error <su_debug.h> included directly.
#endif
#include <sofia-sip/su_debug.h>
SOFIAPUBVAR su_log_t soa_log[];
SOFIA_END_DECLS
#endif
@@ -0,0 +1,249 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SOA_TAG_H
#define SOA_TAG_H
/**@file sofia-sip/soa_tag.h Tags for SDP Offer/Answer Application Interface.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Mon Aug 1 15:43:53 EEST 2005 ppessi
*/
#ifndef SU_TAG_H
#include <sofia-sip/su_tag.h>
#endif
#ifndef SDP_TAG_H
#include <sofia-sip/sdp_tag.h>
#endif
SOFIA_BEGIN_DECLS
/** List of base SOA tags (defined in base SOA module). */
SOFIAPUBVAR tagi_t soa_tag_list[];
/** Filter tag matching any soa tag. */
#define SOATAG_ANY() soatag_any, ((tag_value_t)0)
SOFIAPUBVAR tag_typedef_t soatag_any;
/**
* Media states
*/
enum {
SOA_ACTIVE_REJECTED = -8, /**< Media rejected in negotiation */
SOA_ACTIVE_DISABLED = -4, /**< Media not negotiated */
SOA_ACTIVE_INACTIVE = 0, /**< Media is inactive: no RTP */
SOA_ACTIVE_SENDONLY = 1, /**< Media is sent only */
SOA_ACTIVE_RECVONLY = 2, /**< Media is received only */
SOA_ACTIVE_SENDRECV = SOA_ACTIVE_SENDONLY | SOA_ACTIVE_RECVONLY
/**< Media is bidirectional */
};
#define SOA_ACTIVE_DISABLED SOA_ACTIVE_DISABLED
#define SOA_ACTIVE_REJECTED SOA_ACTIVE_REJECTED
#define SOA_ACTIVE_INACTIVE SOA_ACTIVE_INACTIVE
#define SOA_ACTIVE_SENDONLY SOA_ACTIVE_SENDONLY
#define SOA_ACTIVE_RECVONLY SOA_ACTIVE_RECVONLY
#define SOA_ACTIVE_SENDRECV SOA_ACTIVE_SENDRECV
/*
* SOA engine and media parameters set by soa_set_params(), get by
* soa_get_params() or soa_get_paramlist()
*/
#define SOATAG_LOCAL_SDP(x) soatag_local_sdp, sdptag_session_v(x)
SOFIAPUBVAR tag_typedef_t soatag_local_sdp;
#define SOATAG_LOCAL_SDP_REF(x) \
soatag_local_sdp_ref, sdptag_session_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_local_sdp_ref;
#define SOATAG_LOCAL_SDP_STR(x) soatag_local_sdp_str, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str;
#define SOATAG_LOCAL_SDP_STR_REF(x) \
soatag_local_sdp_str_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str_ref;
#define SOATAG_USER_SDP(x) soatag_user_sdp, sdptag_session_v(x)
SOFIAPUBVAR tag_typedef_t soatag_user_sdp;
#define SOATAG_USER_SDP_REF(x) \
soatag_user_sdp_ref, sdptag_session_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_user_sdp_ref;
#define SOATAG_USER_SDP_STR(x) soatag_user_sdp_str, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_user_sdp_str;
#define SOATAG_USER_SDP_STR_REF(x) \
soatag_user_sdp_str_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_user_sdp_str_ref;
#define SOATAG_CAPS_SDP(x) soatag_caps_sdp, sdptag_session_v(x)
SOFIAPUBVAR tag_typedef_t soatag_caps_sdp;
#define SOATAG_CAPS_SDP_REF(x) \
soatag_caps_sdp_ref, sdptag_session_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_caps_sdp_ref;
#define SOATAG_CAPS_SDP_STR(x) soatag_caps_sdp_str, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_caps_sdp_str;
#define SOATAG_CAPS_SDP_STR_REF(x) \
soatag_caps_sdp_str_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_caps_sdp_str_ref;
#define SOATAG_REMOTE_SDP(x) soatag_remote_sdp, sdptag_session_v(x)
SOFIAPUBVAR tag_typedef_t soatag_remote_sdp;
#define SOATAG_REMOTE_SDP_REF(x) \
soatag_remote_sdp_ref, sdptag_session_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_remote_sdp_ref;
#define SOATAG_REMOTE_SDP_STR(x) soatag_remote_sdp_str, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_remote_sdp_str;
#define SOATAG_REMOTE_SDP_STR_REF(x) \
soatag_remote_sdp_str_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_remote_sdp_str_ref;
#define SOATAG_LOCAL_SDP(x) soatag_local_sdp, sdptag_session_v(x)
SOFIAPUBVAR tag_typedef_t soatag_local_sdp;
#define SOATAG_LOCAL_SDP_REF(x) \
soatag_local_sdp_ref, sdptag_session_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_local_sdp_ref;
#define SOATAG_LOCAL_SDP_STR(x) soatag_local_sdp_str, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str;
#define SOATAG_LOCAL_SDP_STR_REF(x) \
soatag_local_sdp_str_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_session_sdp_str_ref;
#define SOATAG_AF(x) soatag_af, tag_int_v((x))
SOFIAPUBVAR tag_typedef_t soatag_af;
#define SOATAG_AF_REF(x) soatag_af_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_af_ref;
/** SOATAG_AF() parameter type */
enum soa_af {
SOA_AF_ANY, /**< Use any address family. */
SOA_AF_IP4_ONLY, /**< Use IP version 4 only */
SOA_AF_IP6_ONLY, /**< Use IP version 6 only */
SOA_AF_IP4_IP6, /**< Prefer IP4 to IP6 */
SOA_AF_IP6_IP4 /**< Prefer IP6 to IP4 */
};
#define SOA_AF_ANY SOA_AF_ANY
#define SOA_AF_IP4_ONLY SOA_AF_IP4_ONLY
#define SOA_AF_IP6_ONLY SOA_AF_IP6_ONLY
#define SOA_AF_IP4_IP6 SOA_AF_IP4_IP6
#define SOA_AF_IP6_IP4 SOA_AF_IP6_IP4
#define SOATAG_ADDRESS(x) soatag_address, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_address;
#define SOATAG_ADDRESS_REF(x) soatag_address_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_address_ref;
#define SOATAG_RTP_SELECT(x) soatag_rtp_select, tag_int_v(x)
SOFIAPUBVAR tag_typedef_t soatag_rtp_select;
#define SOATAG_RTP_SELECT_REF(x) soatag_rtp_select_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_rtp_select_ref;
/** Parameter type for SOATAG_RTP_SELECT() */
enum {
SOA_RTP_SELECT_SINGLE, /**< Select the best common codec */
SOA_RTP_SELECT_COMMON, /**< Select all common codecs */
SOA_RTP_SELECT_ALL /**< Select all local codecs */
};
#define SOATAG_AUDIO_AUX(x) soatag_audio_aux, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_audio_aux;
#define SOATAG_AUDIO_AUX_REF(x) soatag_audio_aux_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_audio_aux_ref;
#define SOATAG_RTP_SORT(x) soatag_rtp_sort, tag_int_v(x)
SOFIAPUBVAR tag_typedef_t soatag_rtp_sort;
#define SOATAG_RTP_SORT_REF(x) soatag_rtp_sort_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_rtp_sort_ref;
/** Parameter type for SOATAG_RTP_SORT() */
enum {
SOA_RTP_SORT_DEFAULT, /**< Select codecs by local preference
* when media is recvonly,
* remote preference othewise.
*/
SOA_RTP_SORT_LOCAL, /**< Select codecs by local preference. */
SOA_RTP_SORT_REMOTE /**< Select codecs by remote preference. */
};
#define SOATAG_RTP_MISMATCH(x) soatag_rtp_mismatch, tag_bool_v(x)
SOFIAPUBVAR tag_typedef_t soatag_rtp_mismatch;
#define SOATAG_RTP_MISMATCH_REF(x) soatag_rtp_mismatch_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_rtp_mismatch_ref;
#define SOATAG_ACTIVE_AUDIO(x) soatag_active_audio, tag_int_v(x)
SOFIAPUBVAR tag_typedef_t soatag_active_audio;
#define SOATAG_ACTIVE_AUDIO_REF(x) soatag_active_audio_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_active_audio_ref;
#define SOATAG_ACTIVE_VIDEO(x) soatag_active_video, tag_int_v(x)
SOFIAPUBVAR tag_typedef_t soatag_active_video;
#define SOATAG_ACTIVE_VIDEO_REF(x) soatag_active_video_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_active_video_ref;
#define SOATAG_ACTIVE_IMAGE(x) soatag_active_image, tag_int_v(x)
SOFIAPUBVAR tag_typedef_t soatag_active_image;
#define SOATAG_ACTIVE_IMAGE_REF(x) soatag_active_image_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_active_image_ref;
#define SOATAG_ACTIVE_CHAT(x) soatag_active_chat, tag_int_v(x)
SOFIAPUBVAR tag_typedef_t soatag_active_chat;
#define SOATAG_ACTIVE_CHAT_REF(x) soatag_active_chat_ref, tag_int_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_active_chat_ref;
/** Enable SRTP */
#define SOATAG_SRTP_ENABLE(x) soatag_srtp_enable, tag_bool_v(x)
SOFIAPUBVAR tag_typedef_t soatag_srtp_enable;
#define SOATAG_SRTP_ENABLE_REF(x) soatag_srtp_enable_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_srtp_enable_ref;
#define SOATAG_SRTP_CONFIDENTIALITY(x) soatag_srtp_confidentiality, tag_bool_v(x)
SOFIAPUBVAR tag_typedef_t soatag_srtp_confidentiality;
#define SOATAG_SRTP_CONFIDENTIALITY_REF(x) soatag_srtp_confidentiality_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_srtp_confidentiality_ref;
/** Enable SRTP integrity protection */
#define SOATAG_SRTP_INTEGRITY(x) soatag_srtp_integrity, tag_bool_v(x)
SOFIAPUBVAR tag_typedef_t soatag_srtp_integrity;
#define SOATAG_SRTP_INTEGRITY_REF(x) \
soatag_srtp_integrity_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_srtp_integrity_ref;
#define SOATAG_HOLD(x) soatag_hold, tag_str_v(x)
SOFIAPUBVAR tag_typedef_t soatag_hold;
#define SOATAG_HOLD_REF(x) soatag_hold_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t soatag_hold_ref;
SOFIA_END_DECLS
#endif /* SOA_TAG_H */
File diff suppressed because it is too large. Load diff