static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
private_t *tech_pvt = NULL;
- char *digit;
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
{
switch_channel_t *channel = NULL;
private_t *tech_pvt = NULL;
- zap_size_t len;
+ uint32_t len;
zap_wait_flag_t wflags = ZAP_READ;
- uint8_t dtmf[128] = "";
+ char dtmf[128] = "";
zap_status_t status;
channel = switch_core_session_get_channel(session);
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
- unsigned int req = 0, cap = 0;
- unsigned short samprate = 0;
switch_core_session_add_stream(*new_session, NULL);
if ((tech_pvt = (private_t *) switch_core_session_alloc(*new_session, sizeof(private_t))) != 0) {
static switch_status_t load_config(void)
{
char *cf = "openzap.conf";
- switch_xml_t cfg, xml, settings, param, spans, span;
+ switch_xml_t cfg, xml, settings, param, spans, myspan;
memset(&globals, 0, sizeof(globals));
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
}
if ((spans = switch_xml_child(cfg, "analog_spans"))) {
- for (span = switch_xml_child(spans, "span"); span; span = span->next) {
- char *mod = (char *) switch_xml_attr_soft(span, "module");
- char *id = (char *) switch_xml_attr_soft(span, "id");
+ for (myspan = switch_xml_child(spans, "span"); myspan; myspan = myspan->next) {
+ char *mod = (char *) switch_xml_attr_soft(myspan, "module");
+ char *id = (char *) switch_xml_attr_soft(myspan, "id");
char *context = "default";
char *dialplan = "XML";
char *tonegroup = NULL;
uint32_t span_id = 0, to = 0, max = 0;
zap_span_t *span = NULL;
- for (param = switch_xml_child(span, "param"); param; param = param->next) {
+ for (param = switch_xml_child(myspan, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="mod_openzap"\r
+ ProjectGUID="{FE3540C5-3303-46E0-A69E-D92F775687F1}"\r
+ RootNamespace="mod_openzap"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="$(ConfigurationName)"\r
+ IntermediateDirectory="$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="../../freeswitch.trunk/src/include;../src/include;../src/isdn/include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="FreeSwitchCore.lib"\r
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"\r
+ LinkIncremental="2"\r
+ AdditionalLibraryDirectories=""../../freeswitch.trunk/w32/Library/$(OutDir)""\r
+ GenerateDebugInformation="true"\r
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"\r
+ SubSystem="2"\r
+ ImportLibrary="$(OutDir)/mod_openzap.lib"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="$(ConfigurationName)"\r
+ IntermediateDirectory="$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories="../../freeswitch.trunk/src/include;../src/include;../src/isdn/include"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"\r
+ RuntimeLibrary="2"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="FreeSwitchCore.lib"\r
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories=""../../freeswitch.trunk/w32/Library/$(OutDir)""\r
+ GenerateDebugInformation="true"\r
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"\r
+ SubSystem="2"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ LinkTimeCodeGeneration="1"\r
+ ImportLibrary="$(OutDir)/mod_openzap.lib"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ <File\r
+ RelativePath=".\mod_openzap.c"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
BasicRuntimeChecks="3"\r
RuntimeLibrary="3"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="4"\r
/>\r
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
RuntimeLibrary="2"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="3"\r
/>\r
BasicRuntimeChecks="3"\r
RuntimeLibrary="3"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="4"\r
/>\r
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
RuntimeLibrary="2"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="3"\r
/>\r
{93B8812C-3EC4-4F78-8970-FFBFC99E167D} = {93B8812C-3EC4-4F78-8970-FFBFC99E167D}\r
EndProjectSection\r
EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_openzap", "mod_openzap\mod_openzap.vcproj", "{FE3540C5-3303-46E0-A69E-D92F775687F1}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {93B8812C-3EC4-4F78-8970-FFBFC99E167D} = {93B8812C-3EC4-4F78-8970-FFBFC99E167D}\r
+ EndProjectSection\r
+EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Debug|Win32 = Debug|Win32\r
{6DA6FD42-641D-4147-92F5-3BC4AAA6589B}.Debug|Win32.Build.0 = Debug|Win32\r
{6DA6FD42-641D-4147-92F5-3BC4AAA6589B}.Release|Win32.ActiveCfg = Release|Win32\r
{6DA6FD42-641D-4147-92F5-3BC4AAA6589B}.Release|Win32.Build.0 = Release|Win32\r
+ {FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.Build.0 = Debug|Win32\r
+ {FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.ActiveCfg = Release|Win32\r
+ {FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.Build.0 = Release|Win32\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r