add recordings_dir
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16233 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
296d715561
commit
c064a2a586
|
@ -320,6 +320,7 @@ install-data-local:
|
||||||
@for x in mod db log log/xml_cdr bin scripts grammar recordings ; do \
|
@for x in mod db log log/xml_cdr bin scripts grammar recordings ; do \
|
||||||
$(mkinstalldirs) $(DESTDIR)$(prefix)/$$x ; \
|
$(mkinstalldirs) $(DESTDIR)$(prefix)/$$x ; \
|
||||||
done
|
done
|
||||||
|
$(mkinstalldirs) $(DESTDIR)@recordingsdir@
|
||||||
$(mkinstalldirs) $(DESTDIR)@modinstdir@
|
$(mkinstalldirs) $(DESTDIR)@modinstdir@
|
||||||
test -d $(DESTDIR)@confdir@ || $(MAKE) samples-conf
|
test -d $(DESTDIR)@confdir@ || $(MAKE) samples-conf
|
||||||
test -d $(DESTDIR)$(prefix)/htdocs || $(MAKE) samples-htdocs
|
test -d $(DESTDIR)$(prefix)/htdocs || $(MAKE) samples-htdocs
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
<!-- Uncomment auto-record to toggle recording every conference call. -->
|
<!-- Uncomment auto-record to toggle recording every conference call. -->
|
||||||
<!-- Another valid value is shout://user:pass@server.com/live.mp3 -->
|
<!-- Another valid value is shout://user:pass@server.com/live.mp3 -->
|
||||||
<!--
|
<!--
|
||||||
<param name="auto-record" value="$${base_dir}/recordings/${conference_name}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
<param name="auto-record" value="$${recordings_dir}/${conference_name}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||||
-->
|
-->
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@
|
||||||
<action application="export" data="dialed_extension=$1"/>
|
<action application="export" data="dialed_extension=$1"/>
|
||||||
<!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
|
<!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
|
||||||
<action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
|
<action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
|
||||||
<action application="bind_meta_app" data="2 b s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
<action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||||
<action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
|
<action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
|
||||||
<action application="set" data="ringback=${us-ring}"/>
|
<action application="set" data="ringback=${us-ring}"/>
|
||||||
<action application="set" data="transfer_ringback=$${hold_music}"/>
|
<action application="set" data="transfer_ringback=$${hold_music}"/>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<param name="apply-inbound-acl" value="domains"/>
|
<param name="apply-inbound-acl" value="domains"/>
|
||||||
<!--<param name="apply-register-acl" value="domains"/>-->
|
<!--<param name="apply-register-acl" value="domains"/>-->
|
||||||
<!--<param name="dtmf-type" value="info"/>-->
|
<!--<param name="dtmf-type" value="info"/>-->
|
||||||
<param name="record-template" value="$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
<param name="record-template" value="$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||||
<!--enable to use presence and mwi -->
|
<!--enable to use presence and mwi -->
|
||||||
<param name="manage-presence" value="true"/>
|
<param name="manage-presence" value="true"/>
|
||||||
<!-- This setting is for AAL2 bitpacking on G726 -->
|
<!-- This setting is for AAL2 bitpacking on G726 -->
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<param name="local-network-acl" value="localnet.auto"/>
|
<param name="local-network-acl" value="localnet.auto"/>
|
||||||
<!--<param name="apply-register-acl" value="domains"/>-->
|
<!--<param name="apply-register-acl" value="domains"/>-->
|
||||||
<!--<param name="dtmf-type" value="info"/>-->
|
<!--<param name="dtmf-type" value="info"/>-->
|
||||||
<param name="record-path" value="$${base_dir}/recordings"/>
|
<param name="record-path" value="$${recordings_dir}"/>
|
||||||
<param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
<param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||||
<!--enable to use presence -->
|
<!--enable to use presence -->
|
||||||
<param name="manage-presence" value="true"/>
|
<param name="manage-presence" value="true"/>
|
||||||
|
|
|
@ -46,6 +46,10 @@ AC_ARG_WITH([rundir],
|
||||||
AC_SUBST(rundir)
|
AC_SUBST(rundir)
|
||||||
AC_DEFINE_UNQUOTED([SWITCH_RUN_DIR],"${rundir}",[where to put pidfile to])
|
AC_DEFINE_UNQUOTED([SWITCH_RUN_DIR],"${rundir}",[where to put pidfile to])
|
||||||
|
|
||||||
|
recordingsdir="${prefix}/recordings"
|
||||||
|
AC_SUBST(recordingsdir)
|
||||||
|
AC_DEFINE_UNQUOTED([SWITCH_RECORDINGS_DIR],"${recordingsdir}",[where to put recording files])
|
||||||
|
|
||||||
if test "$sysconfdir" = "\${prefix}/etc" ; then
|
if test "$sysconfdir" = "\${prefix}/etc" ; then
|
||||||
confdir="$prefix/conf"
|
confdir="$prefix/conf"
|
||||||
else
|
else
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
<action application="export" data="dialed_extension=$1"/>
|
<action application="export" data="dialed_extension=$1"/>
|
||||||
<!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
|
<!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
|
||||||
<action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
|
<action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
|
||||||
<action application="bind_meta_app" data="2 b s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
<action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||||
<action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
|
<action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
|
||||||
<action application="set" data="ringback=${us-ring}"/>
|
<action application="set" data="ringback=${us-ring}"/>
|
||||||
<action application="set" data="transfer_ringback=$${hold_music}"/>
|
<action application="set" data="transfer_ringback=$${hold_music}"/>
|
||||||
|
|
|
@ -5144,7 +5144,7 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||||
if (!strcasecmp(rec_header, "on")) {
|
if (!strcasecmp(rec_header, "on")) {
|
||||||
char *file = NULL, *tmp = NULL;
|
char *file = NULL, *tmp = NULL;
|
||||||
|
|
||||||
tmp = switch_mprintf("%s%s%s", profile->record_path ? profile->record_path : "${base_dir}/recordings",
|
tmp = switch_mprintf("%s%s%s", profile->record_path ? profile->record_path : "${recordings_dir}",
|
||||||
SWITCH_PATH_SEPARATOR, profile->record_template);
|
SWITCH_PATH_SEPARATOR, profile->record_template);
|
||||||
file = switch_channel_expand_variables(channel, tmp);
|
file = switch_channel_expand_variables(channel, tmp);
|
||||||
switch_ivr_record_session(session, file, 0, NULL);
|
switch_ivr_record_session(session, file, 0, NULL);
|
||||||
|
|
|
@ -458,6 +458,14 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!SWITCH_GLOBAL_dirs.recordings_dir && (SWITCH_GLOBAL_dirs.recordings_dir = (char *) malloc(BUFSIZE))) {
|
||||||
|
#ifdef SWITCH_RECORDINGS_DIR
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.recordings_dir, BUFSIZE, "%s", SWITCH_RECORDINGS_DIR);
|
||||||
|
#else
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.recordings_dir, BUFSIZE, "%s%srecordings", base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (!SWITCH_GLOBAL_dirs.storage_dir && (SWITCH_GLOBAL_dirs.storage_dir = (char *) malloc(BUFSIZE))) {
|
if (!SWITCH_GLOBAL_dirs.storage_dir && (SWITCH_GLOBAL_dirs.storage_dir = (char *) malloc(BUFSIZE))) {
|
||||||
#ifdef SWITCH_STORAGE_DIR
|
#ifdef SWITCH_STORAGE_DIR
|
||||||
switch_snprintf(SWITCH_GLOBAL_dirs.storage_dir, BUFSIZE, "%s", SWITCH_STORAGE_DIR);
|
switch_snprintf(SWITCH_GLOBAL_dirs.storage_dir, BUFSIZE, "%s", SWITCH_STORAGE_DIR);
|
||||||
|
@ -520,6 +528,7 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.script_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.script_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.htdocs_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.htdocs_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.grammar_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.grammar_dir);
|
||||||
|
switch_assert(SWITCH_GLOBAL_dirs.recordings_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.temp_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.temp_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1219,6 +1228,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.script_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.script_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.htdocs_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.htdocs_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.recordings_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.temp_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.temp_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
|
|
||||||
switch_mutex_init(&runtime.uuid_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
switch_mutex_init(&runtime.uuid_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
||||||
|
@ -1253,6 +1263,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||||
switch_find_local_ip(guess_ip, sizeof(guess_ip), NULL, AF_INET6);
|
switch_find_local_ip(guess_ip, sizeof(guess_ip), NULL, AF_INET6);
|
||||||
switch_core_set_variable("local_ip_v6", guess_ip);
|
switch_core_set_variable("local_ip_v6", guess_ip);
|
||||||
switch_core_set_variable("base_dir", SWITCH_GLOBAL_dirs.base_dir);
|
switch_core_set_variable("base_dir", SWITCH_GLOBAL_dirs.base_dir);
|
||||||
|
switch_core_set_variable("recordings_dir", SWITCH_GLOBAL_dirs.recordings_dir);
|
||||||
switch_core_set_serial();
|
switch_core_set_serial();
|
||||||
|
|
||||||
switch_console_init(runtime.memory_pool);
|
switch_console_init(runtime.memory_pool);
|
||||||
|
@ -1791,6 +1802,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.script_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.script_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir);
|
||||||
|
switch_safe_free(SWITCH_GLOBAL_dirs.recordings_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.temp_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.temp_dir);
|
||||||
|
|
||||||
switch_core_hash_destroy(&runtime.global_vars);
|
switch_core_hash_destroy(&runtime.global_vars);
|
||||||
|
|
Loading…
Reference in New Issue