Merge remote branch 'fsorig/master'
This commit is contained in:
commit
f64b03bd8b
|
@ -1569,18 +1569,18 @@ Global
|
|||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.All|x64 Setup.ActiveCfg = Release DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.All|x64 Setup.Build.0 = Release DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.All|x86 Setup.ActiveCfg = Release DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.Build.0 = Debug|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64 Setup.ActiveCfg = Debug|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x86 Setup.ActiveCfg = Debug|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64 Setup.ActiveCfg = Release|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x86 Setup.ActiveCfg = Release|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.Build.0 = Debug DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64 Setup.ActiveCfg = Debug DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x86 Setup.ActiveCfg = Debug DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64 Setup.ActiveCfg = Release DirectSound|x64
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x86 Setup.ActiveCfg = Release DirectSound|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.All|Win32.ActiveCfg = Release|x64
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.All|x64.ActiveCfg = Release|x64
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.All|x64.Build.0 = Release|x64
|
||||
|
|
|
@ -48,6 +48,7 @@ codecs/mod_ilbc
|
|||
codecs/mod_speex
|
||||
codecs/mod_siren
|
||||
#codecs/mod_celt
|
||||
#codecs/mod_opus
|
||||
#codecs/mod_sangoma_codec
|
||||
#codecs/mod_dahdi_codec
|
||||
#dialplans/mod_dialplan_directory
|
||||
|
|
|
@ -1,21 +1,40 @@
|
|||
<configuration name="cdr_pg_csv.conf" description="CDR PG CSV Format">
|
||||
<settings>
|
||||
<!-- Log a-leg (a), b-leg (b) or both (ab) -->
|
||||
<param name="legs" value="a"/>
|
||||
<!-- See parameters for PQconnectdb() at http://www.postgresql.org/docs/8.4/static/libpq-connect.html -->
|
||||
<param name="db-info" value="host=localhost dbname=cdr connect_timeout=10" />
|
||||
<!-- CDR table name -->
|
||||
<!--<param name="db-table" value="cdr"/>-->
|
||||
<param name="default-template" value="example"/>
|
||||
<!-- 'cdr-pg-csv' will always be appended to log-base -->
|
||||
<!--<param name="log-base" value="/var/log"/>-->
|
||||
|
||||
<!-- Log a-leg (a), b-leg (b) or both (ab) -->
|
||||
<param name="legs" value="a"/>
|
||||
|
||||
<!-- Directory in which to spool failed SQL inserts -->
|
||||
<!-- <param name="spool-dir" value="$${base_dir}/log/cdr-pg-csv"/> -->
|
||||
<!-- Disk spool format if DB connection/insert fails - csv (default) or sql -->
|
||||
<param name="spool-format" value="csv"/>
|
||||
<param name="rotate-on-hup" value="true"/>
|
||||
|
||||
<!-- This is like the info app but after the call is hung up -->
|
||||
<!--<param name="debug" value="true"/>-->
|
||||
</settings>
|
||||
<templates>
|
||||
<template name="example">"${local_ip_v4}","${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${write_codec}","${sip_hangup_disposition}","${ani}"</template>
|
||||
</templates>
|
||||
<schema>
|
||||
<field var="local_ip_v4"/>
|
||||
<field var="caller_id_name"/>
|
||||
<field var="caller_id_number"/>
|
||||
<field var="destination_number"/>
|
||||
<field var="context"/>
|
||||
<field var="start_stamp"/>
|
||||
<field var="answer_stamp"/>
|
||||
<field var="end_stamp"/>
|
||||
<field var="duration" quote="false"/>
|
||||
<field var="billsec" quote="false"/>
|
||||
<field var="hangup_cause"/>
|
||||
<field var="uuid"/>
|
||||
<field var="bleg_uuid"/>
|
||||
<field var="accountcode"/>
|
||||
<field var="read_codec"/>
|
||||
<field var="write_codec"/>
|
||||
<!-- <field var="sip_hangup_disposition"/> -->
|
||||
<!-- <field var="ani"/> -->
|
||||
</schema>
|
||||
</configuration>
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<load module="mod_h26x"/>
|
||||
<load module="mod_siren"/>
|
||||
<!--<load module="mod_celt"/>-->
|
||||
<!--<load module="mod_opus"/>-->
|
||||
|
||||
<!-- File Format Interfaces -->
|
||||
<load module="mod_sndfile"/>
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
<settings>
|
||||
<!--Colorize the Console -->
|
||||
<param name="colorize-console" value="true"/>
|
||||
|
||||
<!-- minimum idle CPU before refusing calls -->
|
||||
<param name="min-idle-cpu" value="25"/>
|
||||
|
||||
<!--
|
||||
Max number of sessions to allow at any given time.
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <signal.h>
|
||||
|
||||
#define CMD_BUFLEN 1024
|
||||
static int WARN_STOP = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
#define strdup(src) _strdup(src)
|
||||
|
@ -535,6 +536,13 @@ static BOOL console_readConsole(HANDLE conIn, char* buf, int len, int* pRed, int
|
|||
static void handle_SIGINT(int sig)
|
||||
{
|
||||
if (sig);
|
||||
|
||||
WARN_STOP = 1;
|
||||
|
||||
signal(SIGINT, handle_SIGINT);
|
||||
#ifdef SIGTSTP
|
||||
signal(SIGTSTP, handle_SIGINT);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -581,16 +589,36 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
|
|||
|
||||
while(thread_running && handle->connected) {
|
||||
esl_status_t status = esl_recv_event_timed(handle, 10, 1, NULL);
|
||||
int aok = 1;
|
||||
|
||||
if (status == ESL_FAIL) {
|
||||
esl_log(ESL_LOG_WARNING, "Disconnected.\n");
|
||||
if (aok) esl_log(ESL_LOG_WARNING, "Disconnected.\n");
|
||||
running = -1; thread_running = 0;
|
||||
} else if (status == ESL_SUCCESS) {
|
||||
#ifndef WIN32
|
||||
fd_set can_write;
|
||||
int fd;
|
||||
struct timeval to;
|
||||
|
||||
fd = fileno(stdout);
|
||||
memset(&to, 0, sizeof(to));
|
||||
FD_ZERO(&can_write);
|
||||
FD_SET(fd, &can_write);
|
||||
to.tv_sec = 0;
|
||||
to.tv_usec = 100000;
|
||||
if (select(fd + 1, NULL, &can_write, NULL, &to) > 0) {
|
||||
aok = FD_ISSET(fd, &can_write);
|
||||
} else {
|
||||
aok = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (handle->last_event) {
|
||||
const char *type = esl_event_get_header(handle->last_event, "content-type");
|
||||
int known = 0;
|
||||
|
||||
if (!esl_strlen_zero(type)) {
|
||||
if (!strcasecmp(type, "log/data")) {
|
||||
if (aok && !strcasecmp(type, "log/data")) {
|
||||
const char *userdata = esl_event_get_header(handle->last_event, "user-data");
|
||||
|
||||
if (esl_strlen_zero(userdata) || esl_strlen_zero(filter_uuid) || !strcasecmp(filter_uuid, userdata)) {
|
||||
|
@ -617,7 +645,7 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
|
|||
} else if (!strcasecmp(type, "text/disconnect-notice")) {
|
||||
running = -1; thread_running = 0;
|
||||
known++;
|
||||
} else if (!strcasecmp(type, "text/event-plain")) {
|
||||
} else if (aok && !strcasecmp(type, "text/event-plain")) {
|
||||
char *foo;
|
||||
esl_event_serialize(handle->last_ievent, &foo, ESL_FALSE);
|
||||
printf("RECV EVENT\n%s\n", foo);
|
||||
|
@ -627,7 +655,7 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
|
|||
}
|
||||
}
|
||||
|
||||
if (!known) {
|
||||
if (aok && !known) {
|
||||
char *foo;
|
||||
printf("INCOMING DATA [%s]\n%s\n", type, handle->last_event->body ? handle->last_event->body : "");
|
||||
esl_event_serialize(handle->last_event, &foo, ESL_FALSE);
|
||||
|
@ -637,6 +665,11 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
|
|||
}
|
||||
}
|
||||
|
||||
if (WARN_STOP) {
|
||||
if (aok) printf("Type control-D or /exit or /quit or /bye to exit.\n\n");
|
||||
WARN_STOP = 0;
|
||||
}
|
||||
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
|
@ -1023,6 +1056,9 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
signal(SIGINT, handle_SIGINT);
|
||||
#ifdef SIGTSTP
|
||||
signal(SIGTSTP, handle_SIGINT);
|
||||
#endif
|
||||
#ifdef SIGQUIT
|
||||
signal(SIGQUIT, handle_SIGQUIT);
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,9 @@
|
|||
{
|
||||
fld dbl
|
||||
frndint
|
||||
fstp dbl
|
||||
}
|
||||
return (long int) dbl;
|
||||
}
|
||||
#elif defined (_WIN64)
|
||||
#include <intrin.h>
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
@ -57,11 +57,11 @@
|
|||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
|
@ -77,9 +77,11 @@
|
|||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\extlib.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" />
|
||||
|
@ -92,10 +94,12 @@
|
|||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
<Import Project="..\..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
<Import Project="..\..\..\..\w32\extlib.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" />
|
||||
|
@ -110,18 +114,6 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
|
@ -231,45 +223,23 @@
|
|||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PAWIN_USE_WDMKS_DEVICE_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_WMME;PAWIN_USE_WDMKS_DEVICE_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio_x86.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(Platform)\$(Configuration)\portaudio_x86.pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(Platform)\$(Configuration)\portaudio_x86.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">
|
||||
|
@ -278,45 +248,23 @@
|
|||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_WMME;PAWIN_USE_WDMKS_DEVICE_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio_x64.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(Platform)\$(Configuration)/portaudio_x64.pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(Platform)\$(Configuration)\portaudio_x64.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(Platform)\$(Configuration)/portaudio_x64.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">
|
||||
|
@ -325,22 +273,15 @@
|
|||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_WMME;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
|
@ -348,20 +289,8 @@
|
|||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio_x86.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
||||
<ProgramDatabaseFile>$(Platform)\$(Configuration)\portaudio_x86.pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(Platform)\$(Configuration)\portaudio_x86.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">
|
||||
|
@ -370,22 +299,15 @@
|
|||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_WMME;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
|
@ -393,20 +315,8 @@
|
|||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio_x64.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
||||
<ProgramDatabaseFile>$(Platform)\$(Configuration)/portaudio_x64.pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(Platform)\$(Configuration)/portaudio_x64.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(Platform)\$(Configuration)\portaudio_x64.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@ -594,6 +504,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -605,6 +516,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -618,6 +530,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -629,6 +542,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -642,6 +556,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -653,6 +568,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -666,6 +582,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -677,6 +594,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -690,6 +608,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -701,6 +620,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -714,6 +634,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -725,6 +646,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -738,6 +660,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -749,6 +672,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -762,6 +686,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -773,6 +698,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">true</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DirectSound|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
|
|
@ -4439,19 +4439,23 @@ SWITCH_STANDARD_API(strftime_tz_api_function)
|
|||
|
||||
if ((format = strchr(mycmd, ' '))) {
|
||||
*format++ = '\0';
|
||||
}
|
||||
|
||||
if ((p = strchr(format, '|'))) {
|
||||
*p++ = '\0';
|
||||
when = atol(format);
|
||||
format = p;
|
||||
if (format && (p = strchr(format, '|'))) {
|
||||
*p++ = '\0';
|
||||
when = atol(format);
|
||||
format = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_strftime_tz(tz_name, format, date, sizeof(date), when * 1000000) == SWITCH_STATUS_SUCCESS) { /* The lookup of the zone may fail. */
|
||||
if (zstr(format)) {
|
||||
format = "%Y-%m-%d";
|
||||
}
|
||||
|
||||
if (format && switch_strftime_tz(tz_name, format, date, sizeof(date), when * 1000000) == SWITCH_STATUS_SUCCESS) { /* The lookup of the zone may fail. */
|
||||
stream->write_function(stream, "%s", date);
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR Invalid Timezone\n");
|
||||
stream->write_function(stream, "-ERR Invalid Timezone/Format\n");
|
||||
}
|
||||
|
||||
switch_safe_free(mycmd);
|
||||
|
|
|
@ -2774,7 +2774,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
|
|||
switch_originate_flag_t myflags = SOF_NONE;
|
||||
char *cid_name_override = NULL;
|
||||
char *cid_num_override = NULL;
|
||||
char *domain = NULL;
|
||||
char *domain = NULL, *dup_domain = NULL;
|
||||
switch_channel_t *new_channel = NULL;
|
||||
unsigned int timelimit = 60;
|
||||
const char *skip, *var;
|
||||
|
@ -2788,6 +2788,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
|
|||
*domain++ = '\0';
|
||||
} else {
|
||||
domain = switch_core_get_variable_pdup("domain", switch_core_session_get_pool(session));
|
||||
dup_domain = domain;
|
||||
}
|
||||
|
||||
if (!domain) {
|
||||
|
@ -2859,6 +2860,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
|
|||
|
||||
switch_safe_free(template);
|
||||
switch_safe_free(group);
|
||||
switch_safe_free(dup_domain);
|
||||
|
||||
if (cause == SWITCH_CAUSE_NONE) {
|
||||
cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||
|
@ -2887,7 +2889,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
|
|||
switch_call_cause_t *cancel_cause)
|
||||
{
|
||||
switch_xml_t x_domain = NULL, xml = NULL, x_user = NULL, x_group = NULL, x_param, x_params;
|
||||
char *user = NULL, *domain = NULL;
|
||||
char *user = NULL, *domain = NULL, *dup_domain = NULL;
|
||||
const char *dest = NULL;
|
||||
static switch_call_cause_t cause = SWITCH_CAUSE_NONE;
|
||||
unsigned int timelimit = 60;
|
||||
|
@ -2908,7 +2910,8 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
|
|||
if ((domain = strchr(user, '@'))) {
|
||||
*domain++ = '\0';
|
||||
} else {
|
||||
domain = switch_core_get_variable_pdup("domain", switch_core_session_get_pool(session));
|
||||
domain = switch_core_get_variable_dup("domain");
|
||||
dup_domain = domain;
|
||||
}
|
||||
|
||||
if (!domain) {
|
||||
|
@ -3115,6 +3118,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
|
|||
}
|
||||
|
||||
switch_safe_free(user);
|
||||
switch_safe_free(dup_domain);
|
||||
|
||||
return cause;
|
||||
}
|
||||
|
|
|
@ -220,6 +220,7 @@ static switch_bool_t fsk_detect_callback(switch_media_bug_t *bug, void *user_dat
|
|||
char *sp;
|
||||
switch_event_t *event;
|
||||
const char *app_var;
|
||||
int total = 0;
|
||||
|
||||
switch_event_create_plain(&event, SWITCH_EVENT_CHANNEL_DATA);
|
||||
|
||||
|
@ -255,6 +256,7 @@ static switch_bool_t fsk_detect_callback(switch_media_bug_t *bug, void *user_dat
|
|||
}
|
||||
|
||||
if (varname && val) {
|
||||
total++;
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pvt->session), SWITCH_LOG_DEBUG, "%s setting FSK var [%s][%s]\n",
|
||||
switch_channel_get_name(channel), varname, val);
|
||||
switch_channel_set_variable(channel, varname, val);
|
||||
|
@ -270,7 +272,7 @@ static switch_bool_t fsk_detect_callback(switch_media_bug_t *bug, void *user_dat
|
|||
}
|
||||
}
|
||||
|
||||
if ((app_var = switch_channel_get_variable(channel, "execute_on_fsk"))) {
|
||||
if (total && (app_var = switch_channel_get_variable(channel, "execute_on_fsk"))) {
|
||||
char *app_arg;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pvt->session), SWITCH_LOG_DEBUG, "%s processing execute_on_fsk [%s]\n",
|
||||
|
|
|
@ -1277,9 +1277,13 @@ static void message_count(vm_profile_t *profile, const char *id_in, const char *
|
|||
|
||||
myid = resolve_id(id_in, domain_name, "message-count");
|
||||
|
||||
switch_snprintf(sql, sizeof(sql),
|
||||
"select read_epoch=0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' group by read_epoch=0,read_flags;",
|
||||
myid, domain_name, myfolder);
|
||||
switch_snprintf(sql, sizeof(sql), "select 1, read_flags, count(read_epoch) from voicemail_msgs where "
|
||||
"username='%s' and domain='%s' and in_folder='%s' "
|
||||
"and read_epoch=0 group by read_flags union select 0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' "
|
||||
"and domain='%s' and in_folder='%s' and read_epoch<>0 group by read_flags;",
|
||||
myid, domain_name, myfolder, myid, domain_name, myfolder);
|
||||
|
||||
|
||||
|
||||
vm_execute_sql_callback(profile, profile->mutex, sql, message_count_callback, &cbt);
|
||||
|
||||
|
|
|
@ -260,6 +260,7 @@ static switch_status_t audio_queue_create(audio_queue_t ** queue, const char *na
|
|||
static switch_status_t audio_queue_write(audio_queue_t *queue, void *data, switch_size_t *data_len);
|
||||
static switch_status_t audio_queue_read(audio_queue_t *queue, void *data, switch_size_t *data_len, int block);
|
||||
static switch_status_t audio_queue_clear(audio_queue_t *queue);
|
||||
static switch_status_t audio_queue_signal(audio_queue_t *queue);
|
||||
static switch_status_t audio_queue_destroy(audio_queue_t *queue);
|
||||
|
||||
/*********************************************************************************************************************************************
|
||||
|
@ -287,6 +288,8 @@ enum speech_channel_state {
|
|||
SPEECH_CHANNEL_READY,
|
||||
/** processing speech request */
|
||||
SPEECH_CHANNEL_PROCESSING,
|
||||
/** finished processing speech request */
|
||||
SPEECH_CHANNEL_DONE,
|
||||
/** error opening channel */
|
||||
SPEECH_CHANNEL_ERROR
|
||||
};
|
||||
|
@ -667,10 +670,12 @@ static switch_status_t audio_queue_create(audio_queue_t ** audio_queue, const ch
|
|||
static switch_status_t audio_queue_write(audio_queue_t *queue, void *data, switch_size_t *data_len)
|
||||
{
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
|
||||
switch_size_t len = *data_len;
|
||||
#endif
|
||||
switch_mutex_lock(queue->mutex);
|
||||
|
||||
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
|
||||
switch_size_t len = *data_len;
|
||||
if (queue->file_write) {
|
||||
switch_file_write(queue->file_write, data, &len);
|
||||
}
|
||||
|
@ -708,6 +713,9 @@ static switch_status_t audio_queue_read(audio_queue_t *queue, void *data, switch
|
|||
{
|
||||
switch_size_t requested = *data_len;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
|
||||
switch_size_t len = *data_len;
|
||||
#endif
|
||||
switch_mutex_lock(queue->mutex);
|
||||
|
||||
/* wait for data, if allowed */
|
||||
|
@ -736,7 +744,6 @@ static switch_status_t audio_queue_read(audio_queue_t *queue, void *data, switch
|
|||
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) audio queue read total = %ld\tread = %ld\trequested = %ld\n", queue->name,
|
||||
queue->read_bytes, *data_len, requested);
|
||||
switch_size_t len = *data_len;
|
||||
if (queue->file_read) {
|
||||
switch_file_write(queue->file_read, data, &len);
|
||||
}
|
||||
|
@ -763,6 +770,20 @@ static switch_status_t audio_queue_clear(audio_queue_t *queue)
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wake any threads waiting on this queue
|
||||
*
|
||||
* @param queue the queue to empty
|
||||
* @return SWITCH_STATUS_SUCCESS
|
||||
*/
|
||||
static switch_status_t audio_queue_signal(audio_queue_t *queue)
|
||||
{
|
||||
switch_mutex_lock(queue->mutex);
|
||||
switch_thread_cond_signal(queue->cond);
|
||||
switch_mutex_unlock(queue->mutex);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the audio queue
|
||||
*
|
||||
|
@ -1341,6 +1362,8 @@ static switch_status_t speech_channel_stop(speech_channel_t *schannel)
|
|||
goto done;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s stopped\n", schannel->name, speech_channel_type_to_string(schannel->type));
|
||||
} else if (schannel->state == SPEECH_CHANNEL_DONE) {
|
||||
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
|
||||
}
|
||||
|
||||
done:
|
||||
|
@ -1438,9 +1461,19 @@ static switch_status_t speech_channel_read(speech_channel_t *schannel, void *dat
|
|||
}
|
||||
|
||||
switch_mutex_lock(schannel->mutex);
|
||||
if (schannel->state == SPEECH_CHANNEL_PROCESSING) {
|
||||
switch (schannel->state) {
|
||||
case SPEECH_CHANNEL_DONE:
|
||||
/* pull any remaining audio - never blocking */
|
||||
if (audio_queue_read(schannel->audio_queue, data, len, 0) == SWITCH_STATUS_FALSE) {
|
||||
/* all frames read */
|
||||
status = SWITCH_STATUS_BREAK;
|
||||
}
|
||||
break;
|
||||
case SPEECH_CHANNEL_PROCESSING:
|
||||
/* IN-PROGRESS */
|
||||
audio_queue_read(schannel->audio_queue, data, len, block);
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
status = SWITCH_STATUS_BREAK;
|
||||
}
|
||||
switch_mutex_unlock(schannel->mutex);
|
||||
|
@ -1463,6 +1496,8 @@ static const char *speech_channel_state_to_string(speech_channel_state_t state)
|
|||
return "READY";
|
||||
case SPEECH_CHANNEL_PROCESSING:
|
||||
return "PROCESSING";
|
||||
case SPEECH_CHANNEL_DONE:
|
||||
return "DONE";
|
||||
case SPEECH_CHANNEL_ERROR:
|
||||
return "ERROR";
|
||||
}
|
||||
|
@ -1498,7 +1533,7 @@ static switch_status_t speech_channel_set_state_unlocked(speech_channel_t *schan
|
|||
{
|
||||
if (schannel->state == SPEECH_CHANNEL_PROCESSING && state != SPEECH_CHANNEL_PROCESSING) {
|
||||
/* wake anyone waiting for audio data */
|
||||
audio_queue_clear(schannel->audio_queue);
|
||||
audio_queue_signal(schannel->audio_queue);
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s ==> %s\n", schannel->name, speech_channel_state_to_string(schannel->state),
|
||||
|
@ -1651,6 +1686,8 @@ static switch_status_t synth_speech_read_tts(switch_speech_handle_t *sh, void *d
|
|||
memset((uint8_t *) data + bytes_read, schannel->silence, *datalen - bytes_read);
|
||||
}
|
||||
} else {
|
||||
/* ready for next speak request */
|
||||
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
|
||||
*datalen = 0;
|
||||
status = SWITCH_STATUS_BREAK;
|
||||
}
|
||||
|
@ -1878,7 +1915,7 @@ static apt_bool_t synth_on_message_receive(mrcp_application_t *application, mrcp
|
|||
if (message->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE) {
|
||||
/* got COMPLETE */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) COMPLETE\n", schannel->name);
|
||||
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
|
||||
speech_channel_set_state(schannel, SPEECH_CHANNEL_DONE);
|
||||
} else {
|
||||
/* received unexpected request state */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected STOP response, request_state = %d\n", schannel->name,
|
||||
|
@ -1896,7 +1933,7 @@ static apt_bool_t synth_on_message_receive(mrcp_application_t *application, mrcp
|
|||
if (message->start_line.method_id == SYNTHESIZER_SPEAK_COMPLETE) {
|
||||
/* got SPEAK-COMPLETE */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) SPEAK-COMPLETE\n", schannel->name);
|
||||
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
|
||||
speech_channel_set_state(schannel, SPEECH_CHANNEL_DONE);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected event, method_id = %d\n", schannel->name,
|
||||
(int) message->start_line.method_id);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
BASE=../../../..
|
||||
|
||||
OPUS=opus-0.9.0
|
||||
|
||||
OPUS_DIR=$(switch_srcdir)/libs/$(OPUS)
|
||||
OPUS_BUILDDIR=$(switch_builddir)/libs/$(OPUS)
|
||||
LOCAL_CFLAGS=-I$(OPUS_DIR)/src -g -O2
|
||||
|
||||
IETF_LA=$(OPUS_BUILDDIR)/src/.libs/libietfcodec.a
|
||||
CELT_LA=$(OPUS_BUILDDIR)/celt/libcelt/.libs/libcelt0.a
|
||||
SILK_LA=$(OPUS_BUILDDIR)/silk/.libs/libSKP_SILK_SDK.a
|
||||
|
||||
LOCAL_LIBADD=$(IETF_LA) $(CELT_LA) $(SILK_LA) -lm -lz
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
$(OPUS_DIR):
|
||||
$(GETLIB) $(OPUS).tar.gz
|
||||
|
||||
$(OPUS_BUILDDIR)/Makefile: $(OPUS_DIR)
|
||||
mkdir -p $(OPUS_BUILDDIR)
|
||||
cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure --disable-shared --with-pic --srcdir=$(OPUS_DIR)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(IETF_LA): $(OPUS_BUILDDIR)/Makefile
|
||||
cd $(OPUS_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (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.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Brian K. West <brian@freeswitch.org>
|
||||
*
|
||||
* mod_opus.c -- The OPUS ultra-low delay audio codec (http://www.opus-codec.org/)
|
||||
*
|
||||
*/
|
||||
|
||||
#include "switch.h"
|
||||
#include "opus.h"
|
||||
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_opus_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_opus, mod_opus_load, NULL, NULL);
|
||||
|
||||
struct opus_context {
|
||||
OpusEncoder *encoder_object;
|
||||
OpusDecoder *decoder_object;
|
||||
int frame_size;
|
||||
};
|
||||
|
||||
static switch_status_t switch_opus_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
|
||||
{
|
||||
struct opus_context *context = NULL;
|
||||
int encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
int decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
|
||||
if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(*context))))) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
context->frame_size = codec->implementation->samples_per_packet;
|
||||
|
||||
if (encoding) {
|
||||
/* come up with a way to specify these */
|
||||
int bitrate_bps = codec->implementation->bits_per_second;
|
||||
int mode = MODE_HYBRID;
|
||||
int use_vbr = 1;
|
||||
int complexity = 10;
|
||||
int use_inbandfec = 1;
|
||||
int use_dtx = 1;
|
||||
int bandwidth = BANDWIDTH_FULLBAND;
|
||||
|
||||
context->encoder_object = opus_encoder_create(codec->implementation->actual_samples_per_second, codec->implementation->number_of_channels);
|
||||
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_MODE(mode));
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_BITRATE(bitrate_bps));
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_BANDWIDTH(bandwidth));
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_VBR_FLAG(use_vbr));
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_COMPLEXITY(complexity));
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_INBAND_FEC_FLAG(use_inbandfec));
|
||||
opus_encoder_ctl(context->encoder_object, OPUS_SET_DTX_FLAG(use_dtx));
|
||||
|
||||
}
|
||||
|
||||
if (decoding) {
|
||||
context->decoder_object = opus_decoder_create(codec->implementation->actual_samples_per_second, codec->implementation->number_of_channels);
|
||||
}
|
||||
|
||||
codec->private_info = context;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t switch_opus_destroy(switch_codec_t *codec)
|
||||
{
|
||||
codec->private_info = NULL;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t switch_opus_encode(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t *encoded_data_len, uint32_t *encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct opus_context *context = codec->private_info;
|
||||
int bytes = 0;
|
||||
int len = (int) *encoded_data_len;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (len > 1275) len = 1275;
|
||||
|
||||
bytes = opus_encode(context->encoder_object, (void *) decoded_data, decoded_data_len / 2, (unsigned char *) encoded_data, len);
|
||||
|
||||
if (bytes > 0) {
|
||||
*encoded_data_len = (uint32_t) bytes;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Encoder Error!\n");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
static switch_status_t switch_opus_decode(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t *decoded_data_len, uint32_t *decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct opus_context *context = codec->private_info;
|
||||
int samples = 0;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
samples = opus_decode(context->decoder_object, encoded_data, encoded_data_len, decoded_data, *decoded_data_len);
|
||||
|
||||
if (samples < 0) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
*decoded_data_len = samples * 2;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_opus_load)
|
||||
{
|
||||
switch_codec_interface_t *codec_interface;
|
||||
int samples = 80;
|
||||
int bytes = 960;
|
||||
int mss = 10000;
|
||||
int x = 0;
|
||||
int rate = 48000;
|
||||
int bits = 32000;
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
|
||||
SWITCH_ADD_CODEC(codec_interface, "OPUS (BETA 0.9.0)");
|
||||
|
||||
for (x = 0; x < 2; x++) {
|
||||
switch_core_codec_add_implementation(pool, codec_interface, SWITCH_CODEC_TYPE_AUDIO, /* enumeration defining the type of the codec */
|
||||
115, /* the IANA code number */
|
||||
"Opus-0.9.0",/* the IANA code name */
|
||||
NULL, /* default fmtp to send (can be overridden by the init function) */
|
||||
rate, /* samples transferred per second */
|
||||
rate, /* actual samples transferred per second */
|
||||
bits, /* bits transferred per second */
|
||||
mss, /* number of microseconds per frame */
|
||||
samples, /* number of samples per frame */
|
||||
bytes, /* number of bytes per frame decompressed */
|
||||
0, /* number of bytes per frame compressed */
|
||||
1, /* number of channels represented */
|
||||
1, /* number of frames per network packet */
|
||||
switch_opus_init, /* function to initialize a codec handle using this implementation */
|
||||
switch_opus_encode, /* function to encode raw data into encoded data */
|
||||
switch_opus_decode, /* function to decode encoded data into raw data */
|
||||
switch_opus_destroy); /* deinitalize a codec handle using this implementation */
|
||||
|
||||
bytes *= 2;
|
||||
samples *= 2;
|
||||
mss *= 2;
|
||||
|
||||
}
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
|
||||
*/
|
|
@ -309,11 +309,13 @@ static switch_call_cause_t sip_outgoing_channel(switch_core_session_t *session,
|
|||
switch_call_cause_t *cancel_cause)
|
||||
{
|
||||
const char *profile;
|
||||
char *dup_profile = NULL;
|
||||
|
||||
if (session) {
|
||||
profile = switch_channel_get_variable(switch_core_session_get_channel(session), "sip_profile");
|
||||
} else {
|
||||
profile = switch_core_get_variable_pdup("sip_profile", switch_core_session_get_pool(session));
|
||||
dup_profile = switch_core_get_variable_dup("sip_profile");
|
||||
profile = dup_profile;
|
||||
}
|
||||
if (zstr(profile)) {
|
||||
profile = "default";
|
||||
|
@ -323,6 +325,8 @@ static switch_call_cause_t sip_outgoing_channel(switch_core_session_t *session,
|
|||
|
||||
UNPROTECT_INTERFACE(sip_endpoint_interface);
|
||||
|
||||
switch_safe_free(dup_profile);
|
||||
|
||||
return switch_core_session_outgoing_channel(session, var_event, "sofia", outbound_profile, new_session, pool, SOF_NONE, cancel_cause);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3708,7 +3708,7 @@ SWITCH_STANDARD_API(sofia_function)
|
|||
|
||||
if (argc > 2) {
|
||||
if (strstr(argv[2], "presence")) {
|
||||
mod_sofia_globals.debug_presence = 1;
|
||||
mod_sofia_globals.debug_presence = 10;
|
||||
stream->write_function(stream, "+OK Debugging presence\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -4480,7 +4480,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
|||
match = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
|
||||
}
|
||||
|
||||
if (match && bit_rate && map_bit_rate && map_bit_rate != bit_rate) {
|
||||
if (match && bit_rate && map_bit_rate && map_bit_rate != bit_rate && strcasecmp(map->rm_encoding, "ilbc")) {
|
||||
/* nevermind */
|
||||
match = 0;
|
||||
}
|
||||
|
|
|
@ -2576,7 +2576,7 @@ uint32_t sofia_presence_contact_count(sofia_profile_t *profile, const char *cont
|
|||
char buf[32] = "";
|
||||
char *sql;
|
||||
|
||||
sql = switch_mprintf("select count(*) from sip_subscriptions where profile_name='%q' and contact_str='%q'", profile->name, contact_str);
|
||||
sql = switch_mprintf("select count(*) from sip_subscriptions where profile_name='%q' and contact='%q'", profile->name, contact_str);
|
||||
|
||||
sofia_glue_execute_sql2str(profile, profile->ireg_mutex, sql, buf, sizeof(buf));
|
||||
switch_safe_free(sql);
|
||||
|
|
|
@ -37,45 +37,95 @@
|
|||
#include <switch.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_pg_csv_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_cdr_pg_csv_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_cdr_pg_csv, mod_cdr_pg_csv_load, mod_cdr_pg_csv_shutdown, NULL);
|
||||
|
||||
|
||||
typedef enum {
|
||||
CDR_LEG_A = (1 << 0),
|
||||
CDR_LEG_B = (1 << 1)
|
||||
} cdr_leg_t;
|
||||
|
||||
struct cdr_fd {
|
||||
typedef enum {
|
||||
SPOOL_FORMAT_CSV,
|
||||
SPOOL_FORMAT_SQL
|
||||
} spool_format_t;
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
char *path;
|
||||
int64_t bytes;
|
||||
switch_mutex_t *mutex;
|
||||
};
|
||||
typedef struct cdr_fd cdr_fd_t;
|
||||
} cdr_fd_t;
|
||||
|
||||
const char *default_template =
|
||||
"\"${local_ip_v4}\",\"${caller_id_name}\",\"${caller_id_number}\",\"${destination_number}\",\"${context}\",\"${start_stamp}\","
|
||||
"\"${answer_stamp}\",\"${end_stamp}\",\"${duration}\",\"${billsec}\",\"${hangup_cause}\",\"${uuid}\",\"${bleg_uuid}\",\"${accountcode}\","
|
||||
"\"${read_codec}\",\"${write_codec}\"";
|
||||
typedef struct {
|
||||
char *col_name;
|
||||
char *var_name;
|
||||
switch_bool_t quote;
|
||||
switch_bool_t not_null;
|
||||
} cdr_field_t;
|
||||
|
||||
typedef struct {
|
||||
char *columns;
|
||||
cdr_field_t fields[1];
|
||||
} db_schema_t;
|
||||
|
||||
static struct {
|
||||
switch_memory_pool_t *pool;
|
||||
switch_hash_t *fd_hash;
|
||||
switch_hash_t *template_hash;
|
||||
char *log_dir;
|
||||
char *default_template;
|
||||
int shutdown;
|
||||
int rotate;
|
||||
int debug;
|
||||
cdr_leg_t legs;
|
||||
char *db_info;
|
||||
char *db_table;
|
||||
char *spool_format;
|
||||
db_schema_t *db_schema;
|
||||
PGconn *db_connection;
|
||||
int db_online;
|
||||
switch_mutex_t *db_mutex;
|
||||
} globals = { 0 };
|
||||
int db_online;
|
||||
cdr_leg_t legs;
|
||||
char *spool_dir;
|
||||
spool_format_t spool_format;
|
||||
int rotate;
|
||||
int debug;
|
||||
} globals;
|
||||
|
||||
static switch_xml_config_enum_item_t config_opt_cdr_leg_enum[] = {
|
||||
{"a", CDR_LEG_A},
|
||||
{"b", CDR_LEG_B},
|
||||
{"ab", CDR_LEG_A | CDR_LEG_B},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
static switch_xml_config_enum_item_t config_opt_spool_format_enum[] = {
|
||||
{"csv", SPOOL_FORMAT_CSV},
|
||||
{"sql", SPOOL_FORMAT_SQL},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
static switch_status_t config_validate_spool_dir(switch_xml_config_item_t *item, const char *newvalue, switch_config_callback_type_t callback_type, switch_bool_t changed)
|
||||
{
|
||||
if ((callback_type == CONFIG_LOAD || callback_type == CONFIG_RELOAD)) {
|
||||
if (zstr(newvalue)) {
|
||||
globals.spool_dir = switch_core_sprintf(globals.pool, "%s%scdr-pg-csv", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR);
|
||||
}
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_xml_config_item_t config_settings[] = {
|
||||
/* key, type, flags, ptr, default_value, data, syntax, helptext */
|
||||
SWITCH_CONFIG_ITEM_STRING_STRDUP("db-info", CONFIG_RELOADABLE, &globals.db_info, "dbname=cdr", NULL, NULL),
|
||||
SWITCH_CONFIG_ITEM_STRING_STRDUP("db-table", CONFIG_RELOADABLE, &globals.db_table, "cdr", NULL, NULL),
|
||||
SWITCH_CONFIG_ITEM("legs", SWITCH_CONFIG_ENUM, CONFIG_RELOADABLE, &globals.legs, (void *) CDR_LEG_A, &config_opt_cdr_leg_enum, "a|b|ab", NULL),
|
||||
SWITCH_CONFIG_ITEM("spool-format", SWITCH_CONFIG_ENUM, CONFIG_RELOADABLE, &globals.spool_format, (void *) SPOOL_FORMAT_CSV, &config_opt_spool_format_enum, "csv|sql", "Disk spool format to use if SQL insert fails."),
|
||||
SWITCH_CONFIG_ITEM("rotate-on-hup", SWITCH_CONFIG_BOOL, CONFIG_RELOADABLE, &globals.rotate, SWITCH_FALSE, NULL, NULL, NULL),
|
||||
SWITCH_CONFIG_ITEM("debug", SWITCH_CONFIG_BOOL, CONFIG_RELOADABLE, &globals.debug, SWITCH_FALSE, NULL, NULL, NULL),
|
||||
|
||||
/* key, type, flags, ptr, defaultvalue, function, functiondata, syntax, helptext */
|
||||
SWITCH_CONFIG_ITEM_CALLBACK("spool-dir", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &globals.spool_dir, NULL, config_validate_spool_dir, NULL, NULL, NULL),
|
||||
SWITCH_CONFIG_ITEM_END()
|
||||
};
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_pg_csv_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_cdr_pg_csv_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_cdr_pg_csv, mod_cdr_pg_csv_load, mod_cdr_pg_csv_shutdown, NULL);
|
||||
|
||||
static off_t fd_size(int fd)
|
||||
{
|
||||
|
@ -194,135 +244,13 @@ static void spool_cdr(const char *path, const char *log_line)
|
|||
switch_safe_free(log_line_lf);
|
||||
}
|
||||
|
||||
static switch_status_t insert_cdr(const char * const template, const char * const cdr)
|
||||
static switch_status_t insert_cdr(const char *values)
|
||||
{
|
||||
char *columns, *values;
|
||||
char *p, *q;
|
||||
unsigned vlen;
|
||||
char *nullValues, *temp, *tp;
|
||||
int nullCounter = 0, charCounter = 0;
|
||||
char *sql = NULL, *path = NULL;
|
||||
PGresult *res;
|
||||
|
||||
if (!template || !*template || !cdr || !*cdr) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Bad parameter\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
/* Build comma-separated list of field names by dropping $ { } ; chars */
|
||||
switch_strdup(columns, template);
|
||||
for (p = columns, q = columns; *p; ++p) {
|
||||
switch (*p) {
|
||||
case '$': case '"': case '{': case '}': case ';':
|
||||
break;
|
||||
default:
|
||||
*q++ = *p;
|
||||
}
|
||||
}
|
||||
*q = '\0';
|
||||
|
||||
/*
|
||||
* In the expanded vars, replace double quotes (") with single quotes (')
|
||||
* for correct PostgreSQL syntax, and replace semi-colon with space to
|
||||
* prevent SQL injection attacks
|
||||
*/
|
||||
switch_strdup(values, cdr);
|
||||
for (p = values; *p; ++p) {
|
||||
switch(*p) {
|
||||
case '"':
|
||||
*p = '\'';
|
||||
break;
|
||||
case ';':
|
||||
*p = ' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
vlen = p - values;
|
||||
|
||||
/*
|
||||
* Patch for changing empty strings ('') in the expanded variables to
|
||||
* PostgreSQL null
|
||||
*/
|
||||
for (p = values; *p; ++p) {
|
||||
if (*p == ',') {
|
||||
if (charCounter == 0) {
|
||||
nullCounter++;
|
||||
}
|
||||
charCounter = 0;
|
||||
} else if (*p != ' ' && *p != '\'') {
|
||||
charCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
if (charCounter == 0) {
|
||||
nullCounter++;
|
||||
}
|
||||
|
||||
nullCounter *= 4;
|
||||
vlen += nullCounter;
|
||||
switch_zmalloc(nullValues, strlen(values) + nullCounter + 1);
|
||||
charCounter = 0;
|
||||
temp = nullValues;
|
||||
tp = nullValues;
|
||||
|
||||
for (p = values; *p; ++tp, ++p) {
|
||||
if (*p == ',') {
|
||||
if (charCounter == 0) {
|
||||
temp++;
|
||||
*temp = 'n';
|
||||
temp++;
|
||||
if (temp == tp) tp++;
|
||||
*temp = 'u';
|
||||
temp++;
|
||||
if (temp == tp) tp++;
|
||||
*temp = 'l';
|
||||
temp++;
|
||||
if (temp == tp) tp++;
|
||||
*temp = 'l';
|
||||
temp++;
|
||||
while (temp != tp) {
|
||||
*temp = ' ';
|
||||
temp++;
|
||||
}
|
||||
}
|
||||
charCounter = 0;
|
||||
temp = tp;
|
||||
} else if (*p != ' ' && *p != '\'') {
|
||||
charCounter++;
|
||||
}
|
||||
*tp = *p;
|
||||
}
|
||||
|
||||
if (charCounter == 0) {
|
||||
temp++;
|
||||
*temp = 'n';
|
||||
temp++;
|
||||
if (temp == tp) tp++;
|
||||
*temp = 'u';
|
||||
temp++;
|
||||
if (temp == tp) tp++;
|
||||
*temp = 'l';
|
||||
temp++;
|
||||
if (temp == tp) tp++;
|
||||
*temp = 'l';
|
||||
temp++;
|
||||
while (temp != tp) {
|
||||
*temp = ' ';
|
||||
temp++;
|
||||
}
|
||||
}
|
||||
|
||||
charCounter = 0;
|
||||
temp = tp;
|
||||
*tp = 0;
|
||||
tp = values;
|
||||
values = nullValues;
|
||||
switch_safe_free(tp);
|
||||
|
||||
sql = switch_mprintf("INSERT INTO %s (%s) VALUES (%s);", globals.db_table, columns, values);
|
||||
sql = switch_mprintf("INSERT INTO %s (%s) VALUES (%s);", globals.db_table, globals.db_schema->columns, values);
|
||||
assert(sql);
|
||||
switch_safe_free(columns);
|
||||
switch_safe_free(values);
|
||||
|
||||
if (globals.debug) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Query: \"%s\"\n", sql);
|
||||
|
@ -363,14 +291,14 @@ static switch_status_t insert_cdr(const char * const template, const char * cons
|
|||
switch_mutex_unlock(globals.db_mutex);
|
||||
|
||||
/* SQL INSERT failed for whatever reason. Spool the attempted query to disk */
|
||||
if (!strcasecmp(globals.spool_format, "sql")) {
|
||||
path = switch_mprintf("%s%scdr-spool.sql", globals.log_dir, SWITCH_PATH_SEPARATOR);
|
||||
if (globals.spool_format == SPOOL_FORMAT_SQL) {
|
||||
path = switch_mprintf("%s%scdr-spool.sql", globals.spool_dir, SWITCH_PATH_SEPARATOR);
|
||||
assert(path);
|
||||
spool_cdr(path, sql);
|
||||
} else {
|
||||
path = switch_mprintf("%s%scdr-spool.csv", globals.log_dir, SWITCH_PATH_SEPARATOR);
|
||||
path = switch_mprintf("%s%scdr-spool.csv", globals.spool_dir, SWITCH_PATH_SEPARATOR);
|
||||
assert(path);
|
||||
spool_cdr(path, cdr);
|
||||
spool_cdr(path, values);
|
||||
}
|
||||
|
||||
switch_safe_free(path);
|
||||
|
@ -383,8 +311,10 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
|||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
const char *template_str = NULL;
|
||||
char *expanded_vars = NULL;
|
||||
char *values = NULL, *tmp = NULL, *pq_var = NULL;
|
||||
const char *var = NULL;
|
||||
cdr_field_t *cdr_field = NULL;
|
||||
switch_size_t len, offset;
|
||||
|
||||
if (globals.shutdown) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -402,8 +332,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
|||
}
|
||||
}
|
||||
|
||||
if (switch_dir_make_recursive(globals.log_dir, SWITCH_DEFAULT_DIR_PERMS, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error creating %s\n", globals.log_dir);
|
||||
if (switch_dir_make_recursive(globals.spool_dir, SWITCH_DEFAULT_DIR_PERMS, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error creating %s\n", globals.spool_dir);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
@ -420,24 +350,40 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
|||
}
|
||||
}
|
||||
|
||||
template_str = (const char *) switch_core_hash_find(globals.template_hash, globals.default_template);
|
||||
switch_zmalloc(values, 1);
|
||||
offset = 0;
|
||||
|
||||
if (!template_str) {
|
||||
template_str = default_template;
|
||||
for (cdr_field = globals.db_schema->fields; cdr_field->var_name; cdr_field++) {
|
||||
if ((var = switch_channel_get_variable(channel, cdr_field->var_name))) {
|
||||
/* Allocate sufficient buffer for PQescapeString */
|
||||
len = strlen(var);
|
||||
tmp = switch_core_session_alloc(session, len * 2 + 1);
|
||||
PQescapeString(tmp, var, len);
|
||||
var = tmp;
|
||||
}
|
||||
|
||||
if (cdr_field->quote) {
|
||||
if ((cdr_field->not_null == SWITCH_FALSE) && zstr(var)) {
|
||||
pq_var = switch_mprintf("null,", var);
|
||||
} else {
|
||||
pq_var = switch_mprintf("'%s',", var);
|
||||
}
|
||||
} else {
|
||||
pq_var = switch_mprintf("%s,", var);
|
||||
}
|
||||
|
||||
/* Resize values buffer to accomodate next var */
|
||||
len = strlen(pq_var);
|
||||
tmp = realloc(values, offset + len);
|
||||
values = tmp;
|
||||
memcpy(values + offset, pq_var, len);
|
||||
switch_safe_free(pq_var);
|
||||
offset += len;
|
||||
}
|
||||
*(values + --offset) = '\0';
|
||||
|
||||
expanded_vars = switch_channel_expand_variables(channel, template_str);
|
||||
|
||||
if (!expanded_vars) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error expanding CDR variables.\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
insert_cdr(template_str, expanded_vars);
|
||||
|
||||
if (expanded_vars != template_str) {
|
||||
switch_safe_free(expanded_vars);
|
||||
}
|
||||
insert_cdr(values);
|
||||
switch_safe_free(values);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -485,12 +431,15 @@ static switch_state_handler_table_t state_handlers = {
|
|||
};
|
||||
|
||||
|
||||
|
||||
static switch_status_t load_config(switch_memory_pool_t *pool)
|
||||
{
|
||||
char *cf = "cdr_pg_csv.conf";
|
||||
switch_xml_t cfg, xml, settings, param;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
char *cf = "cdr_pg_csv.conf", *ptr;
|
||||
switch_xml_t cfg, xml, schema, field;
|
||||
const char *attr;
|
||||
int num_fields = 0;
|
||||
switch_size_t len = 0;
|
||||
cdr_field_t *cdr_field;
|
||||
|
||||
if (globals.db_online) {
|
||||
PQfinish(globals.db_connection);
|
||||
|
@ -500,84 +449,72 @@ static switch_status_t load_config(switch_memory_pool_t *pool)
|
|||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
switch_core_hash_init(&globals.fd_hash, pool);
|
||||
switch_core_hash_init(&globals.template_hash, pool);
|
||||
switch_mutex_init(&globals.db_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
|
||||
globals.pool = pool;
|
||||
|
||||
switch_core_hash_insert(globals.template_hash, "default", default_template);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding default template.\n");
|
||||
globals.legs = CDR_LEG_A;
|
||||
if (switch_xml_config_parse_module_settings(cf, SWITCH_FALSE, config_settings) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||
|
||||
if ((settings = switch_xml_child(cfg, "settings"))) {
|
||||
for (param = switch_xml_child(settings, "param"); param; param = param->next) {
|
||||
char *var = (char *) switch_xml_attr_soft(param, "name");
|
||||
char *val = (char *) switch_xml_attr_soft(param, "value");
|
||||
if (!strcasecmp(var, "debug")) {
|
||||
globals.debug = switch_true(val);
|
||||
} else if (!strcasecmp(var, "legs")) {
|
||||
globals.legs = 0;
|
||||
|
||||
if (strchr(val, 'a')) {
|
||||
globals.legs |= CDR_LEG_A;
|
||||
}
|
||||
|
||||
if (strchr(val, 'b')) {
|
||||
globals.legs |= CDR_LEG_B;
|
||||
}
|
||||
} else if (!strcasecmp(var, "log-base")) {
|
||||
globals.log_dir = switch_core_sprintf(pool, "%s%scdr-pg-csv", val, SWITCH_PATH_SEPARATOR);
|
||||
} else if (!strcasecmp(var, "rotate-on-hup")) {
|
||||
globals.rotate = switch_true(val);
|
||||
} else if (!strcasecmp(var, "db-info")) {
|
||||
globals.db_info = switch_core_strdup(pool, val);
|
||||
} else if (!strcasecmp(var, "db-table") || !strcasecmp(var, "g-table")) {
|
||||
globals.db_table = switch_core_strdup(pool, val);
|
||||
} else if (!strcasecmp(var, "default-template")) {
|
||||
globals.default_template = switch_core_strdup(pool, val);
|
||||
} else if (!strcasecmp(var, "spool-format")) {
|
||||
globals.spool_format = switch_core_strdup(pool, val);
|
||||
if ((schema = switch_xml_child(cfg, "schema"))) {
|
||||
/* Count fields in schema so we can calculate required buffer size */
|
||||
for (field = switch_xml_child(schema, "field"); field; field = field->next) {
|
||||
if (switch_xml_attr(field, "var")) {
|
||||
num_fields++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings = switch_xml_child(cfg, "templates"))) {
|
||||
for (param = switch_xml_child(settings, "template"); param; param = param->next) {
|
||||
char *var = (char *) switch_xml_attr(param, "name");
|
||||
if (var) {
|
||||
char *tpl;
|
||||
tpl = switch_core_strdup(pool, param->txt);
|
||||
globals.db_schema = switch_core_alloc(pool, (num_fields + 1) * sizeof(cdr_field_t));
|
||||
cdr_field = globals.db_schema->fields;
|
||||
|
||||
switch_core_hash_insert(globals.template_hash, var, tpl);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding template %s.\n", var);
|
||||
for (field = switch_xml_child(schema, "field"); field; field = field->next) {
|
||||
if ((attr = switch_xml_attr(field, "var"))) {
|
||||
cdr_field->var_name = switch_core_strdup(pool, attr);
|
||||
|
||||
/* Assume SQL column name is the same as FreeSWITCH channel var name, unless specified otherwise */
|
||||
if ((attr = switch_xml_attr(field, "column"))) {
|
||||
cdr_field->col_name = switch_core_strdup(pool, attr);
|
||||
} else {
|
||||
cdr_field->col_name = switch_core_strdup(pool, cdr_field->var_name);
|
||||
}
|
||||
|
||||
/* Assume all fields should be quoted (treated as strings), unless specified otherwise */
|
||||
if ((attr = switch_xml_attr(field, "quote")) && !strncmp(attr, "false", 5)) {
|
||||
cdr_field->quote = SWITCH_FALSE;
|
||||
} else {
|
||||
cdr_field->quote = SWITCH_TRUE;
|
||||
}
|
||||
|
||||
/* Assume all fields allow SQL nulls, unless specified otherwise */
|
||||
if ((attr = switch_xml_attr(field, "not-null")) && !strncmp(attr, "true", 4)) {
|
||||
cdr_field->not_null = SWITCH_TRUE;
|
||||
} else {
|
||||
cdr_field->not_null = SWITCH_FALSE;
|
||||
}
|
||||
|
||||
len += strlen(cdr_field->col_name) + 1;
|
||||
cdr_field++;
|
||||
}
|
||||
}
|
||||
cdr_field->var_name = 0;
|
||||
|
||||
globals.db_schema->columns = switch_core_alloc(pool, len);
|
||||
ptr = globals.db_schema->columns;
|
||||
for (cdr_field = globals.db_schema->fields; cdr_field->col_name; cdr_field++) {
|
||||
len = strlen(cdr_field->col_name);
|
||||
memcpy(ptr, cdr_field->col_name, len);
|
||||
ptr += len;
|
||||
*ptr = ',';
|
||||
ptr++;
|
||||
}
|
||||
*--ptr = '\0';
|
||||
}
|
||||
|
||||
switch_xml_free(xml);
|
||||
}
|
||||
|
||||
if (!globals.log_dir) {
|
||||
globals.log_dir = switch_core_sprintf(pool, "%s%scdr-pg-csv", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR);
|
||||
}
|
||||
|
||||
if (zstr(globals.db_info)) {
|
||||
globals.db_info = switch_core_strdup(pool, "dbname=cdr");
|
||||
}
|
||||
|
||||
if (zstr(globals.db_table)) {
|
||||
globals.db_table = switch_core_strdup(pool, "cdr");
|
||||
}
|
||||
|
||||
if (zstr(globals.default_template)) {
|
||||
globals.default_template = switch_core_strdup(pool, "default");
|
||||
}
|
||||
|
||||
if (zstr(globals.spool_format)) {
|
||||
globals.spool_format = switch_core_strdup(pool, "csv");
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -588,8 +525,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_pg_csv_load)
|
|||
|
||||
load_config(pool);
|
||||
|
||||
if ((status = switch_dir_make_recursive(globals.log_dir, SWITCH_DEFAULT_DIR_PERMS, pool)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error creating %s\n", globals.log_dir);
|
||||
if ((status = switch_dir_make_recursive(globals.spool_dir, SWITCH_DEFAULT_DIR_PERMS, pool)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error creating %s\n", globals.spool_dir);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -601,7 +538,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_pg_csv_load)
|
|||
switch_core_add_state_handler(&state_handlers);
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using namespace LUA;
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C void mod_lua_conjure_event(lua_State * L, switch_event_t *event, const char *name, int destroy_me)
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
void mod_lua_conjure_event(lua_State * L, switch_event_t *event, const char *name, int destroy_me)
|
||||
{
|
||||
Event *result = new Event(event);
|
||||
SWIG_NewPointerObj(L, result, SWIGTYPE_p_Event, destroy_me);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef MOD_LUA_EXTRA
|
||||
#define MOD_LUA_EXTRA
|
||||
SWITCH_BEGIN_EXTERN_C void mod_lua_conjure_event(lua_State * L, switch_event_t *event, const char *name, int destroy_me);
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
void mod_lua_conjure_event(lua_State * L, switch_event_t *event, const char *name, int destroy_me);
|
||||
void mod_lua_conjure_stream(lua_State * L, switch_stream_handle_t *stream, const char *name, int destroy_me);
|
||||
void mod_lua_conjure_session(lua_State * L, switch_core_session_t *session, const char *name, int destroy_me);
|
||||
|
||||
|
|
|
@ -1582,6 +1582,55 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
static int _wrap_email(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) NULL ;
|
||||
char *arg4 = (char *) NULL ;
|
||||
char *arg5 = (char *) NULL ;
|
||||
char *arg6 = (char *) NULL ;
|
||||
char *arg7 = (char *) NULL ;
|
||||
bool result;
|
||||
|
||||
SWIG_check_num_args("email",2,7)
|
||||
if(!lua_isstring(L,1)) SWIG_fail_arg("email",1,"char *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("email",2,"char *");
|
||||
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("email",3,"char *");
|
||||
if(lua_gettop(L)>=4 && !lua_isstring(L,4)) SWIG_fail_arg("email",4,"char *");
|
||||
if(lua_gettop(L)>=5 && !lua_isstring(L,5)) SWIG_fail_arg("email",5,"char *");
|
||||
if(lua_gettop(L)>=6 && !lua_isstring(L,6)) SWIG_fail_arg("email",6,"char *");
|
||||
if(lua_gettop(L)>=7 && !lua_isstring(L,7)) SWIG_fail_arg("email",7,"char *");
|
||||
arg1 = (char *)lua_tostring(L, 1);
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
if(lua_gettop(L)>=3){
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
}
|
||||
if(lua_gettop(L)>=4){
|
||||
arg4 = (char *)lua_tostring(L, 4);
|
||||
}
|
||||
if(lua_gettop(L)>=5){
|
||||
arg5 = (char *)lua_tostring(L, 5);
|
||||
}
|
||||
if(lua_gettop(L)>=6){
|
||||
arg6 = (char *)lua_tostring(L, 6);
|
||||
}
|
||||
if(lua_gettop(L)>=7){
|
||||
arg7 = (char *)lua_tostring(L, 7);
|
||||
}
|
||||
result = (bool)email(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
|
||||
SWIG_arg=0;
|
||||
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_new_IVRMenu(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
|
@ -7525,6 +7574,7 @@ static swig_lua_class _wrap_class_LUA_Dbh = { "Dbh", &SWIGTYPE_p_LUA__Dbh,_wrap_
|
|||
static const struct luaL_reg swig_commands[] = {
|
||||
{ "consoleLog", _wrap_consoleLog},
|
||||
{ "consoleCleanLog", _wrap_consoleCleanLog},
|
||||
{ "email", _wrap_email},
|
||||
{ "console_log", _wrap_console_log},
|
||||
{ "console_clean_log", _wrap_console_clean_log},
|
||||
{ "msleep", _wrap_msleep},
|
||||
|
|
|
@ -2126,6 +2126,15 @@ static JSBool session_media_ready(JSContext * cx, JSObject * obj, uintN argc, js
|
|||
}
|
||||
|
||||
|
||||
static JSBool session_ring_ready(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
|
||||
{
|
||||
struct js_session *jss = JS_GetPrivate(cx, obj);
|
||||
|
||||
*rval = BOOLEAN_TO_JSVAL((jss && jss->session && switch_channel_test_flag(switch_core_session_get_channel(jss->session), CF_RING_READY)) ? JS_TRUE : JS_FALSE);
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSBool session_answered(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
|
||||
{
|
||||
struct js_session *jss = JS_GetPrivate(cx, obj);
|
||||
|
@ -2673,6 +2682,7 @@ static JSFunctionSpec session_methods[] = {
|
|||
{"ready", session_ready, 0},
|
||||
{"answered", session_answered, 0},
|
||||
{"mediaReady", session_media_ready, 0},
|
||||
{"ringReady", session_ring_ready, 0},
|
||||
{"waitForAnswer", session_wait_for_answer, 0},
|
||||
{"waitForMedia", session_wait_for_media, 0},
|
||||
{"getEvent", session_get_event, 0},
|
||||
|
|
|
@ -1486,7 +1486,7 @@ static void switch_load_core_config(const char *file)
|
|||
{
|
||||
switch_xml_t xml = NULL, cfg = NULL;
|
||||
|
||||
//switch_core_hash_insert(runtime.ptimes, "ilbc", &d_30);
|
||||
switch_core_hash_insert(runtime.ptimes, "ilbc", &d_30);
|
||||
switch_core_hash_insert(runtime.ptimes, "G723", &d_30);
|
||||
|
||||
if ((xml = switch_xml_open_cfg(file, &cfg, NULL))) {
|
||||
|
|
|
@ -1865,6 +1865,17 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_get_app_flags(const char *ap
|
|||
SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_async(switch_core_session_t *session, const char *app, const char *arg)
|
||||
{
|
||||
switch_event_t *execute_event;
|
||||
char *ap, *arp;
|
||||
|
||||
if (!arg && strstr(app, "::")) {
|
||||
ap = switch_core_session_strdup(session, app);
|
||||
app = ap;
|
||||
|
||||
if ((arp = strstr(ap, "::"))) {
|
||||
*arp = '\0';
|
||||
arg = arp + 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_event_create(&execute_event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute");
|
||||
|
@ -1894,6 +1905,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_get_flag
|
|||
switch_application_interface_t *application_interface;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
if (!arg && strstr(app, "::")) {
|
||||
return switch_core_session_execute_application_async(session, app, arg);
|
||||
}
|
||||
|
||||
if (switch_channel_down(session->channel)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Channel is hungup, aborting execution of application: %s\n", app);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
|
|
@ -1875,6 +1875,10 @@ static void jb_logger(const char *file, const char *func, int line, int level, c
|
|||
SWITCH_DECLARE(switch_status_t) switch_rtp_debug_jitter_buffer(switch_rtp_t *rtp_session, const char *name)
|
||||
{
|
||||
|
||||
if (!switch_rtp_ready(rtp_session)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
stfu_n_debug(rtp_session->jb, name);
|
||||
stfu_global_set_logger(jb_logger);
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
|
|||
|
||||
if (int_options) {
|
||||
/* Enforce validation options */
|
||||
if ((int_options->enforce_min && !(intval > int_options->min)) || (int_options->enforce_max && !(intval < int_options->max))) {
|
||||
if ((int_options->enforce_min && !(intval >= int_options->min)) || (int_options->enforce_max && !(intval <= int_options->max))) {
|
||||
/* Validation failed, set default */
|
||||
intval = (int) (intptr_t) item->defaultvalue;
|
||||
/* Then complain */
|
||||
|
|
|
@ -2,7 +2,7 @@ UNAME=`uname`
|
|||
|
||||
|
||||
NEEDED_PACKAGES_YUM='automake autoconf libtool screen gdb gcc-c++ compat-gcc-32 compat-gcc-32-c++ subversion ncurses-devel unixODBC-devel make wget'
|
||||
NEEDED_PACAKGES_APT='automake autoconf libtool screen gdb libncurses5-dev unixodbc-dev subversion emacs22-nox gcc g++ make'
|
||||
NEEDED_PACAKGES_APT='automake autoconf libtool screen gdb libncurses5-dev unixodbc-dev subversion emacs22-nox gcc g++ make libjpeg-dev'
|
||||
NEEDED_PACKAGES_PKG_ADD=''
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue