FS-11555: [mod_signalwire] Initial commit.

v1.8
Andrey Volk 4 years ago committed by Andrey Volk
parent c27206e36d
commit d0cca7e222
  1. 15
      Freeswitch.2017.sln
  2. 1
      build/modules.conf.in
  3. 1
      build/modules.conf.most
  4. 1
      conf/insideout/autoload_configs/modules.conf.xml
  5. 1
      conf/minimal/autoload_configs/modules.conf.xml
  6. 1
      conf/rayo/autoload_configs/modules.conf.xml
  7. 1
      conf/sbc/autoload_configs/modules.conf.xml
  8. 1
      conf/softphone/freeswitch.xml
  9. 1
      conf/vanilla/autoload_configs/modules.conf.xml
  10. 9
      configure.ac
  11. 5
      debian/control-modules
  12. 18
      freeswitch.spec
  13. 5
      libs/.gitignore
  14. 27
      src/mod/applications/mod_signalwire/Makefile.am
  15. 10
      src/mod/applications/mod_signalwire/conf/autoload_configs/signalwire.conf.xml
  16. 149
      src/mod/applications/mod_signalwire/mod_signalwire.2017.vcxproj
  17. 1308
      src/mod/applications/mod_signalwire/mod_signalwire.c
  18. 8
      w32/Setup/Setup.2017.wixproj
  19. 19
      w32/libks-version.props
  20. 78
      w32/libks.props
  21. 19
      w32/signalwire-client-c-version.props
  22. 76
      w32/signalwire-client-c.props

@ -576,6 +576,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "48khz", "libs\win32\Sound_F
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "48khz music", "libs\win32\Sound_Files\48khzmusic.2017.vcxproj", "{EBD0B6B4-C5CA-46B0-BBC7-DBA71DF05D31}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_signalwire", "src\mod\applications\mod_signalwire\mod_signalwire.2017.vcxproj", "{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -2627,6 +2629,18 @@ Global
{EBD0B6B4-C5CA-46B0-BBC7-DBA71DF05D31}.Debug|x64.Build.0 = Debug|x64
{EBD0B6B4-C5CA-46B0-BBC7-DBA71DF05D31}.Release|Win32.ActiveCfg = Release|Win32
{EBD0B6B4-C5CA-46B0-BBC7-DBA71DF05D31}.Release|x64.ActiveCfg = Release|x64
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.All|Win32.ActiveCfg = Release|Win32
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.All|Win32.Build.0 = Release|Win32
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.All|x64.ActiveCfg = Release|x64
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.All|x64.Build.0 = Release|x64
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Debug|Win32.ActiveCfg = Debug|Win32
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Debug|Win32.Build.0 = Debug|Win32
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Debug|x64.ActiveCfg = Debug|x64
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Debug|x64.Build.0 = Debug|x64
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|Win32.ActiveCfg = Release|Win32
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|Win32.Build.0 = Release|Win32
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|x64.ActiveCfg = Release|x64
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2836,6 +2850,7 @@ Global
{EF62B845-A0CE-44FD-B8E6-475FE87D06C3} = {9388C266-C3FC-468A-92EF-0CBC35941412}
{8154C82D-58EE-4145-9DEC-A445A5AA3D6B} = {4F227C26-768F-46A3-8684-1D08A46FB374}
{EBD0B6B4-C5CA-46B0-BBC7-DBA71DF05D31} = {4F227C26-768F-46A3-8684-1D08A46FB374}
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {09840DE7-9208-45AA-9667-1A71EE93BD1E}

@ -39,6 +39,7 @@ applications/mod_httapi
#applications/mod_rad_auth
#applications/mod_redis
#applications/mod_rss
applications/mod_signalwire
applications/mod_sms
#applications/mod_sms_flowroute
#applications/mod_snapshot

@ -38,6 +38,7 @@ applications/mod_prefix
#applications/mod_rad_auth
applications/mod_redis
applications/mod_rss
applications/mod_signalwire
applications/mod_sms
applications/mod_snapshot
applications/mod_snom

@ -37,6 +37,7 @@
<!-- <load module="mod_freetdm"/> -->
<!-- Applications -->
<!--load module="mod_signalwire"/-->
<load module="mod_commands"/>
<load module="mod_conference"/>
<load module="mod_dptools"/>

@ -17,6 +17,7 @@
<load module="mod_loopback"/>
<!-- Applications -->
<!--load module="mod_signalwire"/-->
<load module="mod_commands"/>
<load module="mod_conference"/>
<load module="mod_db"/>

@ -14,6 +14,7 @@
<load module="mod_loopback"/>
<!-- Applications -->
<!--load module="mod_signalwire"-->
<load module="mod_commands"/>
<load module="mod_conference"/>
<load module="mod_dptools"/>

@ -26,6 +26,7 @@
<!-- <load module="mod_woomera"/> -->
<!-- Applications -->
<!--load module="mod_signalwire"/-->
<load module="mod_commands"/>
<load module="mod_dptools"/>
<load module="mod_expr"/>

@ -89,6 +89,7 @@
<load module="mod_sndfile"/>
<load module="mod_tone_stream"/>
<load module="mod_local_stream"/>
<!--load module="mod_signalwire"/-->
</modules>
</configuration>

@ -50,6 +50,7 @@
<load module="mod_verto"/>
<!-- Applications -->
<load module="mod_signalwire"/>
<load module="mod_commands"/>
<load module="mod_conference"/>
<!-- <load module="mod_curl"/> -->

@ -1498,6 +1498,14 @@ PKG_CHECK_MODULES([V8FS_STATIC], [v8-6.1_static >= 6.1.298],[
])
])
PKG_CHECK_MODULES([KS], [libks >= 1.1.0],[
AM_CONDITIONAL([HAVE_KS],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_KS],[false])])
PKG_CHECK_MODULES([SIGNALWIRE_CLIENT], [signalwire_client >= 1.0.0],[
AM_CONDITIONAL([HAVE_SIGNALWIRE_CLIENT],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_SIGNALWIRE_CLIENT],[false])])
PKG_CHECK_MODULES([AMQP], [librabbitmq >= 0.5.2],[
AM_CONDITIONAL([HAVE_AMQP],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_AMQP],[false])])
@ -1853,6 +1861,7 @@ AC_CONFIG_FILES([Makefile
src/mod/applications/mod_redis/Makefile
src/mod/applications/mod_rss/Makefile
src/mod/applications/mod_skel/Makefile
src/mod/applications/mod_signalwire/Makefile
src/mod/applications/mod_sms/Makefile
src/mod/applications/mod_sms_flowroute/Makefile
src/mod/applications/mod_snapshot/Makefile

@ -206,6 +206,11 @@ Module: applications/mod_skel
Description: Adds mod_skel
Adds mod_skel.
Module: applications/mod_signalwire
Description: mod_signalwire
Adds mod_signalwire.
Build-Depends: libks, signalwire-client-c
Module: applications/mod_sms
Description: Astract SMS
This module provides an abstract facility for interfacing with SMS

@ -3,7 +3,7 @@
# spec file for package freeswitch
#
# includes module(s): freeswitch-devel freeswitch-codec-passthru-amr freeswitch-codec-passthru-amrwb freeswitch-codec-passthru-g729
# freeswitch-codec-passthru-g7231 freeswitch-lua freeswitch-perl freeswitch-python freeswitch-v8
# freeswitch-codec-passthru-g7231 freeswitch-lua freeswitch-perl freeswitch-python freeswitch-v8 freeswitch-signalwire
# freeswitch-lan-de freeswitch-lang-en freeswitch-lang-fr freeswitch-lang-hu freeswitch-lang-ru freeswitch-freetdm
# and others
#
@ -536,6 +536,14 @@ Requires: %{name} = %{version}-%{release}
Provides FreeSWITCH mod_rss, edisrse and read an XML based RSS feed, then read
the entries aloud via a TTS engine
%package application-signalwire
Summary: FreeSWITCH mod_signalwire
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description application-signalwire
Provides FreeSWITCH mod_signalwire
%package application-sms
Summary: FreeSWITCH mod_sms
Group: System/Libraries
@ -1373,6 +1381,7 @@ Requires: freeswitch-application-memcache
Requires: freeswitch-application-nibblebill
Requires: freeswitch-application-redis
Requires: freeswitch-application-rss
Requires: freeswitch-application-signalwire
Requires: freeswitch-application-sms
Requires: freeswitch-application-snapshot
Requires: freeswitch-application-snom
@ -1458,7 +1467,7 @@ APPLICATION_MODULES_FR="applications/mod_fifo applications/mod_fsk applications/
applications/mod_memcache applications/mod_mongo applications/mod_nibblebill applications/mod_rad_auth \
applications/mod_redis applications/mod_rss "
APPLICATION_MODULES_SZ="applications/mod_sms applications/mod_snapshot applications/mod_snom applications/mod_soundtouch \
APPLICATION_MODULES_SZ="applications/mod_signalwire applications/mod_sms applications/mod_snapshot applications/mod_snom applications/mod_soundtouch \
applications/mod_spandsp applications/mod_spy applications/mod_stress \
applications/mod_valet_parking applications/mod_translate applications/mod_voicemail \
applications/mod_voicemail_ivr applications/mod_video_filter"
@ -2115,6 +2124,9 @@ fi
%files application-rss
%{MODINSTDIR}/mod_rss.so*
%files application-signalwire
%{MODINSTDIR}/mod_signalwire.so*
%files application-sms
%{MODINSTDIR}/mod_sms.so*
@ -2541,6 +2553,8 @@ fi
#
######################################################################################################################
%changelog
* Tue Dec 11 2018 - Andrey Volk
- add mod_signalwire
* Sun Mar 13 2016 - Matthew Vale
- add perl and python ESL language module packages
* Thu Jul 09 2015 - Artur Zaprzała

5
libs/.gitignore vendored

@ -858,3 +858,8 @@ libsndfile-*/
libsndfile-*
opencv-*/
opencv-*
libks-*/
libks*
signalwire-client-c-*/
signalwire-client-c-*

@ -0,0 +1,27 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_signalwire
if HAVE_KS
if HAVE_SIGNALWIRE_CLIENT
mod_LTLIBRARIES = mod_signalwire.la
mod_signalwire_la_SOURCES = mod_signalwire.c
mod_signalwire_la_CFLAGS = $(AM_CFLAGS)
mod_signalwire_la_CFLAGS += $(KS_CFLAGS) $(SIGNALWIRE_CLIENT_CFLAGS)
mod_signalwire_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_signalwire_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(KS_LIBS) $(SIGNALWIRE_CLIENT_LIBS)
else
install: error
all: error
error:
$(error You must install signalwire-client-c to build mod_signalwire)
endif
else
install: error
all: error
error:
$(error You must install libks to build mod_signalwire)
endif

@ -0,0 +1,10 @@
<configuration name="signalwire.conf" description="SignalWire">
<settings>
<!-- on/off/file-path -->
<!--param name="kslog" value="on"/-->
<!--param name="blade-bootstrap" value="blade://switchblade:2100"/-->
<!--param name="adoption-service" value="https://adopt.signalwire.com/adoption"/-->
<!--param name="stun-server" value="stun.freeswitch.org"/-->
<!-- <authentication></authentication> -->
</settings>
</configuration>

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.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>mod_signalwire</ProjectName>
<RootNamespace>mod_signalwire</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(SolutionDir)\w32\libks.props" Condition=" '$(libksPropsImported)' == '' " />
<Import Project="$(SolutionDir)\w32\signalwire-client-c.props" Condition=" '$(signalwire-client-cPropsImported)' == '' " />
<Import Project="$(SolutionDir)\w32\openssl.props" Condition=" '$(OpensslPropsImported)' == '' " />
<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="..\..\..\..\w32\module_release.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="..\..\..\..\w32\module_debug.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="..\..\..\..\w32\module_release.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="..\..\..\..\w32\module_debug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="mod_signalwire.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2017.vcxproj">
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

File diff suppressed because it is too large Load Diff

@ -293,6 +293,14 @@
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\..\src\mod\applications\mod_signalwire\mod_signalwire.2017.vcxproj">
<Name>mod_signalwire</Name>
<Project>{b19ae6fc-bfff-428d-b483-3bbeaeccc618}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\..\src\mod\applications\mod_sms\mod_sms.2017.vcxproj">
<Name>mod_sms</Name>
<Project>{2469b306-b027-4ff2-8815-c9c1ea2cae79}</Project>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="basedir.props" Condition=" '$(BaseDirImported)' == ''"/>
</ImportGroup>
<PropertyGroup Label="UserMacros">
<libksVersion>0.1.1</libksVersion>
</PropertyGroup>
<PropertyGroup>
<libksVersionImported>true</libksVersionImported>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="libksVersion">
<Value>$(libksVersion)</Value>
</BuildMacro>
</ItemGroup>
</Project>

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="libks-version.props" Condition=" '$(libksVersionImported)' == ''"/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>
<PropertyGroup>
<libksPropsImported>true</libksPropsImported>
</PropertyGroup>
<PropertyGroup Label="UserMacros">
<libksDir>$(BaseDir)libs\libks-$(libksVersion)</libksDir>
</PropertyGroup>
<!--
Download Target.
Name must be unique.
By design, targets are executed only once per project.
Usage:
package: URI
expectfileordirectory: Skips the download and extraction if exists
outputfolder: Folder to store a downloaded file.
By default "$(BaseDir)libs", if empty
outputfilename: If not empty, overrides filename from URI.
.exe files don't get extracted
extractto: Folder to extract an archive to
-->
<Target Name="libksBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/libks/$(libksVersion)/libks-$(libksVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
expectfileordirectory="$(libksDir)\binaries\$(Platform)\$(Configuration)\ks.dll"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="libksHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/libks/$(libksVersion)/libks-$(libksVersion)-headers.zip"
expectfileordirectory="$(libksDir)\src\include\libks\ks.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="libkscopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="libksBinariesDownloadTarget">
<Message Text="Copying libks libraries to the freeswitch output folder." Importance="High" />
<ItemGroup>
<libksFiles Include="$(libksDir)\binaries\$(Platform)\$(Configuration)\*.dll"/>
</ItemGroup>
<Copy Condition="!exists('$(BaseDir)\$(Platform)\$(Configuration)\ks.dll')"
SourceFiles="@(libksFiles)"
DestinationFiles="@(libksFiles->'$(BaseDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)')"
/>
</Target>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(libksDir)\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__PRETTY_FUNCTION__=__FUNCSIG__;WIN32;_WINDOWS;SWCLT_VERSION_MAJOR=1;SWCLT_VERSION_MINOR=0;SWCLT_VERSION_REVISION=0;_WIN32_WINNT=0x0600;_WINSOCK_DEPRECATED_NO_WARNINGS=1;WIN32_LEAN_AND_MEAN=1;KS_PLAT_WIN=1;NOMAXMIN=1;_CRT_SECURE_NO_WARNINGS=1;SWCLT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(libksDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>ks.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="basedir.props" Condition=" '$(BaseDirImported)' == ''"/>
</ImportGroup>
<PropertyGroup Label="UserMacros">
<signalwire-client-cVersion>1.0.0</signalwire-client-cVersion>
</PropertyGroup>
<PropertyGroup>
<signalwire-client-cVersionImported>true</signalwire-client-cVersionImported>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="signalwire-client-cVersion">
<Value>$(signalwire-client-cVersion)</Value>
</BuildMacro>
</ItemGroup>
</Project>

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="signalwire-client-c-version.props" Condition=" '$(signalwire-client-cVersionImported)' == ''"/>
</ImportGroup>
<PropertyGroup>
<signalwire-client-cPropsImported>true</signalwire-client-cPropsImported>
</PropertyGroup>
<PropertyGroup Label="UserMacros">
<signalwire-client-cDir>$(BaseDir)libs\signalwire-client-c-$(signalwire-client-cVersion)</signalwire-client-cDir>
</PropertyGroup>
<!--
Download Target.
Name must be unique.
By design, targets are executed only once per project.
Usage:
package: URI
expectfileordirectory: Skips the download and extraction if exists
outputfolder: Folder to store a downloaded file.
By default "$(BaseDir)libs", if empty
outputfilename: If not empty, overrides filename from URI.
.exe files don't get extracted
extractto: Folder to extract an archive to
-->
<Target Name="signalwire-client-cBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/signalwire-client-c/$(signalwire-client-cVersion)/signalwire-client-c-$(signalwire-client-cVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
expectfileordirectory="$(signalwire-client-cDir)\binaries\$(Platform)\$(Configuration)\signalwire_client.dll"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="signalwire-client-cHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/signalwire-client-c/$(signalwire-client-cVersion)/signalwire-client-c-$(signalwire-client-cVersion)-headers.zip"
expectfileordirectory="$(signalwire-client-cDir)\include\signalwire-client-c\client.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="signalwire-client-ccopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="signalwire-client-cBinariesDownloadTarget">
<Message Text="Copying signalwire-client-c libraries to the freeswitch output folder." Importance="High" />
<ItemGroup>
<signalwire-client-cFiles Include="$(signalwire-client-cDir)\binaries\$(Platform)\$(Configuration)\*.dll"/>
</ItemGroup>
<Copy Condition="!exists('$(BaseDir)\$(Platform)\$(Configuration)\signalwire_client.dll')"
SourceFiles="@(signalwire-client-cFiles)"
DestinationFiles="@(signalwire-client-cFiles->'$(BaseDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)')"
/>
</Target>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(signalwire-client-cDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(signalwire-client-cDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>signalwire_client.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>
Loading…
Cancel
Save