mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
EXECUTE ORDER 66
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5846 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0df71feee8
commit
230a77714d
@ -135,6 +135,7 @@ freeswitch_LDADD += -lcurses
|
||||
endif
|
||||
|
||||
if ADD_ODBC
|
||||
CORE_CFLAGS += -DSWITCH_HAVE_ODBC
|
||||
libfreeswitch_la_SOURCES += src/switch_odbc.c
|
||||
libfreeswitch_la_LDFLAGS += -lodbc
|
||||
endif
|
||||
|
@ -5,6 +5,7 @@ applications/mod_conference
|
||||
applications/mod_dptools
|
||||
applications/mod_enum
|
||||
applications/mod_fifo
|
||||
#applications/mod_voicemail
|
||||
#applications/mod_ivrtest
|
||||
#applications/mod_soundtouch
|
||||
#applications/mod_rss
|
||||
|
@ -19,6 +19,21 @@
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<extension name="7771">
|
||||
<condition field="destination_number" expression="^7771$">
|
||||
<action application="answer"/>
|
||||
<action application="set" data="voicemail_authorized=${sip_authorized}"/>
|
||||
<action application="voicemail" data="check demo $${domain} ${sip_from_user}"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<extension name="7772">
|
||||
<condition field="destination_number" expression="^7772$">
|
||||
<action application="answer"/>
|
||||
<action application="voicemail" data="demo $${domain} ${sip_from_user}"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<extension name="9193">
|
||||
<condition field="destination_number" expression="^9193$">
|
||||
<action application="set" data="bridge_pre_execute_bleg_app=soundtouch"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--the domain or ip (the right hand side of the @ in the addr-->
|
||||
<domain name="$${domain}">
|
||||
<!--the user id (the left hand side of the @ in the addr-->
|
||||
<user id="stpeter">
|
||||
<user id="stpeter" mailbox="1000"> <!--if id is numeric mailbox param is not necessary-->
|
||||
<!-- Outbound Registrations Related to this user -->
|
||||
<gateways>
|
||||
<!--<gateway name="asterlink.com">-->
|
||||
@ -34,6 +34,8 @@
|
||||
<params>
|
||||
<!-- omit password for authless registration -->
|
||||
<param name="password" value="mypass"/>
|
||||
<param name="vm-password" value="1234"/><!--if vm-password is omitted password param is used-->
|
||||
<!--<param name="vm-mailto" value="me@mydomain.com"/>-->
|
||||
<!-- optionally use this instead if you want to store the hash of user:domain:pass-->
|
||||
<!--<param name="a1-hash" value="c6440e5de50b403206989679159de89a"/>-->
|
||||
</params>
|
||||
|
@ -102,6 +102,7 @@
|
||||
<!--#include "conference.conf.xml"-->
|
||||
<!-- ivr.conf is used by mod_dptools -->
|
||||
<!--#include "ivr.conf.xml"-->
|
||||
<!--#include "voicemail.conf.xml"-->
|
||||
|
||||
<!-- Dialplan Interfaces -->
|
||||
<!--#include "dialplan_directory.conf.xml"-->
|
||||
@ -145,6 +146,8 @@
|
||||
<macros>
|
||||
<language name="en" sound_path="/snds" tts_engine="cepstral" tts_voice="david">
|
||||
<!--#include "lang_en.xml"-->
|
||||
<!--voicemail_en_tts is purely implemented with tts, we need a files based implementation too -->
|
||||
<!--#include "voicemail_en_tts.xml"-->
|
||||
</language>
|
||||
<language name="fr" sound_path="/var/sounds/lang/fr/jean" tts_engine="cepstral" tts_voice="jean-pierre">
|
||||
<!--#include "lang_fr.xml"-->
|
||||
|
@ -37,6 +37,7 @@
|
||||
<load module="mod_conference"/>
|
||||
<load module="mod_dptools"/>
|
||||
<load module="mod_fifo"/>
|
||||
<!--<load module="mod_voicemail"/>-->
|
||||
|
||||
<!-- Dialplan Interfaces -->
|
||||
<!-- <load module="mod_dialplan_directory"/> -->
|
||||
|
30
conf/voicemail.conf.xml
Normal file
30
conf/voicemail.conf.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<configuration name="voicemail.conf" description="Voicemail">
|
||||
<settings>
|
||||
</settings>
|
||||
<profiles>
|
||||
<profile name="demo">
|
||||
<param name="terminator-key" value="#"/>
|
||||
<param name="max-login-attempts" value="3"/>
|
||||
<param name="digit-timeout" value="10000"/>
|
||||
<param name="max-record-len" value="300"/>
|
||||
<param name="tone-spec" value="%(1000, 0, 640)"/>
|
||||
<param name="terminator-key" value="#"/>
|
||||
<param name="play-new-messages-key" value="1"/>
|
||||
<param name="play-saved-messages-key" value="2"/>
|
||||
<param name="save-message-key" value="8"/>
|
||||
<param name="delete-message-key" value="7"/>
|
||||
<param name="replay-message-key" value="1"/>
|
||||
<param name="main-menu-key" value="0"/>
|
||||
<param name="config-menu-key" value="5"/>
|
||||
<param name="record-greeting-key" value="1"/>
|
||||
<param name="choose-greeting-key" value="2"/>
|
||||
<param name="record-name-key" value="3"/>
|
||||
<param name="record-file-key" value="3"/>
|
||||
<param name="listen-file-key" value="1"/>
|
||||
<param name="save-file-key" value="2"/>
|
||||
<param name="delete-file-key" value="7"/>
|
||||
<param name="undelete-file-key" value="8"/>
|
||||
<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
|
||||
</profile>
|
||||
</profiles>
|
||||
</configuration>
|
209
conf/voicemail_en_tts.xml
Normal file
209
conf/voicemail_en_tts.xml
Normal file
@ -0,0 +1,209 @@
|
||||
<include><!--This line will be ignored it's here to validate the xml and is optional -->
|
||||
<macro name="voicemail_enter_id">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="please enter your i d, followed by $1"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_enter_pass">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="please enter your password, followed by $1"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_fail_auth">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="login incorrect"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_hello">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="welcome to your voicemail"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_goodbye">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="goodbye"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_abort">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="too many failed attempts"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_new_message_count">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="you have $1 new messages in folder ${voicemail_current_folder}"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_saved_message_count">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="speak-text" data="you have $1 saved messages in folder ${voicemail_current_folder}"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="voicemail_menu">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="speak-text" data="press $1 to listen to new messages. press $2 to listen to saved messages. press $3 for advanced options"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="voicemail_config_menu">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="speak-text"
|
||||
data="press $1 to record a greeting, press $2 to choose a greeting, press $3 to record your name, press $4 for the main menu"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="voicemail_record_name">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="at the tone, record your name, press any key or stop talking to end the recording."/>
|
||||
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_file_check">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="speak-text"
|
||||
data="press $1 to listen to the recording, press $2 to save the recording, press $3 to re record"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_listen_file_check">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="speak-text"
|
||||
data="press $1 to listen to the recording again, press $2 to save the recording, press $3 to delete the recording"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_choose_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="choose a greeting between 1 and 3"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_choose_greeting_fail">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="invalid value"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="record your greeting at the tone, press any key or stop talking to end the recording"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_message">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="record your message at the tone, press any key or stop talking to end the recording"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_greeting_selected">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="greeting $1 selected"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_play_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="$1 is not available"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_number">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="$1"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_message_number">
|
||||
<input pattern="^([a-z]+):(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="$1 message number $2"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_phone_number">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="$1"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_name">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="$1"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_ack">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="message $1"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_date">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="speak-text" data="$strftime($1|%A, %B %d %Y, %I %m %p)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
</include><!--This line will be ignored it's here to validate the xml and is optional -->
|
@ -748,6 +748,11 @@ SWITCH_DECLARE(switch_size_t) switch_file_get_size(switch_file_t *thefile);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename, switch_memory_pool_t *pool);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_dir_make(const char *path, switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_dir_make_recursive(const char *path, switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool);
|
||||
|
||||
typedef struct switch_dir switch_dir_t;
|
||||
|
||||
struct switch_array_header_t {
|
||||
|
@ -253,6 +253,7 @@ struct switch_directories {
|
||||
char *temp_dir;
|
||||
char *htdocs_dir;
|
||||
char *grammar_dir;
|
||||
char *storage_dir;
|
||||
};
|
||||
|
||||
typedef struct switch_directories switch_directories;
|
||||
|
@ -675,9 +675,16 @@ SWITCH_STANDARD_API(strftime_api_function)
|
||||
switch_size_t retsize;
|
||||
switch_time_exp_t tm;
|
||||
char date[80] = "";
|
||||
|
||||
switch_time_exp_lt(&tm, switch_time_now());
|
||||
switch_strftime(date, &retsize, sizeof(date), cmd ? cmd : "%Y-%m-%d %T", &tm);
|
||||
switch_time_t thetime;
|
||||
char *p;
|
||||
if (!switch_strlen_zero(cmd) && (p = strchr(cmd, '|'))) {
|
||||
thetime = switch_time_make(atoi(cmd),0);
|
||||
cmd = p+1;
|
||||
} else {
|
||||
thetime = switch_time_now();
|
||||
}
|
||||
switch_time_exp_lt(&tm, thetime);
|
||||
switch_strftime(date, &retsize, sizeof(date), switch_strlen_zero(cmd) ? "%Y-%m-%d %T" : cmd, &tm);
|
||||
stream->write_function(stream, "%s", date);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
2
src/mod/applications/mod_voicemail/Makefile
Normal file
2
src/mod/applications/mod_voicemail/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
BASE=../../../..
|
||||
include /usr/src/freeswitch.trunk/build/modmake.rules
|
1633
src/mod/applications/mod_voicemail/mod_voicemail.c
Normal file
1633
src/mod/applications/mod_voicemail/mod_voicemail.c
Normal file
File diff suppressed because it is too large
Load Diff
210
src/mod/applications/mod_voicemail/mod_voicemail.vcproj
Normal file
210
src/mod/applications/mod_voicemail/mod_voicemail.vcproj
Normal file
@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_voicemail"
|
||||
ProjectGUID="{C24FB505-05D7-4319-8485-7540B44C8603}"
|
||||
RootNamespace="mod_voicemail"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_voicemail.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_voicemail.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\mod_voicemail.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -394,6 +394,51 @@ SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename, switch_
|
||||
return status;
|
||||
}
|
||||
|
||||
/* #define SWITCH_FPROT_USETID 0x8000 /\**< Set user id *\/ */
|
||||
/* #define SWITCH_FPROT_UREAD 0x0400 /\**< Read by user *\/ */
|
||||
/* #define SWITCH_FPROT_UWRITE 0x0200 /\**< Write by user *\/ */
|
||||
/* #define SWITCH_FPROT_UEXECUTE 0x0100 /\**< Execute by user *\/ */
|
||||
|
||||
/* #define SWITCH_FPROT_GSETID 0x4000 /\**< Set group id *\/ */
|
||||
/* #define SWITCH_FPROT_GREAD 0x0040 /\**< Read by group *\/ */
|
||||
/* #define SWITCH_FPROT_GWRITE 0x0020 /\**< Write by group *\/ */
|
||||
/* #define SWITCH_FPROT_GEXECUTE 0x0010 /\**< Execute by group *\/ */
|
||||
|
||||
/* #define SWITCH_FPROT_WSTICKY 0x2000 /\**< Sticky bit *\/ */
|
||||
/* #define SWITCH_FPROT_WREAD 0x0004 /\**< Read by others *\/ */
|
||||
/* #define SWITCH_FPROT_WWRITE 0x0002 /\**< Write by others *\/ */
|
||||
/* #define SWITCH_FPROT_WEXECUTE 0x0001 /\**< Execute by others *\/ */
|
||||
|
||||
/* #define SWITCH_FPROT_OS_DEFAULT 0x0FFF /\**< use OS's default permissions *\/ */
|
||||
|
||||
|
||||
/**
|
||||
* Create a new directory on the file system.
|
||||
* @param path the path for the directory to be created. (use / on all systems)
|
||||
* @param perm Permissions for the new direcoty.
|
||||
* @param pool the pool to use.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_dir_make(const char *path, switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_dir_make(path, perm, pool);
|
||||
}
|
||||
|
||||
/** Creates a new directory on the file system, but behaves like
|
||||
* 'mkdir -p'. Creates intermediate directories as required. No error
|
||||
* will be reported if PATH already exists.
|
||||
* @param path the path for the directory to be created. (use / on all systems)
|
||||
* @param perm Permissions for the new direcoty.
|
||||
* @param pool the pool to use.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_dir_make_recursive(const char *path,
|
||||
switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_dir_make_recursive(path, perm, pool);
|
||||
}
|
||||
|
||||
|
||||
struct switch_dir {
|
||||
apr_dir_t *dir_handle;
|
||||
apr_finfo_t finfo;
|
||||
|
@ -295,6 +295,14 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!SWITCH_GLOBAL_dirs.storage_dir && (SWITCH_GLOBAL_dirs.storage_dir = (char *) malloc(BUFSIZE))) {
|
||||
#ifdef SWITCH_STORAGE_DIR
|
||||
switch_snprintf(SWITCH_GLOBAL_dirs.storage_dir, BUFSIZE, "%s", SWITCH_STORAGE_DIR);
|
||||
#else
|
||||
switch_snprintf(SWITCH_GLOBAL_dirs.storage_dir, BUFSIZE, "%s%sstorage", base_dir, SWITCH_PATH_SEPARATOR);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!SWITCH_GLOBAL_dirs.db_dir && (SWITCH_GLOBAL_dirs.db_dir = (char *) malloc(BUFSIZE))) {
|
||||
#ifdef SWITCH_DB_DIR
|
||||
switch_snprintf(SWITCH_GLOBAL_dirs.db_dir, BUFSIZE, "%s", SWITCH_DB_DIR);
|
||||
|
@ -55,7 +55,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
|
||||
}
|
||||
|
||||
if ((fh->file_interface = switch_loadable_module_get_file_interface(ext)) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid file format [%s]!\n", ext);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid file format [%s] for [%s]!\n", ext, file_path);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
|
@ -1241,7 +1241,8 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_domain(char *domain_name, char
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(char *user_name, char *domain_name,
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(char *user_name,
|
||||
char *domain_name,
|
||||
char *ip,
|
||||
switch_xml_t *root,
|
||||
switch_xml_t *domain,
|
||||
@ -1272,7 +1273,8 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(char *user_name, char *do
|
||||
}
|
||||
|
||||
if (user_name) {
|
||||
if (!(*user = switch_xml_find_child(*domain, "user", "id", user_name))) {
|
||||
if (!(*user = switch_xml_find_child(*domain, "user", "id", user_name)) && strstr(xtra_params, "mailbox") &&
|
||||
!(*user = switch_xml_find_child(*domain, "user", "mailbox", user_name))) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user