mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 12:07:06 +00:00
FS-6450 [unimrcp] Update library
[apr] Backport APR_RING_FOREACH and APR_RING_FOREACH_SAFE macros to APR for unimrcp compatibility. [unimrcp] configure.gnu - need full path, not relative path for library paths [unimrcp] added uni_revision.h - couldn't get it to autogenerate from build [mod_unimrcp] add better logging and error checking on module load. Currently dumps core on MRCPv1 TTS attempt [mod_unimrcp] don't configure MRCPv1 session with a connection agent- causes crash
This commit is contained in:
1 parent
f198d82bac
commit
8330336e9a
533 files changed
+16386
-18997
No files matched your search
@@ -1,7 +1,6 @@
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -Iinclude \
|
||||
-I$(unimrcp_srcdir)/modules/mrcp-sofiasip/include \
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/modules/mrcp-sofiasip/include \
|
||||
-I$(top_srcdir)/libs/mrcpv2-transport/include \
|
||||
-I$(top_srcdir)/libs/mrcp-signaling/include \
|
||||
-I$(top_srcdir)/libs/mrcp/include \
|
||||
@@ -10,7 +9,7 @@ AM_CPPFLAGS = -Iinclude \
|
||||
-I$(top_srcdir)/libs/mrcp/resources/include \
|
||||
-I$(top_srcdir)/libs/mpf/include \
|
||||
-I$(top_srcdir)/libs/apr-toolkit/include \
|
||||
$(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES) $(UNIMRCP_SOFIA_INCLUDES)
|
||||
$(UNIMRCP_APR_INCLUDES) $(UNIMRCP_SOFIA_INCLUDES)
|
||||
|
||||
noinst_LTLIBRARIES = libmrcpsofiasip.la
|
||||
|
||||
@@ -19,4 +18,5 @@ include_HEADERS = include/mrcp_sdp.h \
|
||||
include/mrcp_sofiasip_client_agent.h
|
||||
libmrcpsofiasip_la_SOURCES = src/mrcp_sdp.c \
|
||||
src/mrcp_sofiasip_server_agent.c \
|
||||
src/mrcp_sofiasip_client_agent.c
|
||||
src/mrcp_sofiasip_client_agent.c \
|
||||
src/mrcp_sofiasip_logger.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sdp.h 1474 2010-02-07 20:51:47Z achaloyan $
|
||||
* $Id: mrcp_sdp.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
#ifndef MRCP_SDP_H
|
||||
@@ -32,7 +32,7 @@ APT_BEGIN_EXTERN_C
|
||||
MRCP_DECLARE(apr_size_t) sdp_string_generate_by_mrcp_descriptor(char *buffer, apr_size_t size, const mrcp_session_descriptor_t *descriptor, apt_bool_t offer);
|
||||
|
||||
/** Generate MRCP descriptor by SDP session */
|
||||
MRCP_DECLARE(mrcp_session_descriptor_t*) mrcp_descriptor_generate_by_sdp_session(const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool);
|
||||
MRCP_DECLARE(apt_bool_t) mrcp_descriptor_generate_by_sdp_session(mrcp_session_descriptor_t* descriptor, const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool);
|
||||
|
||||
/** Generate SDP resource discovery string */
|
||||
MRCP_DECLARE(apr_size_t) sdp_resource_discovery_string_generate(const char *ip, const char *origin, char *buffer, apr_size_t size);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sofiasip_client_agent.h 1700 2010-05-21 18:56:06Z achaloyan $
|
||||
* $Id: mrcp_sofiasip_client_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
#ifndef MRCP_SOFIASIP_CLIENT_AGENT_H
|
||||
@@ -56,6 +56,10 @@ struct mrcp_sofia_client_config_t {
|
||||
apr_size_t sip_t4;
|
||||
/** SIP T1x64 timer */
|
||||
apr_size_t sip_t1x64;
|
||||
/** Print out SIP messages to the console */
|
||||
apt_bool_t tport_log;
|
||||
/** Dump SIP messages to the specified file */
|
||||
char *tport_dump_file;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -68,6 +72,11 @@ MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_client_agent_create(const char *id
|
||||
*/
|
||||
MRCP_DECLARE(mrcp_sofia_client_config_t*) mrcp_sofiasip_client_config_alloc(apr_pool_t *pool);
|
||||
|
||||
/**
|
||||
* Initialize Sofia-SIP logger.
|
||||
*/
|
||||
MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_client_logger_init(const char *name, const char *level_str, apt_bool_t redirect);
|
||||
|
||||
APT_END_EXTERN_C
|
||||
|
||||
#endif /* MRCP_SOFIASIP_CLIENT_AGENT_H */
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sofiasip_server_agent.h 1700 2010-05-21 18:56:06Z achaloyan $
|
||||
* $Id: mrcp_sofiasip_server_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
#ifndef MRCP_SOFIASIP_SERVER_AGENT_H
|
||||
@@ -59,6 +59,10 @@ struct mrcp_sofia_server_config_t {
|
||||
apr_size_t sip_t4;
|
||||
/** SIP T1x64 timer */
|
||||
apr_size_t sip_t1x64;
|
||||
/** Print out SIP messages to the console */
|
||||
apt_bool_t tport_log;
|
||||
/** Dump SIP messages to the specified file */
|
||||
char *tport_dump_file;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -71,6 +75,11 @@ MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_server_agent_create(const char *id
|
||||
*/
|
||||
MRCP_DECLARE(mrcp_sofia_server_config_t*) mrcp_sofiasip_server_config_alloc(apr_pool_t *pool);
|
||||
|
||||
/**
|
||||
* Initialize Sofia-SIP logger.
|
||||
*/
|
||||
MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_server_logger_init(const char *name, const char *level_str, apt_bool_t redirect);
|
||||
|
||||
APT_END_EXTERN_C
|
||||
|
||||
#endif /* MRCP_SOFIASIP_SERVER_AGENT_H */
|
||||
@@ -1,293 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="mrcpsofiasip"
|
||||
ProjectGUID="{746F3632-5BB2-4570-9453-31D6D58A7D8E}"
|
||||
RootNamespace="mrcpsofiasip"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="include"
|
||||
PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="include"
|
||||
PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="include"
|
||||
PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="include"
|
||||
PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="include"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\include\mrcp_sdp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\mrcp_sofiasip_client_agent.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\mrcp_sofiasip_server_agent.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\mrcp_sdp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\mrcp_sofiasip_client_agent.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\mrcp_sofiasip_server_agent.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{6e92b598-880e-4fe5-88fb-f69df8e06a57}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\mrcp_sdp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\mrcp_sofiasip_client_agent.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\mrcp_sofiasip_server_agent.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\mrcp_sdp.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_client_agent.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_server_agent.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>mrcpsofiasip</ProjectName>
|
||||
<ProjectGuid>{746F3632-5BB2-4570-9453-31D6D58A7D8E}</ProjectGuid>
|
||||
<RootNamespace>mrcpsofiasip</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\mrcp_sdp.h" />
|
||||
<ClInclude Include="include\mrcp_sofiasip_client_agent.h" />
|
||||
<ClInclude Include="include\mrcp_sofiasip_server_agent.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\mrcp_sdp.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_client_agent.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_server_agent.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\win32\sofia\libsofia_sip_ua_static.2012.vcxproj">
|
||||
<Project>{70a49bc2-7500-41d0-b75d-edcc5be987a0}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -256,6 +256,10 @@
|
||||
RelativePath=".\include\mrcp_sofiasip_server_agent.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\mrcp_sofiasip_log.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="src"
|
||||
@@ -269,6 +273,10 @@
|
||||
RelativePath=".\src\mrcp_sofiasip_client_agent.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\mrcp_sofiasip_logger.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\mrcp_sofiasip_server_agent.c"
|
||||
>
|
||||
|
||||
+146
-137
@@ -1,138 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>mrcpsofiasip</ProjectName>
|
||||
<ProjectGuid>{746F3632-5BB2-4570-9453-31D6D58A7D8E}</ProjectGuid>
|
||||
<RootNamespace>mrcpsofiasip</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\mrcp_sdp.h" />
|
||||
<ClInclude Include="include\mrcp_sofiasip_client_agent.h" />
|
||||
<ClInclude Include="include\mrcp_sofiasip_server_agent.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\mrcp_sdp.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_client_agent.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_server_agent.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\win32\sofia\libsofia_sip_ua_static.2010.vcxproj">
|
||||
<Project>{70a49bc2-7500-41d0-b75d-edcc5be987a0}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{746F3632-5BB2-4570-9453-31D6D58A7D8E}</ProjectGuid>
|
||||
<RootNamespace>mrcpsofiasip</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
|
||||
<Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\mrcp_sdp.h" />
|
||||
<ClInclude Include="include\mrcp_sofiasip_client_agent.h" />
|
||||
<ClInclude Include="include\mrcp_sofiasip_server_agent.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\mrcp_sdp.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_client_agent.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_logger.c" />
|
||||
<ClCompile Include="src\mrcp_sofiasip_server_agent.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\libs\mrcp-signaling\mrcpsignaling.vcxproj">
|
||||
<Project>{12a49562-bab9-43a3-a21d-15b60bbb4c31}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libs\mrcpv2-transport\mrcpv2transport.vcxproj">
|
||||
<Project>{a9edac04-6a5f-4ba7-bc0d-cce7b255b6ea}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+37
-34
@@ -1,35 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{6e92b598-880e-4fe5-88fb-f69df8e06a57}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\mrcp_sdp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\mrcp_sofiasip_client_agent.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\mrcp_sofiasip_server_agent.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\mrcp_sdp.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_client_agent.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_server_agent.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{5256b9c6-18be-48fc-aaa3-8e2c17df7f8d}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\mrcp_sdp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\mrcp_sofiasip_client_agent.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\mrcp_sofiasip_server_agent.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\mrcp_sdp.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_client_agent.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_server_agent.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\mrcp_sofiasip_logger.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sdp.c 1647 2010-04-12 19:34:53Z achaloyan $
|
||||
* $Id: mrcp_sdp.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "mrcp_session_descriptor.h"
|
||||
#include "mrcp_control_descriptor.h"
|
||||
#include "mpf_rtp_attribs.h"
|
||||
#include "mpf_rtp_pt.h"
|
||||
#include "apt_text_stream.h"
|
||||
#include "apt_log.h"
|
||||
|
||||
@@ -83,18 +84,15 @@ MRCP_DECLARE(apr_size_t) sdp_string_generate_by_mrcp_descriptor(char *buffer, ap
|
||||
}
|
||||
|
||||
/** Generate MRCP descriptor by SDP session */
|
||||
MRCP_DECLARE(mrcp_session_descriptor_t*) mrcp_descriptor_generate_by_sdp_session(const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool)
|
||||
MRCP_DECLARE(apt_bool_t) mrcp_descriptor_generate_by_sdp_session(mrcp_session_descriptor_t* descriptor, const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool)
|
||||
{
|
||||
sdp_media_t *sdp_media;
|
||||
mrcp_session_descriptor_t *descriptor;
|
||||
|
||||
if(!sdp) {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Invalid SDP Message");
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
descriptor = mrcp_session_descriptor_create(pool);
|
||||
|
||||
if(force_destination_ip) {
|
||||
apt_string_assign(&descriptor->ip,force_destination_ip,pool);
|
||||
}
|
||||
@@ -132,37 +130,43 @@ MRCP_DECLARE(mrcp_session_descriptor_t*) mrcp_descriptor_generate_by_sdp_session
|
||||
break;
|
||||
}
|
||||
}
|
||||
return descriptor;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/** Generate SDP media by RTP media descriptor */
|
||||
static apr_size_t sdp_rtp_media_generate(char *buffer, apr_size_t size, const mrcp_session_descriptor_t *descriptor, const mpf_rtp_media_descriptor_t *audio_media)
|
||||
{
|
||||
apr_size_t offset = 0;
|
||||
int i;
|
||||
mpf_codec_descriptor_t *codec_descriptor;
|
||||
apr_array_header_t *descriptor_arr = audio_media->codec_list.descriptor_arr;
|
||||
if(!descriptor_arr) {
|
||||
return 0;
|
||||
}
|
||||
offset += snprintf(buffer+offset,size-offset,
|
||||
"m=audio %d RTP/AVP",
|
||||
audio_media->state == MPF_MEDIA_ENABLED ? audio_media->port : 0);
|
||||
for(i=0; i<descriptor_arr->nelts; i++) {
|
||||
codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
|
||||
if(codec_descriptor->enabled == TRUE) {
|
||||
offset += snprintf(buffer+offset,size-offset," %d", codec_descriptor->payload_type);
|
||||
}
|
||||
}
|
||||
offset += snprintf(buffer+offset,size-offset,"\r\n");
|
||||
if(descriptor->ip.length && audio_media->ip.length &&
|
||||
apt_string_compare(&descriptor->ip,&audio_media->ip) != TRUE) {
|
||||
const char *media_ip = audio_media->ext_ip.buf ? audio_media->ext_ip.buf : audio_media->ip.buf;
|
||||
offset += sprintf(buffer+offset,"c=IN IP4 %s\r\n",media_ip);
|
||||
}
|
||||
if(audio_media->state == MPF_MEDIA_ENABLED) {
|
||||
const apt_str_t *direction_str = mpf_rtp_direction_str_get(audio_media->direction);
|
||||
int codec_count = 0;
|
||||
int i;
|
||||
mpf_codec_descriptor_t *codec_descriptor;
|
||||
apr_array_header_t *descriptor_arr = audio_media->codec_list.descriptor_arr;
|
||||
const apt_str_t *direction_str;
|
||||
if(!descriptor_arr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
offset += snprintf(buffer+offset,size-offset,"m=audio %d RTP/AVP",audio_media->port);
|
||||
for(i=0; i<descriptor_arr->nelts; i++) {
|
||||
codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
|
||||
if(codec_descriptor->enabled == TRUE) {
|
||||
offset += snprintf(buffer+offset,size-offset," %d",codec_descriptor->payload_type);
|
||||
codec_count++;
|
||||
}
|
||||
}
|
||||
if(!codec_count){
|
||||
/* SDP m line should have at least one media format listed; use a reserved RTP payload type */
|
||||
offset += snprintf(buffer+offset,size-offset," %d",RTP_PT_RESERVED);
|
||||
}
|
||||
offset += snprintf(buffer+offset,size-offset,"\r\n");
|
||||
|
||||
if(descriptor->ip.length && audio_media->ip.length &&
|
||||
apt_string_compare(&descriptor->ip,&audio_media->ip) != TRUE) {
|
||||
const char *media_ip = audio_media->ext_ip.buf ? audio_media->ext_ip.buf : audio_media->ip.buf;
|
||||
offset += snprintf(buffer+offset,size-offset,"c=IN IP4 %s\r\n",media_ip);
|
||||
}
|
||||
|
||||
for(i=0; i<descriptor_arr->nelts; i++) {
|
||||
codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
|
||||
if(codec_descriptor->enabled == TRUE && codec_descriptor->name.buf) {
|
||||
@@ -177,6 +181,8 @@ static apr_size_t sdp_rtp_media_generate(char *buffer, apr_size_t size, const mr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
direction_str = mpf_rtp_direction_str_get(audio_media->direction);
|
||||
if(direction_str) {
|
||||
offset += snprintf(buffer+offset,size-offset,"a=%s\r\n",direction_str->buf);
|
||||
}
|
||||
@@ -185,6 +191,10 @@ static apr_size_t sdp_rtp_media_generate(char *buffer, apr_size_t size, const mr
|
||||
offset += snprintf(buffer+offset,size-offset,"a=ptime:%hu\r\n",audio_media->ptime);
|
||||
}
|
||||
}
|
||||
else {
|
||||
offset += snprintf(buffer+offset,size-offset,"m=audio 0 RTP/AVP %d\r\n",RTP_PT_RESERVED);
|
||||
}
|
||||
|
||||
offset += snprintf(buffer+offset,size-offset,"a=mid:%"APR_SIZE_T_FMT"\r\n",audio_media->mid);
|
||||
return offset;
|
||||
}
|
||||
@@ -225,7 +235,7 @@ static apr_size_t sdp_control_media_generate(char *buffer, apr_size_t size, cons
|
||||
}
|
||||
else { /* answer */
|
||||
if(control_media->port) {
|
||||
offset += sprintf(buffer+offset,
|
||||
offset += snprintf(buffer+offset,size-offset,
|
||||
"m=application %d %s 1\r\n"
|
||||
"a=setup:%s\r\n"
|
||||
"a=connection:%s\r\n"
|
||||
@@ -238,7 +248,7 @@ static apr_size_t sdp_control_media_generate(char *buffer, apr_size_t size, cons
|
||||
control_media->resource_name.buf);
|
||||
}
|
||||
else {
|
||||
offset += sprintf(buffer+offset,
|
||||
offset += snprintf(buffer+offset,size-offset,
|
||||
"m=application %d %s 1\r\n"
|
||||
"a=channel:%s@%s\r\n",
|
||||
control_media->port,
|
||||
@@ -252,7 +262,6 @@ static apr_size_t sdp_control_media_generate(char *buffer, apr_size_t size, cons
|
||||
offset += snprintf(buffer+offset,size-offset,
|
||||
"a=cmid:%"APR_SIZE_T_FMT"\r\n",
|
||||
APR_ARRAY_IDX(control_media->cmid_arr,i,apr_size_t));
|
||||
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sofiasip_client_agent.c 1799 2011-05-12 02:32:32Z achaloyan $
|
||||
* $Id: mrcp_sofiasip_client_agent.c 2225 2014-11-12 00:45:19Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
typedef struct mrcp_sofia_agent_t mrcp_sofia_agent_t;
|
||||
@@ -26,6 +26,7 @@ typedef struct mrcp_sofia_session_t mrcp_sofia_session_t;
|
||||
#include <sofia-sip/nua.h>
|
||||
#include <sofia-sip/sip_status.h>
|
||||
#include <sofia-sip/sdp.h>
|
||||
#include <sofia-sip/tport.h>
|
||||
#include <sofia-sip/sofia_features.h>
|
||||
#undef strcasecmp
|
||||
#undef strncasecmp
|
||||
@@ -56,6 +57,7 @@ struct mrcp_sofia_session_t {
|
||||
|
||||
su_home_t *home;
|
||||
nua_handle_t *nh;
|
||||
enum nua_callstate nua_state;
|
||||
|
||||
apt_bool_t terminate_requested;
|
||||
mrcp_session_descriptor_t *descriptor;
|
||||
@@ -92,6 +94,7 @@ static void mrcp_sofia_event_callback( nua_event_t nua_event,
|
||||
sip_t const *sip,
|
||||
tagi_t tags[]);
|
||||
|
||||
apt_bool_t mrcp_sofiasip_log_init(const char *name, const char *level_str, apt_bool_t redirect);
|
||||
|
||||
/** Create Sofia-SIP Signaling Agent */
|
||||
MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_client_agent_create(const char *id, mrcp_sofia_client_config_t *config, apr_pool_t *pool)
|
||||
@@ -100,7 +103,7 @@ MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_client_agent_create(const char *id
|
||||
apt_task_vtable_t *vtable;
|
||||
mrcp_sofia_agent_t *sofia_agent;
|
||||
sofia_agent = apr_palloc(pool,sizeof(mrcp_sofia_agent_t));
|
||||
sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,MRCP_VERSION_2,pool);
|
||||
sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,pool);
|
||||
sofia_agent->sig_agent->create_client_session = mrcp_sofia_session_create;
|
||||
sofia_agent->root = NULL;
|
||||
sofia_agent->nua = NULL;
|
||||
@@ -143,19 +146,34 @@ MRCP_DECLARE(mrcp_sofia_client_config_t*) mrcp_sofiasip_client_config_alloc(apr_
|
||||
config->sip_t2 = 0;
|
||||
config->sip_t4 = 0;
|
||||
config->sip_t1x64 = 0;
|
||||
|
||||
config->tport_log = FALSE;
|
||||
config->tport_dump_file = NULL;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_client_logger_init(const char *name, const char *level_str, apt_bool_t redirect)
|
||||
{
|
||||
return mrcp_sofiasip_log_init(name,level_str,redirect);
|
||||
}
|
||||
|
||||
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_client_config_t *config, apr_pool_t *pool)
|
||||
{
|
||||
const char *local_ip = config->ext_ip ? config->ext_ip : config->local_ip;
|
||||
if(!config->local_ip) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
sofia_agent->config = config;
|
||||
sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu", local_ip, config->local_port);
|
||||
sofia_agent->sip_from_str = apr_psprintf(pool,"sip:%s:%hu", local_ip, config->local_port);
|
||||
if(config->ext_ip) {
|
||||
/* Use external IP address in Contact and From headers, if behind NAT */
|
||||
sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu", config->ext_ip, config->local_port);
|
||||
sofia_agent->sip_from_str = apr_psprintf(pool,"sip:%s:%hu", config->ext_ip, config->local_port);
|
||||
}
|
||||
else {
|
||||
sofia_agent->sip_contact_str = NULL; /* Let Sofia-SIP implicitly set Contact header by default */
|
||||
sofia_agent->sip_from_str = apr_psprintf(pool,"sip:%s:%hu", config->local_ip, config->local_port);
|
||||
}
|
||||
|
||||
if(config->transport) {
|
||||
sofia_agent->sip_bind_str = apr_psprintf(pool,"sip:%s:%hu;transport=%s",
|
||||
@@ -189,6 +207,8 @@ static void mrcp_sofia_task_initialize(apt_task_t *task)
|
||||
mrcp_sofia_event_callback, /* Callback for processing events */
|
||||
sofia_agent, /* Additional data to pass to callback */
|
||||
NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
|
||||
TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
|
||||
TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
|
||||
TAG_END()); /* Last tag should always finish the sequence */
|
||||
if(sofia_agent->nua) {
|
||||
nua_set_params(
|
||||
@@ -202,6 +222,11 @@ static void mrcp_sofia_task_initialize(apt_task_t *task)
|
||||
SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
|
||||
TAG_END());
|
||||
}
|
||||
else {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create NUA [%s] %s",
|
||||
apt_task_name_get(task),
|
||||
sofia_agent->sip_bind_str);
|
||||
}
|
||||
}
|
||||
|
||||
static apt_bool_t mrcp_sofia_task_run(apt_task_t *task)
|
||||
@@ -220,7 +245,7 @@ static apt_bool_t mrcp_sofia_task_run(apt_task_t *task)
|
||||
sofia_agent->root = NULL;
|
||||
su_deinit();
|
||||
|
||||
apt_task_child_terminate(task);
|
||||
apt_task_terminate_request_process(task);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -228,7 +253,8 @@ static apt_bool_t mrcp_sofia_task_terminate(apt_task_t *task)
|
||||
{
|
||||
mrcp_sofia_agent_t *sofia_agent = apt_task_object_get(task);
|
||||
if(sofia_agent->nua) {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA");
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA [%s]",
|
||||
apt_task_name_get(task));
|
||||
nua_shutdown(sofia_agent->nua);
|
||||
}
|
||||
return TRUE;
|
||||
@@ -245,6 +271,10 @@ static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, mrcp_sig_se
|
||||
mrcp_sofia_session_t *sofia_session;
|
||||
session->request_vtable = &session_request_vtable;
|
||||
|
||||
if(!sofia_agent->nua) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
sofia_session = apr_palloc(session->pool,sizeof(mrcp_sofia_session_t));
|
||||
sofia_session->mutex = NULL;
|
||||
sofia_session->home = su_home_new(sizeof(*sofia_session->home));
|
||||
@@ -254,7 +284,7 @@ static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, mrcp_sig_se
|
||||
sofia_session->descriptor = NULL;
|
||||
session->obj = sofia_session;
|
||||
|
||||
if(settings->user_name && settings->user_name != '\0') {
|
||||
if(settings->user_name && *settings->user_name != '\0') {
|
||||
sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%hu",
|
||||
settings->user_name,
|
||||
settings->server_ip,
|
||||
@@ -271,15 +301,16 @@ static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, mrcp_sig_se
|
||||
sofia_session,
|
||||
SIPTAG_TO_STR(sofia_session->sip_to_str),
|
||||
SIPTAG_FROM_STR(sofia_agent->sip_from_str),
|
||||
SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
|
||||
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
|
||||
TAG_IF(settings->feature_tags,SIPTAG_ACCEPT_CONTACT_STR(settings->feature_tags)),
|
||||
TAG_END());
|
||||
sofia_session->nua_state = nua_callstate_init;
|
||||
|
||||
apr_thread_mutex_create(&sofia_session->mutex,APR_THREAD_MUTEX_DEFAULT,session->pool);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static apt_bool_t mrcp_sofia_session_destroy(mrcp_sofia_session_t *sofia_session)
|
||||
static apt_bool_t mrcp_sofia_session_cleanup(mrcp_sofia_session_t *sofia_session)
|
||||
{
|
||||
if(sofia_session->mutex) {
|
||||
apr_thread_mutex_destroy(sofia_session->mutex);
|
||||
@@ -306,7 +337,7 @@ static apt_bool_t mrcp_sofia_session_unref(mrcp_sofia_session_t *sofia_session)
|
||||
static apt_bool_t mrcp_sofia_session_offer(mrcp_session_t *session, mrcp_session_descriptor_t *descriptor)
|
||||
{
|
||||
char sdp_str[2048];
|
||||
char *local_sdp_str = NULL;
|
||||
const char *local_sdp_str = NULL;
|
||||
apt_bool_t res = FALSE;
|
||||
mrcp_sofia_session_t *sofia_session = session->obj;
|
||||
if(!sofia_session) {
|
||||
@@ -359,7 +390,7 @@ static apt_bool_t mrcp_sofia_session_terminate_request(mrcp_session_t *session)
|
||||
apr_thread_mutex_unlock(sofia_session->mutex);
|
||||
|
||||
if(sofia_session->terminate_requested == FALSE) {
|
||||
mrcp_sofia_session_destroy(sofia_session);
|
||||
mrcp_sofia_session_cleanup(sofia_session);
|
||||
mrcp_session_terminate_response(session);
|
||||
}
|
||||
return TRUE;
|
||||
@@ -391,35 +422,34 @@ static void mrcp_sofia_on_session_ready(
|
||||
tagi_t tags[])
|
||||
{
|
||||
mrcp_session_t *session = sofia_session->session;
|
||||
if(session) {
|
||||
const char *local_sdp_str = NULL, *remote_sdp_str = NULL;
|
||||
mrcp_session_descriptor_t *descriptor = NULL;
|
||||
const char *remote_sdp_str = NULL;
|
||||
mrcp_session_descriptor_t *descriptor = mrcp_session_descriptor_create(session->pool);
|
||||
descriptor->response_code = status;
|
||||
|
||||
tl_gets(tags,
|
||||
SOATAG_LOCAL_SDP_STR_REF(local_sdp_str),
|
||||
SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
|
||||
TAG_END());
|
||||
tl_gets(tags,
|
||||
SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
|
||||
TAG_END());
|
||||
|
||||
if(remote_sdp_str) {
|
||||
sdp_parser_t *parser = NULL;
|
||||
sdp_session_t *sdp = NULL;
|
||||
const char *force_destination_ip = NULL;
|
||||
apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->log_obj,"Remote SDP "APT_NAMESID_FMT"\n%s",
|
||||
session->name,
|
||||
MRCP_SESSION_SID(session),
|
||||
remote_sdp_str);
|
||||
if(remote_sdp_str) {
|
||||
sdp_parser_t *parser = NULL;
|
||||
sdp_session_t *sdp = NULL;
|
||||
const char *force_destination_ip = NULL;
|
||||
apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->log_obj,"Remote SDP "APT_NAMESID_FMT"\n%s",
|
||||
session->name,
|
||||
MRCP_SESSION_SID(session),
|
||||
remote_sdp_str);
|
||||
|
||||
parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
|
||||
sdp = sdp_session(parser);
|
||||
if(sofia_session->sip_settings->force_destination == TRUE) {
|
||||
force_destination_ip = sofia_session->sip_settings->server_ip;
|
||||
}
|
||||
descriptor = mrcp_descriptor_generate_by_sdp_session(sdp,force_destination_ip,session->pool);
|
||||
sdp_parser_free(parser);
|
||||
parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
|
||||
sdp = sdp_session(parser);
|
||||
if(sofia_session->sip_settings->force_destination == TRUE) {
|
||||
force_destination_ip = sofia_session->sip_settings->server_ip;
|
||||
}
|
||||
|
||||
mrcp_session_answer(session,descriptor);
|
||||
mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,force_destination_ip,session->pool);
|
||||
sdp_parser_free(parser);
|
||||
}
|
||||
|
||||
mrcp_session_answer(session,descriptor);
|
||||
}
|
||||
|
||||
static void mrcp_sofia_on_session_redirect(
|
||||
@@ -436,11 +466,11 @@ static void mrcp_sofia_on_session_redirect(
|
||||
return;
|
||||
}
|
||||
sip_contact = sip->sip_contact;
|
||||
if(!sip_contact || !sip_contact->m_url) {
|
||||
if(!sip_contact) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(sip_contact->m_url->url_user && sip_contact->m_url->url_user != '\0') {
|
||||
if(sip_contact->m_url->url_user && *sip_contact->m_url->url_user != '\0') {
|
||||
sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%s",
|
||||
sip_contact->m_url->url_user,
|
||||
sip_contact->m_url->url_host,
|
||||
@@ -470,7 +500,7 @@ static void mrcp_sofia_on_session_redirect(
|
||||
sofia_session,
|
||||
SIPTAG_TO_STR(sofia_session->sip_to_str),
|
||||
SIPTAG_FROM_STR(sofia_agent->sip_from_str),
|
||||
SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
|
||||
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
|
||||
TAG_END());
|
||||
|
||||
apr_thread_mutex_unlock(sofia_session->mutex);
|
||||
@@ -486,24 +516,31 @@ static void mrcp_sofia_on_session_terminate(
|
||||
sip_t const *sip,
|
||||
tagi_t tags[])
|
||||
{
|
||||
mrcp_session_t *session = sofia_session->session;
|
||||
if(session) {
|
||||
apt_bool_t terminate_requested;
|
||||
|
||||
apr_thread_mutex_lock(sofia_session->mutex);
|
||||
terminate_requested = sofia_session->terminate_requested;
|
||||
session = sofia_session->session;
|
||||
mrcp_sofia_session_unref(sofia_session);
|
||||
apr_thread_mutex_unlock(sofia_session->mutex);
|
||||
mrcp_session_t *session;
|
||||
apt_bool_t terminate_requested;
|
||||
|
||||
if(terminate_requested == TRUE) {
|
||||
mrcp_sofia_session_destroy(sofia_session);
|
||||
mrcp_session_terminate_response(session);
|
||||
}
|
||||
else {
|
||||
mrcp_session_terminate_event(session);
|
||||
}
|
||||
apr_thread_mutex_lock(sofia_session->mutex);
|
||||
terminate_requested = sofia_session->terminate_requested;
|
||||
session = sofia_session->session;
|
||||
mrcp_sofia_session_unref(sofia_session);
|
||||
apr_thread_mutex_unlock(sofia_session->mutex);
|
||||
|
||||
if(terminate_requested == TRUE) {
|
||||
sofia_session->nua_state = nua_callstate_terminated;
|
||||
mrcp_sofia_session_cleanup(sofia_session);
|
||||
mrcp_session_terminate_response(session);
|
||||
return;
|
||||
}
|
||||
|
||||
if(sofia_session->nua_state == nua_callstate_ready) {
|
||||
mrcp_session_terminate_event(session);
|
||||
}
|
||||
else {
|
||||
mrcp_session_descriptor_t *descriptor = mrcp_session_descriptor_create(session->pool);
|
||||
descriptor->response_code = status;
|
||||
mrcp_session_answer(session,descriptor);
|
||||
}
|
||||
sofia_session->nua_state = nua_callstate_terminated;
|
||||
}
|
||||
|
||||
static void mrcp_sofia_on_state_change(
|
||||
@@ -514,23 +551,28 @@ static void mrcp_sofia_on_state_change(
|
||||
sip_t const *sip,
|
||||
tagi_t tags[])
|
||||
{
|
||||
int ss_state = nua_callstate_init;
|
||||
int nua_state = nua_callstate_init;
|
||||
tl_gets(tags,
|
||||
NUTAG_CALLSTATE_REF(ss_state),
|
||||
NUTAG_CALLSTATE_REF(nua_state),
|
||||
TAG_END());
|
||||
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"SIP Call State %s [%s]",
|
||||
sofia_session ? sofia_session->session->name : "",
|
||||
nua_callstate_name(ss_state));
|
||||
|
||||
switch(ss_state) {
|
||||
case nua_callstate_ready:
|
||||
mrcp_sofia_on_session_ready(status,sofia_agent,nh,sofia_session,sip,tags);
|
||||
break;
|
||||
case nua_callstate_terminated:
|
||||
mrcp_sofia_on_session_terminate(status,sofia_agent,nh,sofia_session,sip,tags);
|
||||
break;
|
||||
if(!sofia_session || !sofia_session->session) {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"SIP Call State [%s]", nua_callstate_name(nua_state));
|
||||
return;
|
||||
}
|
||||
apt_obj_log(APT_LOG_MARK,APT_PRIO_NOTICE,sofia_session->session->log_obj,"SIP Call State %s [%s]",
|
||||
sofia_session->session->name,
|
||||
nua_callstate_name(nua_state));
|
||||
|
||||
if(nua_state == nua_callstate_terminated) {
|
||||
mrcp_sofia_on_session_terminate(status,sofia_agent,nh,sofia_session,sip,tags);
|
||||
return;
|
||||
}
|
||||
|
||||
if(nua_state == nua_callstate_ready) {
|
||||
mrcp_sofia_on_session_ready(status,sofia_agent,nh,sofia_session,sip,tags);
|
||||
}
|
||||
sofia_session->nua_state = nua_state;
|
||||
}
|
||||
|
||||
static void mrcp_sofia_on_resource_discover(
|
||||
@@ -544,7 +586,8 @@ static void mrcp_sofia_on_resource_discover(
|
||||
mrcp_session_t *session = sofia_session->session;
|
||||
if(session) {
|
||||
const char *remote_sdp_str = NULL;
|
||||
mrcp_session_descriptor_t *descriptor = NULL;
|
||||
mrcp_session_descriptor_t *descriptor = mrcp_session_descriptor_create(session->pool);
|
||||
descriptor->response_code = status;
|
||||
|
||||
if(sip->sip_payload) {
|
||||
remote_sdp_str = sip->sip_payload->pl_data;
|
||||
@@ -559,7 +602,7 @@ static void mrcp_sofia_on_resource_discover(
|
||||
|
||||
parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
|
||||
sdp = sdp_session(parser);
|
||||
descriptor = mrcp_descriptor_generate_by_sdp_session(sdp,NULL,session->pool);
|
||||
mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,NULL,session->pool);
|
||||
sdp_parser_free(parser);
|
||||
}
|
||||
|
||||
@@ -579,8 +622,11 @@ static void mrcp_sofia_event_callback(
|
||||
sip_t const *sip,
|
||||
tagi_t tags[])
|
||||
{
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s",
|
||||
nua_event_name(nua_event),status,phrase);
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s [%s]",
|
||||
nua_event_name(nua_event),
|
||||
status,
|
||||
phrase,
|
||||
sofia_agent->sig_agent->id);
|
||||
|
||||
switch(nua_event) {
|
||||
case nua_i_state:
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sofiasip_logger.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <apr_general.h>
|
||||
#include <sofia-sip/su_log.h>
|
||||
#include "apt_log.h"
|
||||
|
||||
SOFIAPUBVAR su_log_t tport_log[]; /* Transport event debug */
|
||||
SOFIAPUBVAR su_log_t nea_log[]; /* Event engine debug */
|
||||
SOFIAPUBVAR su_log_t nta_log[]; /* Transaction engine debug */
|
||||
SOFIAPUBVAR su_log_t nua_log[]; /* User Agent engine debug */
|
||||
SOFIAPUBVAR su_log_t soa_log[]; /* SDP Offer/Answer engine debug */
|
||||
SOFIAPUBVAR su_log_t su_log_default[]; /* Default debug */
|
||||
|
||||
static void mrcp_sofiasip_log(void *stream, char const *format, va_list arg_ptr)
|
||||
{
|
||||
if(format) {
|
||||
/* use generic vsnprintf() since apr_vformatter doesn't support
|
||||
the format %p widely used by SofiaSIP. */
|
||||
char buf[4096];
|
||||
int len = vsnprintf(buf, sizeof(buf), format, arg_ptr);
|
||||
if(len <= 0)
|
||||
return;
|
||||
if(buf[len-1] == '\n') {
|
||||
/* remove trailing '\n' since apt logger appends it anyway */
|
||||
len--;
|
||||
buf[len] = '\0';
|
||||
}
|
||||
apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "%.*s", len, buf);
|
||||
}
|
||||
}
|
||||
|
||||
static su_log_t* mrcp_sofiasip_logger_get(const char *name)
|
||||
{
|
||||
if (!strcasecmp(name,"tport"))
|
||||
return tport_log;
|
||||
else if (!strcasecmp(name,"nea"))
|
||||
return nea_log;
|
||||
else if (!strcasecmp(name,"nta"))
|
||||
return nta_log;
|
||||
else if (!strcasecmp(name,"nua"))
|
||||
return nua_log;
|
||||
else if (!strcasecmp(name,"soa"))
|
||||
return soa_log;
|
||||
else if (!strcasecmp(name,"default"))
|
||||
return su_log_default;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
apt_bool_t mrcp_sofiasip_log_init(const char *name, const char *level_str, apt_bool_t redirect)
|
||||
{
|
||||
su_log_t *logger = mrcp_sofiasip_logger_get(name);
|
||||
if(!logger) {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown SofiaSIP Logger <%s>",name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Init SofiaSIP Logger [%s] level:%s redirect:%d",
|
||||
name, level_str, redirect);
|
||||
su_log_init(logger);
|
||||
|
||||
if(redirect == TRUE) {
|
||||
su_log_redirect(logger, mrcp_sofiasip_log, NULL);
|
||||
}
|
||||
|
||||
if(level_str) {
|
||||
int level = atoi(level_str);
|
||||
if(level >=0 && level < 10) {
|
||||
su_log_set_level(logger, level);
|
||||
}
|
||||
else {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown SofiaSIP Log Level [%s]: must be in range [0..9]",level_str);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
* Copyright 2008-2014 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: mrcp_sofiasip_server_agent.c 1700 2010-05-21 18:56:06Z achaloyan $
|
||||
* $Id: mrcp_sofiasip_server_agent.c 2221 2014-11-11 02:44:03Z achaloyan@gmail.com $
|
||||
*/
|
||||
|
||||
typedef struct mrcp_sofia_agent_t mrcp_sofia_agent_t;
|
||||
@@ -26,6 +26,7 @@ typedef struct mrcp_sofia_session_t mrcp_sofia_session_t;
|
||||
#include <sofia-sip/nua.h>
|
||||
#include <sofia-sip/sip_status.h>
|
||||
#include <sofia-sip/sdp.h>
|
||||
#include <sofia-sip/tport.h>
|
||||
#include <sofia-sip/sofia_features.h>
|
||||
#undef strcasecmp
|
||||
#undef strncasecmp
|
||||
@@ -65,7 +66,9 @@ static apt_bool_t mrcp_sofia_on_session_terminate(mrcp_session_t *session);
|
||||
|
||||
static const mrcp_session_response_vtable_t session_response_vtable = {
|
||||
mrcp_sofia_on_session_answer,
|
||||
mrcp_sofia_on_session_terminate
|
||||
mrcp_sofia_on_session_terminate,
|
||||
NULL /* mrcp_sofia_on_session_control */,
|
||||
NULL /* mrcp_sofia_on_session_discover */
|
||||
};
|
||||
|
||||
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_server_config_t *config, apr_pool_t *pool);
|
||||
@@ -80,6 +83,7 @@ static void mrcp_sofia_event_callback( nua_event_t nua_event,
|
||||
sip_t const *sip,
|
||||
tagi_t tags[]);
|
||||
|
||||
apt_bool_t mrcp_sofiasip_log_init(const char *name, const char *level_str, apt_bool_t redirect);
|
||||
|
||||
/** Create Sofia-SIP Signaling Agent */
|
||||
MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_server_agent_create(const char *id, mrcp_sofia_server_config_t *config, apr_pool_t *pool)
|
||||
@@ -88,7 +92,7 @@ MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_server_agent_create(const char *id
|
||||
apt_task_vtable_t *vtable;
|
||||
mrcp_sofia_agent_t *sofia_agent;
|
||||
sofia_agent = apr_palloc(pool,sizeof(mrcp_sofia_agent_t));
|
||||
sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,MRCP_VERSION_2,pool);
|
||||
sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,pool);
|
||||
sofia_agent->config = config;
|
||||
sofia_agent->root = NULL;
|
||||
sofia_agent->nua = NULL;
|
||||
@@ -130,14 +134,26 @@ MRCP_DECLARE(mrcp_sofia_server_config_t*) mrcp_sofiasip_server_config_alloc(apr_
|
||||
config->sip_t2 = 0;
|
||||
config->sip_t4 = 0;
|
||||
config->sip_t1x64 = 0;
|
||||
|
||||
config->tport_log = FALSE;
|
||||
config->tport_dump_file = NULL;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_server_logger_init(const char *name, const char *level_str, apt_bool_t redirect)
|
||||
{
|
||||
return mrcp_sofiasip_log_init(name,level_str,redirect);
|
||||
}
|
||||
|
||||
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_server_config_t *config, apr_pool_t *pool)
|
||||
{
|
||||
const char *local_ip = config->ext_ip ? config->ext_ip : config->local_ip;
|
||||
sofia_agent->config = config;
|
||||
sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu",local_ip,config->local_port);
|
||||
sofia_agent->sip_contact_str = NULL; /* Let Sofia-SIP implicitly set Contact header by default */
|
||||
if(config->ext_ip) {
|
||||
/* Use external IP address in Contact header, if behind NAT */
|
||||
sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu",config->ext_ip,config->local_port);
|
||||
}
|
||||
if(config->transport) {
|
||||
sofia_agent->sip_bind_str = apr_psprintf(pool,"sip:%s:%hu;transport=%s",
|
||||
config->local_ip,
|
||||
@@ -170,6 +186,8 @@ static void mrcp_sofia_task_initialize(apt_task_t *task)
|
||||
mrcp_sofia_event_callback, /* Callback for processing events */
|
||||
sofia_agent, /* Additional data to pass to callback */
|
||||
NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
|
||||
TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
|
||||
TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
|
||||
TAG_END()); /* Last tag should always finish the sequence */
|
||||
if(sofia_agent->nua) {
|
||||
nua_set_params(
|
||||
@@ -183,6 +201,11 @@ static void mrcp_sofia_task_initialize(apt_task_t *task)
|
||||
SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
|
||||
TAG_END());
|
||||
}
|
||||
else {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create NUA [%s] %s",
|
||||
apt_task_name_get(task),
|
||||
sofia_agent->sip_bind_str);
|
||||
}
|
||||
}
|
||||
|
||||
static apt_bool_t mrcp_sofia_task_run(apt_task_t *task)
|
||||
@@ -201,7 +224,7 @@ static apt_bool_t mrcp_sofia_task_run(apt_task_t *task)
|
||||
sofia_agent->root = NULL;
|
||||
su_deinit();
|
||||
|
||||
apt_task_child_terminate(task);
|
||||
apt_task_terminate_request_process(task);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -209,7 +232,8 @@ static apt_bool_t mrcp_sofia_task_terminate(apt_task_t *task)
|
||||
{
|
||||
mrcp_sofia_agent_t *sofia_agent = apt_task_object_get(task);
|
||||
if(sofia_agent->nua) {
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA");
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA [%s]",
|
||||
apt_task_name_get(task));
|
||||
nua_shutdown(sofia_agent->nua);
|
||||
}
|
||||
return TRUE;
|
||||
@@ -266,7 +290,7 @@ static apt_bool_t mrcp_sofia_on_session_answer(mrcp_session_t *session, mrcp_ses
|
||||
if(descriptor->status != MRCP_SESSION_STATUS_OK) {
|
||||
int status = sip_status_get(descriptor->status);
|
||||
nua_respond(sofia_session->nh, status, sip_status_phrase(status),
|
||||
SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
|
||||
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
|
||||
TAG_END());
|
||||
return TRUE;
|
||||
}
|
||||
@@ -284,7 +308,7 @@ static apt_bool_t mrcp_sofia_on_session_answer(mrcp_session_t *session, mrcp_ses
|
||||
}
|
||||
|
||||
nua_respond(sofia_session->nh, SIP_200_OK,
|
||||
SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
|
||||
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
|
||||
TAG_IF(local_sdp_str,SOATAG_USER_SDP_STR(local_sdp_str)),
|
||||
SOATAG_AUDIO_AUX("telephone-event"),
|
||||
NUTAG_AUTOANSWER(0),
|
||||
@@ -319,19 +343,10 @@ static void mrcp_sofia_on_call_receive(mrcp_sofia_agent_t *sofia_agent,
|
||||
sip_t const *sip,
|
||||
tagi_t tags[])
|
||||
{
|
||||
int offer_recv = 0, answer_recv = 0, offer_sent = 0, answer_sent = 0;
|
||||
const char *local_sdp_str = NULL, *remote_sdp_str = NULL;
|
||||
mrcp_session_descriptor_t *descriptor = NULL;
|
||||
apt_bool_t status = FALSE;
|
||||
const char *remote_sdp_str = NULL;
|
||||
mrcp_session_descriptor_t *descriptor;
|
||||
|
||||
tl_gets(tags,
|
||||
NUTAG_OFFER_RECV_REF(offer_recv),
|
||||
NUTAG_ANSWER_RECV_REF(answer_recv),
|
||||
NUTAG_OFFER_SENT_REF(offer_sent),
|
||||
NUTAG_ANSWER_SENT_REF(answer_sent),
|
||||
SOATAG_LOCAL_SDP_STR_REF(local_sdp_str),
|
||||
SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
|
||||
TAG_END());
|
||||
|
||||
if(!sofia_session) {
|
||||
sofia_session = mrcp_sofia_session_create(sofia_agent,nh);
|
||||
if(!sofia_session) {
|
||||
@@ -340,6 +355,12 @@ static void mrcp_sofia_on_call_receive(mrcp_sofia_agent_t *sofia_agent,
|
||||
}
|
||||
}
|
||||
|
||||
descriptor = mrcp_session_descriptor_create(sofia_session->session->pool);
|
||||
|
||||
tl_gets(tags,
|
||||
SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
|
||||
TAG_END());
|
||||
|
||||
if(remote_sdp_str) {
|
||||
sdp_parser_t *parser = NULL;
|
||||
sdp_session_t *sdp = NULL;
|
||||
@@ -349,12 +370,12 @@ static void mrcp_sofia_on_call_receive(mrcp_sofia_agent_t *sofia_agent,
|
||||
remote_sdp_str);
|
||||
|
||||
parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
|
||||
sdp = sdp_session(parser);
|
||||
descriptor = mrcp_descriptor_generate_by_sdp_session(sdp,NULL,sofia_session->session->pool);
|
||||
sdp = sdp_session(parser);
|
||||
status = mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,NULL,sofia_session->session->pool);
|
||||
sdp_parser_free(parser);
|
||||
}
|
||||
|
||||
if(!descriptor) {
|
||||
if(status == FALSE) {
|
||||
nua_respond(nh, SIP_400_BAD_REQUEST, TAG_END());
|
||||
return;
|
||||
}
|
||||
@@ -379,16 +400,16 @@ static void mrcp_sofia_on_state_change(mrcp_sofia_agent_t *sofia_agent,
|
||||
sip_t const *sip,
|
||||
tagi_t tags[])
|
||||
{
|
||||
int ss_state = nua_callstate_init;
|
||||
int nua_state = nua_callstate_init;
|
||||
tl_gets(tags,
|
||||
NUTAG_CALLSTATE_REF(ss_state),
|
||||
NUTAG_CALLSTATE_REF(nua_state),
|
||||
TAG_END());
|
||||
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"SIP Call State %s [%s]",
|
||||
sofia_session ? sofia_session->session->name : "",
|
||||
nua_callstate_name(ss_state));
|
||||
nua_callstate_name(nua_state));
|
||||
|
||||
switch(ss_state) {
|
||||
switch(nua_state) {
|
||||
case nua_callstate_received:
|
||||
mrcp_sofia_on_call_receive(sofia_agent,nh,sofia_session,sip,tags);
|
||||
break;
|
||||
@@ -405,7 +426,7 @@ static void mrcp_sofia_on_resource_discover(mrcp_sofia_agent_t *sofia_agent,
|
||||
tagi_t tags[])
|
||||
{
|
||||
char sdp_str[2048];
|
||||
char *local_sdp_str = NULL;
|
||||
const char *local_sdp_str = NULL;
|
||||
|
||||
const char *ip = sofia_agent->config->ext_ip ?
|
||||
sofia_agent->config->ext_ip : sofia_agent->config->local_ip;
|
||||
@@ -418,7 +439,7 @@ static void mrcp_sofia_on_resource_discover(mrcp_sofia_agent_t *sofia_agent,
|
||||
|
||||
nua_respond(nh, SIP_200_OK,
|
||||
NUTAG_WITH_CURRENT(sofia_agent->nua),
|
||||
SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
|
||||
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
|
||||
TAG_IF(local_sdp_str,SOATAG_USER_SDP_STR(local_sdp_str)),
|
||||
SOATAG_AUDIO_AUX("telephone-event"),
|
||||
TAG_END());
|
||||
@@ -435,7 +456,11 @@ static void mrcp_sofia_event_callback( nua_event_t nua_event,
|
||||
sip_t const *sip,
|
||||
tagi_t tags[])
|
||||
{
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s",nua_event_name(nua_event),status,phrase);
|
||||
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s [%s]",
|
||||
nua_event_name(nua_event),
|
||||
status,
|
||||
phrase,
|
||||
sofia_agent->sig_agent->id);
|
||||
|
||||
switch(nua_event) {
|
||||
case nua_i_state:
|
||||
|
||||
Reference in new issue
Block a user