mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch
This commit is contained in:
commit
62cc31ae77
@ -599,6 +599,11 @@ speex-reconf:
|
||||
cd libs/speex && ./config.status --recheck
|
||||
cd libs/speex && ./config.status
|
||||
|
||||
sndfile-reconf:
|
||||
cd libs/libsndfile && autoreconf
|
||||
cd libs/libsndfile && ./config.status --recheck
|
||||
cd libs/libsndfile && ./config.status
|
||||
|
||||
tiff-reconf:
|
||||
cd libs/tiff-3.8.2 && autoreconf -fi
|
||||
cd libs/tiff-3.8.2 && sh ./configure.gnu
|
||||
|
@ -1181,6 +1181,7 @@ typedef enum {
|
||||
CF_BRIDGE_NOWRITE,
|
||||
CF_RECOVERED,
|
||||
CF_JITTERBUFFER,
|
||||
CF_JITTERBUFFER_PLC,
|
||||
CF_DIALPLAN,
|
||||
CF_BLOCK_BROADCAST_UNTIL_MEDIA,
|
||||
CF_CNG_PLC,
|
||||
|
@ -421,7 +421,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_unbind_search_function_ptr(_In_ switc
|
||||
///\return the section mask
|
||||
SWITCH_DECLARE(switch_xml_section_t) switch_xml_parse_section_string(_In_opt_z_ const char *str);
|
||||
|
||||
SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond);
|
||||
SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond, int *offset);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, switch_xml_t *node, switch_event_t *params, switch_xml_t *language, switch_xml_t *phrases, switch_xml_t *macros, const char *str_language);
|
||||
|
||||
|
@ -81,7 +81,7 @@ static int parse_exten(switch_event_t *event, switch_xml_t xexten, switch_event_
|
||||
switch_bool_t anti_action = SWITCH_TRUE;
|
||||
break_t do_break_i = BREAK_ON_FALSE;
|
||||
|
||||
int time_match = switch_xml_std_datetime_check(xcond);
|
||||
int time_match = switch_xml_std_datetime_check(xcond, NULL);
|
||||
|
||||
switch_safe_free(field_expanded);
|
||||
switch_safe_free(expression_expanded);
|
||||
|
@ -87,6 +87,14 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
|
||||
int proceed = 0, save_proceed = 0;
|
||||
char *expression_expanded = NULL, *field_expanded = NULL;
|
||||
switch_regex_t *re = NULL, *save_re = NULL;
|
||||
int offset = 0;
|
||||
const char *tzoff = switch_channel_get_variable(channel, "tod_tz_offset");
|
||||
|
||||
if (!zstr(tzoff) && switch_is_number(tzoff)) {
|
||||
offset = atoi(tzoff);
|
||||
} else {
|
||||
tzoff = NULL;
|
||||
}
|
||||
|
||||
if (!exten_name) {
|
||||
exten_name = "_anon_";
|
||||
@ -102,7 +110,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
|
||||
switch_bool_t anti_action = SWITCH_TRUE;
|
||||
break_t do_break_i = BREAK_ON_FALSE;
|
||||
|
||||
int time_match = switch_xml_std_datetime_check(xcond);
|
||||
int time_match = switch_xml_std_datetime_check(xcond, tzoff ? &offset : NULL);
|
||||
|
||||
switch_safe_free(field_expanded);
|
||||
switch_safe_free(expression_expanded);
|
||||
@ -152,7 +160,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
|
||||
switch_channel_del_variable_prefix(channel, "DP_REGEX_MATCH");
|
||||
|
||||
for (xregex = switch_xml_child(xcond, "regex"); xregex; xregex = xregex->next) {
|
||||
time_match = switch_xml_std_datetime_check(xregex);
|
||||
time_match = switch_xml_std_datetime_check(xregex, tzoff ? &offset : NULL);
|
||||
|
||||
if (time_match == 1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
|
||||
|
@ -1,3 +1,4 @@
|
||||
fix stale calls then fax send/recv in some circumstance
|
||||
remove SWITCH_RTP_FLAG_AUTO_CNG - works incorrectly.
|
||||
moves the switch_rtp_request_port() call from the contructor to FSH323Connection::CreateRealTimeLogicalChannel() - fix
|
||||
rtp port leak. tnx to Peter Olsson.
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
* mod_h323.cpp -- H323 endpoint
|
||||
*
|
||||
* Version 0.0.57
|
||||
* Version 0.0.58
|
||||
*/
|
||||
|
||||
//#define DEBUG_RTP_PACKETS
|
||||
@ -1333,7 +1333,19 @@ void FSH323Connection::OnModeChanged(const H245_ModeDescription & newMode)
|
||||
const char *uuid = switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
if (uuid != NULL) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"uuid:%s\n",uuid);
|
||||
switch_channel_set_private(switch_core_session_get_channel(switch_core_session_locate(switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE))), "t38_options", t38_options);
|
||||
|
||||
switch_core_session_t *session = switch_core_session_locate(switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE));
|
||||
if (session) {
|
||||
switch_channel_t * channel = switch_core_session_get_channel(session);
|
||||
if (channel) {
|
||||
switch_channel_set_private(channel, "t38_options", t38_options);
|
||||
}else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "no channel?\n");
|
||||
}
|
||||
switch_core_session_rwunlock(session);
|
||||
}else{
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "no session\n");
|
||||
}
|
||||
|
||||
|
||||
switch_core_session_message_t msg = { 0 };
|
||||
|
@ -32,7 +32,7 @@
|
||||
*
|
||||
* mod_h323.h -- H323 endpoint
|
||||
*
|
||||
* Version 0.0.57
|
||||
* Version 0.0.58
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && defined(HAVE_VISIBILITY)
|
||||
|
@ -1505,6 +1505,9 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
SWITCH_LOG_DEBUG, "Setting Jitterbuffer to %dms (%d frames) (%d max frames) (%d max drift)\n",
|
||||
len, qlen, maxqlen, max_drift);
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_JITTERBUFFER);
|
||||
if (!switch_false(switch_channel_get_variable(tech_pvt->channel, "sip_jitter_buffer_plc"))) {
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_JITTERBUFFER_PLC);
|
||||
}
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session),
|
||||
SWITCH_LOG_WARNING, "Error Setting Jitterbuffer to %dms (%d frames)\n", len, qlen);
|
||||
|
@ -3324,6 +3324,9 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session),
|
||||
SWITCH_LOG_DEBUG, "Setting Jitterbuffer to %dms (%d frames)\n", jb_msec, qlen);
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_JITTERBUFFER);
|
||||
if (!switch_false(switch_channel_get_variable(tech_pvt->channel, "sip_jitter_buffer_plc"))) {
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_JITTERBUFFER_PLC);
|
||||
}
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session),
|
||||
SWITCH_LOG_WARNING, "Error Setting Jitterbuffer to %dms (%d frames)\n", jb_msec, qlen);
|
||||
|
@ -146,6 +146,9 @@ static switch_status_t sndfile_file_open(switch_file_handle_t *handle, const cha
|
||||
context->sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM;
|
||||
context->sfinfo.channels = 1;
|
||||
context->sfinfo.samplerate = 8000;
|
||||
} else if (!strcmp(ext, "oga")) {
|
||||
context->sfinfo.format = SF_FORMAT_OGG | SF_FORMAT_VORBIS;
|
||||
context->sfinfo.samplerate = handle->samplerate;
|
||||
}
|
||||
|
||||
if ((mode & SFM_WRITE) && sf_format_check(&context->sfinfo) == 0) {
|
||||
|
@ -270,7 +270,6 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_freeswitch(
|
||||
|
||||
/* Callback for returning strings to C# without leaking memory */
|
||||
#ifndef _MANAGED
|
||||
#include <glib.h>
|
||||
#include <mono/jit/jit.h>
|
||||
#include <mono/metadata/environment.h>
|
||||
#include <mono/metadata/mono-config.h>
|
||||
@ -12622,6 +12621,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_is_number(char * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_find_parameter(char * jarg1, char * jarg2, void * jarg3) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_memory_pool_t *arg3 = (switch_memory_pool_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_memory_pool_t *)jarg3;
|
||||
result = (char *)switch_find_parameter((char const *)arg1,(char const *)arg2,arg3);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_true(char * jarg1) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
@ -24339,6 +24354,20 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_get_hold_music_partner(void
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_channel_del_variable_prefix(void * jarg1, char * jarg2) {
|
||||
unsigned long jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (uint32_t)switch_channel_del_variable_prefix(arg1,(char const *)arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_export_variable_var_check(void * jarg1, char * jarg2, char * jarg3, char * jarg4, int jarg5) {
|
||||
int jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
@ -29666,6 +29695,20 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_check_presence_mapping(char * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_kill_uuid(char * jarg1, int jarg2) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
switch_call_cause_t arg2 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (switch_call_cause_t)jarg2;
|
||||
result = (switch_status_t)switch_ivr_kill_uuid((char const *)arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
@ -32159,13 +32202,15 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_xml_parse_section_string(char
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_std_datetime_check(void * jarg1) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_std_datetime_check(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_xml_t arg1 = (switch_xml_t) 0 ;
|
||||
int *arg2 = (int *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (switch_xml_t)jarg1;
|
||||
result = (int)switch_xml_std_datetime_check(arg1);
|
||||
arg2 = (int *)jarg2;
|
||||
result = (int)switch_xml_std_datetime_check(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
@ -12958,6 +12958,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_is_number(char * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_find_parameter(char * jarg1, char * jarg2, void * jarg3) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_memory_pool_t *arg3 = (switch_memory_pool_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_memory_pool_t *)jarg3;
|
||||
result = (char *)switch_find_parameter((char const *)arg1,(char const *)arg2,arg3);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_true(char * jarg1) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
@ -32936,13 +32952,15 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_xml_parse_section_string(char
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_std_datetime_check(void * jarg1) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_std_datetime_check(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_xml_t arg1 = (switch_xml_t) 0 ;
|
||||
int *arg2 = (int *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (switch_xml_t)jarg1;
|
||||
result = (int)switch_xml_std_datetime_check(arg1);
|
||||
arg2 = (int *)jarg2;
|
||||
result = (int)switch_xml_std_datetime_check(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
@ -2996,6 +2996,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_find_parameter(string str, string param, SWIGTYPE_p_apr_pool_t pool) {
|
||||
string ret = freeswitchPINVOKE.switch_find_parameter(str, param, SWIGTYPE_p_apr_pool_t.getCPtr(pool));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static int switch_true(string expr) {
|
||||
int ret = freeswitchPINVOKE.switch_true(expr);
|
||||
return ret;
|
||||
@ -3565,6 +3570,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_channel_del_variable_prefix(SWIGTYPE_p_switch_channel channel, string prefix) {
|
||||
uint ret = freeswitchPINVOKE.switch_channel_del_variable_prefix(SWIGTYPE_p_switch_channel.getCPtr(channel), prefix);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_export_variable_var_check(SWIGTYPE_p_switch_channel channel, string varname, string val, string export_varname, switch_bool_t var_check) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_export_variable_var_check(SWIGTYPE_p_switch_channel.getCPtr(channel), varname, val, export_varname, (int)var_check);
|
||||
return ret;
|
||||
@ -4937,6 +4947,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_kill_uuid(string uuid, switch_call_cause_t cause) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_kill_uuid(uuid, (int)cause);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_rtp_add_crypto_key(SWIGTYPE_p_switch_rtp rtp_session, switch_rtp_crypto_direction_t direction, uint index, switch_rtp_crypto_key_type_t type, SWIGTYPE_p_unsigned_char key, SWIGTYPE_p_switch_size_t keylen) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_add_crypto_key(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), (int)direction, index, (int)type, SWIGTYPE_p_unsigned_char.getCPtr(key), SWIGTYPE_p_switch_size_t.getCPtr(keylen));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@ -5543,8 +5558,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static int switch_xml_std_datetime_check(switch_xml xcond) {
|
||||
int ret = freeswitchPINVOKE.switch_xml_std_datetime_check(switch_xml.getCPtr(xcond));
|
||||
public static int switch_xml_std_datetime_check(switch_xml xcond, SWIGTYPE_p_int offset) {
|
||||
int ret = freeswitchPINVOKE.switch_xml_std_datetime_check(switch_xml.getCPtr(xcond), SWIGTYPE_p_int.getCPtr(offset));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -9198,6 +9213,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_is_number")]
|
||||
public static extern int switch_is_number(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_find_parameter")]
|
||||
public static extern string switch_find_parameter(string jarg1, string jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_true")]
|
||||
public static extern int switch_true(string jarg1);
|
||||
|
||||
@ -12129,6 +12147,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_hold_music_partner")]
|
||||
public static extern string switch_channel_get_hold_music_partner(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_del_variable_prefix")]
|
||||
public static extern uint switch_channel_del_variable_prefix(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_export_variable_var_check")]
|
||||
public static extern int switch_channel_export_variable_var_check(HandleRef jarg1, string jarg2, string jarg3, string jarg4, int jarg5);
|
||||
|
||||
@ -13248,6 +13269,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_check_presence_mapping")]
|
||||
public static extern string switch_ivr_check_presence_mapping(string jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_kill_uuid")]
|
||||
public static extern int switch_ivr_kill_uuid(string jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
|
||||
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
|
||||
|
||||
@ -13810,7 +13834,7 @@ class freeswitchPINVOKE {
|
||||
public static extern uint switch_xml_parse_section_string(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_std_datetime_check")]
|
||||
public static extern int switch_xml_std_datetime_check(HandleRef jarg1);
|
||||
public static extern int switch_xml_std_datetime_check(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_locate_language")]
|
||||
public static extern int switch_xml_locate_language(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4, HandleRef jarg5, HandleRef jarg6, string jarg7);
|
||||
@ -22803,6 +22827,8 @@ public enum switch_channel_flag_t {
|
||||
CF_SIGNAL_DATA,
|
||||
CF_SIMPLIFY,
|
||||
CF_ZOMBIE_EXEC,
|
||||
CF_INTERCEPT,
|
||||
CF_INTERCEPTED,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -369,7 +369,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
||||
}
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
if ((switch_channel_test_flag(session->channel, CF_JITTERBUFFER) || switch_channel_test_flag(session->channel, CF_CNG_PLC))
|
||||
if ((switch_channel_test_flag(session->channel, CF_JITTERBUFFER_PLC) || switch_channel_test_flag(session->channel, CF_CNG_PLC))
|
||||
&& !session->plc) {
|
||||
session->plc = plc_init(NULL);
|
||||
}
|
||||
|
@ -1611,6 +1611,7 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_xml(switch_e
|
||||
flags[CF_BRIDGE_NOWRITE] = 0;
|
||||
flags[CF_RECOVERED] = 0;
|
||||
flags[CF_JITTERBUFFER] = 0;
|
||||
flags[CF_JITTERBUFFER_PLC] = 0;
|
||||
flags[CF_DIALPLAN] = 0;
|
||||
flags[CF_BLOCK_BROADCAST_UNTIL_MEDIA] = 0;
|
||||
flags[CF_CNG_PLC] = 0;
|
||||
|
@ -2783,7 +2783,8 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_cut(switch_xml_t xml)
|
||||
return xml;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond) {
|
||||
SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond, int *offset)
|
||||
{
|
||||
|
||||
const char *xdt = switch_xml_attr(xcond, "date-time");
|
||||
const char *xyear = switch_xml_attr(xcond, "year");
|
||||
@ -2797,12 +2798,24 @@ SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond) {
|
||||
const char *xminute = switch_xml_attr(xcond, "minute");
|
||||
const char *xminday = switch_xml_attr(xcond, "minute-of-day");
|
||||
const char *xtod = switch_xml_attr(xcond, "time-of-day");
|
||||
const char *tzoff = switch_xml_attr(xcond, "tz-offset");
|
||||
int loffset = 0;
|
||||
|
||||
switch_time_t ts = switch_micro_time_now();
|
||||
int time_match = -1;
|
||||
switch_time_exp_t tm;
|
||||
|
||||
switch_time_exp_lt(&tm, ts);
|
||||
if (!zstr(tzoff) && switch_is_number(tzoff)) {
|
||||
loffset = atoi(tzoff);
|
||||
offset = &loffset;
|
||||
}
|
||||
|
||||
|
||||
if (offset) {
|
||||
switch_time_exp_tz(&tm, ts, *offset);
|
||||
} else {
|
||||
switch_time_exp_lt(&tm, ts);
|
||||
}
|
||||
|
||||
if (time_match && xdt) {
|
||||
char tmpdate[80];
|
||||
|
Loading…
x
Reference in New Issue
Block a user