mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
Merge branch 'master' into gsmopen01
This commit is contained in:
@@ -188,7 +188,7 @@ static switch_bool_t cidlookup_execute_sql_callback(char *sql, switch_core_db_ca
|
||||
switch_bool_t retval = SWITCH_FALSE;
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (globals.odbc_dsn && (dbh = cidlookup_get_db_handle())) {
|
||||
if (!zstr(globals.odbc_dsn) && (dbh = cidlookup_get_db_handle())) {
|
||||
if (switch_cache_db_execute_sql_callback(dbh, sql, callback, (void *) cbt, err) != SWITCH_STATUS_SUCCESS) {
|
||||
retval = SWITCH_FALSE;
|
||||
} else {
|
||||
@@ -533,7 +533,7 @@ static char *do_db_lookup(switch_memory_pool_t *pool, switch_event_t *event, con
|
||||
callback_t cbt = { 0 };
|
||||
cbt.pool = pool;
|
||||
|
||||
if (globals.odbc_dsn) {
|
||||
if (!zstr(globals.odbc_dsn)) {
|
||||
newsql = switch_event_expand_headers(event, sql);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "SQL: %s\n", newsql);
|
||||
if (cidlookup_execute_sql_callback(newsql, cidlookup_callback, &cbt, &err)) {
|
||||
@@ -655,8 +655,6 @@ static cid_data_t *do_lookup(switch_memory_pool_t *pool, switch_event_t *event,
|
||||
|
||||
SWITCH_STANDARD_APP(cidlookup_app_function)
|
||||
{
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
char *argv[4] = { 0 };
|
||||
int argc;
|
||||
char *mydata = NULL;
|
||||
@@ -705,7 +703,7 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
|
||||
|
||||
if (switch_string_var_check_const(cid->name)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_CRIT, "Invalid CID data {%s} contains a variable\n", cid->name);
|
||||
switch_goto_status(SWITCH_STATUS_GENERR, done);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (cid && channel) {
|
||||
@@ -719,7 +717,6 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
|
||||
profile->caller_id_name = switch_core_strdup(profile->pool, cid->name);;
|
||||
}
|
||||
|
||||
switch_goto_status(SWITCH_STATUS_SUCCESS, done);
|
||||
|
||||
done:
|
||||
if (event) {
|
||||
@@ -728,9 +725,6 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
|
||||
if (!session && pool) {
|
||||
switch_core_destroy_memory_pool(&pool);
|
||||
}
|
||||
/* This is so compile doesn't failed because status is never used */
|
||||
if (status) {
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_API(cidlookup_function)
|
||||
|
||||
@@ -120,6 +120,10 @@
|
||||
<!-- <param name="ivr-input-timeout" value="0" /> -->
|
||||
<!-- Delay before a conference is asked to be terminated -->
|
||||
<!-- <param name="endconf-grace-time" value="120" /> -->
|
||||
<!-- Can be | delim of wait-mod|audio-always|video-bridge|video-floor-only
|
||||
wait_mod will wait until the moderator in,
|
||||
audio-always will always mix audio from all members regardless they are talking or not -->
|
||||
<!-- <param name="conference-flags" value="audio-always"/> -->
|
||||
</profile>
|
||||
|
||||
<profile name="wideband">
|
||||
|
||||
@@ -174,7 +174,8 @@ typedef enum {
|
||||
CFLAG_INHASH = (1 << 11),
|
||||
CFLAG_EXIT_SOUND = (1 << 12),
|
||||
CFLAG_ENTER_SOUND = (1 << 13),
|
||||
CFLAG_VIDEO_BRIDGE = (1 << 14)
|
||||
CFLAG_VIDEO_BRIDGE = (1 << 14),
|
||||
CFLAG_AUDIO_ALWAYS = (1 << 15)
|
||||
} conf_flag_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -2670,8 +2671,8 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
|
||||
}
|
||||
|
||||
/* skip frames that are not actual media or when we are muted or silent */
|
||||
if ((switch_test_flag(member, MFLAG_TALKING) || member->energy_level == 0) && switch_test_flag(member, MFLAG_CAN_SPEAK) &&
|
||||
!switch_test_flag(member->conference, CFLAG_WAIT_MOD)) {
|
||||
if ((switch_test_flag(member, MFLAG_TALKING) || member->energy_level == 0 || switch_test_flag(member->conference, CFLAG_AUDIO_ALWAYS))
|
||||
&& switch_test_flag(member, MFLAG_CAN_SPEAK) && !switch_test_flag(member->conference, CFLAG_WAIT_MOD)) {
|
||||
switch_audio_resampler_t *read_resampler = member->read_resampler;
|
||||
void *data;
|
||||
uint32_t datalen;
|
||||
@@ -4426,6 +4427,10 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer
|
||||
switch_xml_set_attr_d(x_conference, "wait_mod", "true");
|
||||
}
|
||||
|
||||
if (switch_test_flag(conference, CFLAG_AUDIO_ALWAYS)) {
|
||||
switch_xml_set_attr_d(x_conference, "audio_always", "true");
|
||||
}
|
||||
|
||||
if (switch_test_flag(conference, CFLAG_RUNNING)) {
|
||||
switch_xml_set_attr_d(x_conference, "running", "true");
|
||||
}
|
||||
@@ -5962,6 +5967,8 @@ static void set_cflags(const char *flags, uint32_t *f)
|
||||
*f |= CFLAG_VID_FLOOR;
|
||||
} else if (!strcasecmp(argv[i], "video-bridge")) {
|
||||
*f |= CFLAG_VIDEO_BRIDGE;
|
||||
} else if (!strcasecmp(argv[i], "audio-always")) {
|
||||
*f |= CFLAG_AUDIO_ALWAYS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1121,7 +1121,7 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
|
||||
"(fifo_name,caller_uuid,caller_caller_id_name,caller_caller_id_number,consumer_uuid,consumer_outgoing_uuid,bridge_start) "
|
||||
"values ('%q','%q','%q','%q','%q','%q',%ld)",
|
||||
MANUAL_QUEUE_NAME,
|
||||
"N/A",
|
||||
(msg->string_arg && strchr(msg->string_arg, '-')) ? msg->string_arg : "00000000-0000-0000-0000-000000000000",
|
||||
ced_name,
|
||||
ced_number,
|
||||
switch_core_session_get_uuid(session),
|
||||
|
||||
@@ -1142,7 +1142,8 @@ static switch_status_t parse_xml(client_t *client)
|
||||
switch_channel_get_variables(client->channel, &templ_data);
|
||||
switch_event_merge(templ_data, client->params);
|
||||
expanded = switch_event_expand_headers_check(templ_data, tag->txt,
|
||||
client->profile->var_params.expand_var_list, client->profile->var_params.api_list);
|
||||
client->profile->var_params.expand_var_list,
|
||||
client->profile->var_params.api_list, 0);
|
||||
switch_event_destroy(&templ_data);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,12 +43,17 @@ typedef struct {
|
||||
uint32_t last_digit_end;
|
||||
uint32_t digit_begin;
|
||||
uint32_t min_dup_digit_spacing;
|
||||
int twist;
|
||||
int reverse_twist;
|
||||
int filter_dialtone;
|
||||
int threshold;
|
||||
} switch_inband_dtmf_t;
|
||||
|
||||
static void spandsp_dtmf_rx_realtime_callback(void *user_data, int code, int level, int delay)
|
||||
static void spandsp_dtmf_rx_realtime_callback(void *user_data, int code, int level, int duration)
|
||||
{
|
||||
switch_inband_dtmf_t *pvt = (switch_inband_dtmf_t *)user_data;
|
||||
char digit = (char)code;
|
||||
pvt->samples += duration;
|
||||
if (digit) {
|
||||
/* prevent duplicate DTMF */
|
||||
if (digit != pvt->last_digit || (pvt->samples - pvt->last_digit_end) > pvt->min_dup_digit_spacing) {
|
||||
@@ -74,16 +79,12 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
|
||||
{
|
||||
switch_inband_dtmf_t *pvt = (switch_inband_dtmf_t *) user_data;
|
||||
switch_frame_t *frame = NULL;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(pvt->session);
|
||||
|
||||
switch (type) {
|
||||
case SWITCH_ABC_TYPE_INIT: {
|
||||
const char *min_dup_digit_spacing_str = switch_channel_get_variable(channel, "min_dup_digit_spacing_ms");
|
||||
pvt->dtmf_detect = dtmf_rx_init(NULL, NULL, NULL);
|
||||
dtmf_rx_parms(pvt->dtmf_detect, pvt->filter_dialtone, pvt->twist, pvt->reverse_twist, pvt->threshold);
|
||||
dtmf_rx_set_realtime_callback(pvt->dtmf_detect, spandsp_dtmf_rx_realtime_callback, pvt);
|
||||
if (!zstr(min_dup_digit_spacing_str)) {
|
||||
pvt->min_dup_digit_spacing = atoi(min_dup_digit_spacing_str) * 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SWITCH_ABC_TYPE_CLOSE:
|
||||
@@ -93,7 +94,6 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
|
||||
break;
|
||||
case SWITCH_ABC_TYPE_READ_REPLACE:
|
||||
if ((frame = switch_core_media_bug_get_read_replace_frame(bug))) {
|
||||
pvt->samples += frame->samples;
|
||||
dtmf_rx(pvt->dtmf_detect, frame->data, frame->samples);
|
||||
switch_core_media_bug_set_read_replace_frame(bug, frame);
|
||||
}
|
||||
@@ -126,6 +126,7 @@ switch_status_t spandsp_inband_dtmf_session(switch_core_session_t *session)
|
||||
switch_status_t status;
|
||||
switch_inband_dtmf_t *pvt;
|
||||
switch_codec_implementation_t read_impl = { 0 };
|
||||
const char *value;
|
||||
|
||||
switch_core_session_get_read_impl(session, &read_impl);
|
||||
|
||||
@@ -133,8 +134,60 @@ switch_status_t spandsp_inband_dtmf_session(switch_core_session_t *session)
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
pvt->session = session;
|
||||
pvt->session = session;
|
||||
|
||||
/* get detector params */
|
||||
pvt->min_dup_digit_spacing = 0;
|
||||
value = switch_channel_get_variable(channel, "min_dup_digit_spacing_ms");
|
||||
if (!zstr(value) && switch_is_number(value)) {
|
||||
int val = atoi(value) * 8; /* convert from ms to samples */
|
||||
if (val < 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "min_dup_digit_spacing_ms must be >= 0\n");
|
||||
} else {
|
||||
pvt->min_dup_digit_spacing = val;
|
||||
}
|
||||
}
|
||||
|
||||
pvt->threshold = -100;
|
||||
value = switch_channel_get_variable(channel, "spandsp_dtmf_rx_threshold");
|
||||
if (!zstr(value) && switch_is_number(value)) {
|
||||
int val = atoi(value);
|
||||
if (val < -99) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "spandsp_dtmf_rx_threshold must be >= -99 dBm0\n");
|
||||
} else {
|
||||
pvt->threshold = val;
|
||||
}
|
||||
}
|
||||
|
||||
pvt->twist = -1;
|
||||
value = switch_channel_get_variable(channel, "spandsp_dtmf_rx_twist");
|
||||
if (!zstr(value) && switch_is_number(value)) {
|
||||
int val = atoi(value);
|
||||
if (val < 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "spandsp_dtmf_rx_twist must be >= 0 dB\n");
|
||||
} else {
|
||||
pvt->twist = val;
|
||||
}
|
||||
}
|
||||
|
||||
pvt->reverse_twist = -1;
|
||||
value = switch_channel_get_variable(channel, "spandsp_dtmf_rx_reverse_twist");
|
||||
if (!zstr(value) && switch_is_number(value)) {
|
||||
int val = atoi(value);
|
||||
if (val < 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "spandsp_dtmf_rx_reverse_twist must be >= 0 dB\n");
|
||||
} else {
|
||||
pvt->reverse_twist = val;
|
||||
}
|
||||
}
|
||||
|
||||
pvt->filter_dialtone = -1;
|
||||
value = switch_channel_get_variable(channel, "spandsp_dtmf_rx_filter_dialtone");
|
||||
if (switch_true(value)) {
|
||||
pvt->filter_dialtone = 1;
|
||||
} else if (switch_false(value)) {
|
||||
pvt->filter_dialtone = 0;
|
||||
}
|
||||
|
||||
if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
@@ -629,6 +629,7 @@ vm_profile_t *profile_set_config(vm_profile_t *profile)
|
||||
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "email_date-fmt", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
|
||||
&profile->date_fmt, "%A, %B %d %Y, %I:%M %p", &profile->config_str_pool, NULL, NULL);
|
||||
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "odbc-dsn", SWITCH_CONFIG_STRING, 0, &profile->odbc_dsn, NULL, &profile->config_str_pool, NULL, NULL);
|
||||
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "dbname", SWITCH_CONFIG_STRING, 0, &profile->dbname, NULL, &profile->config_str_pool, NULL, NULL);
|
||||
SWITCH_CONFIG_SET_ITEM_CALLBACK(profile->config[i++], "email_template-file", SWITCH_CONFIG_CUSTOM, CONFIG_RELOADABLE,
|
||||
NULL, NULL, profile, vm_config_email_callback, NULL, NULL);
|
||||
SWITCH_CONFIG_SET_ITEM_CALLBACK(profile->config[i++], "email_notify-template-file", SWITCH_CONFIG_CUSTOM, CONFIG_RELOADABLE,
|
||||
@@ -722,7 +723,9 @@ static vm_profile_t *load_profile(const char *profile_name)
|
||||
}
|
||||
}
|
||||
|
||||
profile->dbname = switch_core_sprintf(profile->pool, "voicemail_%s", profile_name);
|
||||
if (zstr(profile->dbname)) {
|
||||
profile->dbname = switch_core_sprintf(profile->pool, "voicemail_%s", profile_name);
|
||||
}
|
||||
|
||||
if (!(dbh = vm_get_db_handle(profile))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot open DB!\n");
|
||||
|
||||
@@ -117,51 +117,143 @@ struct speex_context {
|
||||
|
||||
static switch_status_t switch_speex_fmtp_parse(const char *fmtp, switch_codec_fmtp_t *codec_fmtp)
|
||||
{
|
||||
if (codec_fmtp) {
|
||||
speex_codec_settings_t *codec_settings = NULL;
|
||||
if (codec_fmtp->private_info) {
|
||||
codec_settings = codec_fmtp->private_info;
|
||||
memcpy(codec_settings, &default_codec_settings, sizeof(*codec_settings));
|
||||
}
|
||||
speex_codec_settings_t *codec_settings = NULL;
|
||||
int x, argc;
|
||||
char *argv[10];
|
||||
char *fmtp_dup = NULL;
|
||||
|
||||
if (fmtp) {
|
||||
int x, argc;
|
||||
char *argv[10];
|
||||
char *fmtp_dup = strdup(fmtp);
|
||||
if (!codec_fmtp) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
switch_assert(fmtp_dup);
|
||||
|
||||
argc = switch_separate_string(fmtp_dup, ';', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||
|
||||
for (x = 0; x < argc; x++) {
|
||||
char *data = argv[x];
|
||||
char *arg;
|
||||
switch_assert(data);
|
||||
while (*data == ' ') {
|
||||
data++;
|
||||
}
|
||||
if ((arg = strchr(data, '='))) {
|
||||
*arg++ = '\0';
|
||||
/*
|
||||
if (!strcasecmp(data, "bitrate")) {
|
||||
bit_rate = atoi(arg);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
if (codec_settings) {
|
||||
if (!strcasecmp(data, "vad")) {
|
||||
bit_rate = atoi(arg);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
free(fmtp_dup);
|
||||
}
|
||||
/*codec_fmtp->bits_per_second = bit_rate;*/
|
||||
/* load default settings */
|
||||
if (codec_fmtp->private_info) {
|
||||
codec_settings = codec_fmtp->private_info;
|
||||
memcpy(codec_settings, &default_codec_settings, sizeof(*codec_settings));
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "codec_fmtp->private_info is NULL\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
if (!fmtp) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "got fmtp: %s\n", fmtp);
|
||||
|
||||
fmtp_dup = strdup(fmtp);
|
||||
switch_assert(fmtp_dup);
|
||||
|
||||
/* parse ; separated fmtp args */
|
||||
argc = switch_separate_string(fmtp_dup, ';', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||
for (x = 0; x < argc; x++) {
|
||||
char *data = argv[x];
|
||||
char *arg;
|
||||
switch_assert(data);
|
||||
while (*data == ' ') {
|
||||
data++;
|
||||
}
|
||||
if (!(arg = strchr(data, '='))) {
|
||||
continue;
|
||||
}
|
||||
*arg++ = '\0';
|
||||
if (zstr(arg)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcasecmp("vbr", data)) {
|
||||
/* vbr can be on/off/vad */
|
||||
if (!strcasecmp("vad", arg)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "enabling speex vbr=vad\n");
|
||||
codec_settings->vbr = 0;
|
||||
codec_settings->vad = 1;
|
||||
codec_settings->pp_vad = 1;
|
||||
} else {
|
||||
if (switch_true(arg)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "enabling speex vbr\n");
|
||||
codec_settings->vbr = 1;
|
||||
codec_settings->vad = 0;
|
||||
codec_settings->pp_vad = 1;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "disabling speex vbr\n");
|
||||
codec_settings->vbr = 0;
|
||||
codec_settings->vad = 0;
|
||||
codec_settings->pp_vad = 0;
|
||||
}
|
||||
}
|
||||
} else if (!strcasecmp("cng", data)) {
|
||||
/* TODO don't know how to turn on CNG */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "speex cng is unsupported\n");
|
||||
} else if (!strcasecmp("mode", data)) {
|
||||
/* mode is a comma-separate list of preferred modes. Use the first mode in the list */
|
||||
char *arg_dup;
|
||||
char *mode[2];
|
||||
if (!strncasecmp("any", arg, 3)) {
|
||||
/* "any", keep the default setting */
|
||||
continue;
|
||||
}
|
||||
arg_dup = strdup(arg);
|
||||
if (switch_separate_string(arg_dup, ',', mode, (sizeof(mode) / sizeof(mode[0])))) {
|
||||
int mode_num = -1;
|
||||
char *mode_str = mode[0];
|
||||
if (mode_str[0] == '"') {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "mode starts with \"\n");
|
||||
mode_str++;
|
||||
}
|
||||
if (switch_is_number(mode_str)) {
|
||||
mode_num = atoi(mode_str);
|
||||
}
|
||||
/* TODO there might be a way to set the mode directly instead of changing the quality */
|
||||
if (codec_fmtp->actual_samples_per_second == 8000) {
|
||||
switch (mode_num) {
|
||||
case 1:
|
||||
codec_settings->quality = 0;
|
||||
break;
|
||||
case 2:
|
||||
codec_settings->quality = 2;
|
||||
break;
|
||||
case 3:
|
||||
codec_settings->quality = 4;
|
||||
break;
|
||||
case 4:
|
||||
codec_settings->quality = 6;
|
||||
break;
|
||||
case 5:
|
||||
codec_settings->quality = 8;
|
||||
break;
|
||||
case 6:
|
||||
codec_settings->quality = 9;
|
||||
break;
|
||||
case 7:
|
||||
codec_settings->quality = 10;
|
||||
break;
|
||||
case 8:
|
||||
codec_settings->quality = 1;
|
||||
break;
|
||||
default:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "ignoring invalid speex/8000 mode %s\n", mode_str);
|
||||
continue;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "choosing speex/8000 mode %s\n", mode_str);
|
||||
codec_settings->quality = codec_settings->quality;
|
||||
codec_settings->vbr_quality = codec_settings->quality;
|
||||
} else {
|
||||
if (mode_num >= 0 && mode_num <= 10) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "choosing speex/%d mode %s\n", codec_fmtp->actual_samples_per_second, mode_str);
|
||||
codec_settings->quality = mode_num;
|
||||
codec_settings->vbr_quality = mode_num;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "ignoring invalid speex/%d mode %s\n", codec_fmtp->actual_samples_per_second, mode_str);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(arg_dup);
|
||||
}
|
||||
}
|
||||
free(fmtp_dup);
|
||||
/*codec_fmtp->bits_per_second = bit_rate;*/
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,6 +274,7 @@ static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_fla
|
||||
|
||||
memset(&codec_fmtp, '\0', sizeof(struct switch_codec_fmtp));
|
||||
codec_fmtp.private_info = &codec_settings;
|
||||
codec_fmtp.actual_samples_per_second = codec->implementation->actual_samples_per_second;
|
||||
switch_speex_fmtp_parse(codec->fmtp_in, &codec_fmtp);
|
||||
|
||||
memcpy(&context->codec_settings, &codec_settings, sizeof(context->codec_settings));
|
||||
@@ -205,11 +298,24 @@ static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_fla
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_GET_FRAME_SIZE, &context->encoder_frame_size);
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_COMPLEXITY, &context->codec_settings.complexity);
|
||||
if (context->codec_settings.preproc) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "preprocessor on\n");
|
||||
context->pp = speex_preprocess_state_init(context->encoder_frame_size, codec->implementation->actual_samples_per_second);
|
||||
if (context->codec_settings.pp_vad) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "preprocessor vad on\n");
|
||||
}
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_VAD, &context->codec_settings.pp_vad);
|
||||
if (context->codec_settings.pp_agc) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "preprocessor agc on\n");
|
||||
}
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_AGC, &context->codec_settings.pp_agc);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_AGC_LEVEL, &context->codec_settings.pp_agc_level);
|
||||
if (context->codec_settings.pp_denoise) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "preprocessor denoise on\n");
|
||||
}
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DENOISE, &context->codec_settings.pp_denoise);
|
||||
if (context->codec_settings.pp_dereverb) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "preprocessor dereverb on\n");
|
||||
}
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DEREVERB, &context->codec_settings.pp_dereverb);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &context->codec_settings.pp_dereverb_decay);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &context->codec_settings.pp_dereverb_level);
|
||||
@@ -218,17 +324,21 @@ static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_fla
|
||||
if (!context->codec_settings.abr && !context->codec_settings.vbr) {
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_QUALITY, &context->codec_settings.quality);
|
||||
if (context->codec_settings.vad) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "vad on\n");
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_VAD, &context->codec_settings.vad);
|
||||
}
|
||||
}
|
||||
if (context->codec_settings.vbr) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "vbr on\n");
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_VBR, &context->codec_settings.vbr);
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_VBR_QUALITY, &context->codec_settings.vbr_quality);
|
||||
}
|
||||
if (context->codec_settings.abr) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "abr on\n");
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_ABR, &context->codec_settings.abr);
|
||||
}
|
||||
if (context->codec_settings.dtx) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "dtx on\n");
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_DTX, &context->codec_settings.dtx);
|
||||
}
|
||||
}
|
||||
@@ -243,6 +353,7 @@ static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_fla
|
||||
|
||||
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "initialized Speex codec \n");
|
||||
codec->private_info = context;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -279,17 +390,15 @@ static switch_status_t switch_speex_encode(switch_codec_t *codec,
|
||||
|
||||
if (is_speech) {
|
||||
switch_clear_flag(context, SWITCH_CODEC_FLAG_SILENCE);
|
||||
*flag |= SWITCH_CODEC_FLAG_SILENCE_STOP;
|
||||
*flag &= ~SFF_CNG;
|
||||
} else {
|
||||
if (switch_test_flag(context, SWITCH_CODEC_FLAG_SILENCE)) {
|
||||
*encoded_data_len = 0;
|
||||
*flag |= SWITCH_CODEC_FLAG_SILENCE | SFF_CNG;
|
||||
*flag |= SFF_CNG;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_set_flag(context, SWITCH_CODEC_FLAG_SILENCE);
|
||||
*flag |= SWITCH_CODEC_FLAG_SILENCE_START;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
LIBS+=$(PA_LIBS)
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
|
||||
MODNAME=mod_portaudio
|
||||
|
||||
@@ -515,6 +515,13 @@ typedef enum {
|
||||
MEDIA_OPT_BYPASS_AFTER_ATT_XFER = (1 << 1)
|
||||
} sofia_media_options_t;
|
||||
|
||||
typedef enum {
|
||||
PAID_DEFAULT = 0,
|
||||
PAID_USER,
|
||||
PAID_USER_DOMAIN,
|
||||
PAID_VERBATIM
|
||||
} sofia_paid_type_t;
|
||||
|
||||
#define MAX_RTPIP 50
|
||||
|
||||
struct sofia_profile {
|
||||
@@ -652,6 +659,7 @@ struct sofia_profile {
|
||||
uint32_t sip_force_expires;
|
||||
uint32_t sip_expires_max_deviation;
|
||||
int ireg_seconds;
|
||||
sofia_paid_type_t paid_type;
|
||||
};
|
||||
|
||||
struct private_object {
|
||||
|
||||
@@ -3494,6 +3494,18 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
} else {
|
||||
profile->sip_expires_max_deviation = 0;
|
||||
}
|
||||
} else if (!strcasecmp(var, "p-asserted-id-parse")) {
|
||||
if (!strncasecmp(val, "default", 7)) {
|
||||
profile->paid_type = PAID_DEFAULT;
|
||||
} else if (!strncasecmp(val, "user-only", 9)) {
|
||||
profile->paid_type = PAID_USER;
|
||||
} else if (!strncasecmp(val, "user-domain", 11)) {
|
||||
profile->paid_type = PAID_USER_DOMAIN;
|
||||
} else if (!strncasecmp(val, "verbatim", 8)) {
|
||||
profile->paid_type = PAID_VERBATIM;
|
||||
} else {
|
||||
profile->paid_type = PAID_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3753,6 +3765,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
profile->ndlb |= PFLAG_NDLB_ALLOW_NONDUP_SDP;
|
||||
profile->te = 101;
|
||||
profile->ireg_seconds = IREG_SECONDS;
|
||||
profile->paid_type = PAID_DEFAULT;
|
||||
|
||||
|
||||
profile->tls_verify_policy = TPTLS_VERIFY_NONE;
|
||||
@@ -4568,6 +4581,18 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_NO_CONNECTION_REUSE);
|
||||
}
|
||||
} else if (!strcasecmp(var, "p-asserted-id-parse")) {
|
||||
if (!strncasecmp(val, "default", 7)) {
|
||||
profile->paid_type = PAID_DEFAULT;
|
||||
} else if (!strncasecmp(val, "user-only", 9)) {
|
||||
profile->paid_type = PAID_USER;
|
||||
} else if (!strncasecmp(val, "user-domain", 11)) {
|
||||
profile->paid_type = PAID_USER_DOMAIN;
|
||||
} else if (!strncasecmp(val, "verbatim", 8)) {
|
||||
profile->paid_type = PAID_VERBATIM;
|
||||
} else {
|
||||
profile->paid_type = PAID_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7781,9 +7806,17 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
if ((passerted = sip_p_asserted_identity(sip))) {
|
||||
if (passerted->paid_url && passerted->paid_url->url_user) {
|
||||
char *full_paid_header = sip_header_as_string(nh->nh_home, (void *) passerted);
|
||||
//char *full_paid_header = (char *)(passerted->paid_common->h_data);
|
||||
from_user = passerted->paid_url->url_user;
|
||||
if (!zstr(full_paid_header)) {
|
||||
switch_channel_set_variable(channel, "sip_P-Asserted-Identity", from_user);
|
||||
if (profile->paid_type == PAID_DEFAULT || profile->paid_type == PAID_USER) {
|
||||
switch_channel_set_variable(channel, "sip_P-Asserted-Identity", from_user);
|
||||
} else if (profile->paid_type == PAID_USER_DOMAIN) {
|
||||
switch_channel_set_variable(channel, "sip_P-Asserted-Identity",
|
||||
switch_core_session_sprintf(session, "%s@%s", passerted->paid_url->url_user, passerted->paid_url->url_host));
|
||||
} else if (profile->paid_type == PAID_VERBATIM) {
|
||||
switch_channel_set_variable(channel, "sip_P-Asserted-Identity", full_paid_header);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!zstr(passerted->paid_display)) {
|
||||
|
||||
@@ -7042,14 +7042,17 @@ char *sofia_glue_gen_contact_str(sofia_profile_t *profile, sip_t const *sip, nua
|
||||
|
||||
|
||||
if (contact->m_url->url_params) {
|
||||
contact_str = switch_mprintf("%s <sip:%s@%s%s%s%s;%s>%s",
|
||||
contact_str = switch_mprintf("%s <sip:%s%s%s%s%s%s;%s>%s",
|
||||
display, contact->m_url->url_user,
|
||||
contact->m_url->url_user ? "@" : "",
|
||||
ipv6 ? "[" : "",
|
||||
contact_host, ipv6 ? "]" : "", new_port, contact->m_url->url_params, np->is_nat ? ";fs_nat=yes" : "");
|
||||
} else {
|
||||
contact_str = switch_mprintf("%s <sip:%s@%s%s%s%s>%s",
|
||||
contact_str = switch_mprintf("%s <sip:%s%s%s%s%s%s>%s",
|
||||
display,
|
||||
contact->m_url->url_user, ipv6 ? "[" : "", contact_host, ipv6 ? "]" : "", new_port, np->is_nat ? ";fs_nat=yes" : "");
|
||||
contact->m_url->url_user,
|
||||
contact->m_url->url_user ? "@" : "",
|
||||
ipv6 ? "[" : "", contact_host, ipv6 ? "]" : "", new_port, np->is_nat ? ";fs_nat=yes" : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2647,7 +2647,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
||||
if (!zstr(astate) && !zstr(uuid) &&
|
||||
helper && helper->stream.data && strcmp(helper->last_uuid, uuid) && strcasecmp(astate, "terminated") && strchr(uuid, '-')) {
|
||||
helper->stream.write_function(&helper->stream, "update sip_dialogs set state='%s' where hostname='%q' and profile_name='%q' and uuid='%s';",
|
||||
mod_sofia_globals.hostname, profile->name, astate, uuid);
|
||||
astate, mod_sofia_globals.hostname, profile->name, uuid);
|
||||
switch_copy_string(helper->last_uuid, uuid, sizeof(helper->last_uuid));
|
||||
}
|
||||
|
||||
@@ -2703,9 +2703,9 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
||||
rpid = "on-the-phone";
|
||||
force_status = 1;
|
||||
} else if (!strcmp(astate, "terminated") || !strcmp(astate, "hangup")) {
|
||||
rpid = "online";
|
||||
dialog_rpid = "";
|
||||
force_event_status = "Available";
|
||||
//rpid = "online";
|
||||
//dialog_rpid = "";
|
||||
//force_event_status = "Available";
|
||||
term = 1;
|
||||
}
|
||||
|
||||
@@ -2778,8 +2778,8 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
||||
|
||||
if (!zstr(uuid) && strchr(uuid, '-') && !zstr(status_line) && !zstr(rpid) && (zstr(register_source) || strcasecmp(register_source, "register"))) {
|
||||
char *sql = switch_mprintf("update sip_dialogs set rpid='%q',status='%q' where hostname='%q' and profile_name='%q' and uuid='%q'",
|
||||
mod_sofia_globals.hostname, profile->name,
|
||||
rpid, status_line, uuid);
|
||||
rpid, status_line,
|
||||
mod_sofia_globals.hostname, profile->name, uuid);
|
||||
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
|
||||
}
|
||||
}
|
||||
@@ -3588,8 +3588,8 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||
" from sip_subscriptions where hostname='%q' and profile_name='%q' and "
|
||||
"event='message-summary' and sip_user='%q' "
|
||||
"and (sip_host='%q' or presence_hosts like '%%%q%%')",
|
||||
mod_sofia_globals.hostname, profile->name,
|
||||
to_host, to_user, to_host, to_host))) {
|
||||
to_host, mod_sofia_globals.hostname, profile->name,
|
||||
to_user, to_host, to_host))) {
|
||||
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_sub_reg_callback, profile);
|
||||
|
||||
switch_safe_free(sql);
|
||||
@@ -3880,16 +3880,24 @@ void sofia_presence_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, n
|
||||
open_closed = basic->txt;
|
||||
}
|
||||
|
||||
if ((person = switch_xml_child(xml, "dm:person")) && (note = switch_xml_child(person, "dm:note"))) {
|
||||
note_txt = note->txt;
|
||||
if ((person = switch_xml_child(xml, "dm:person"))) {
|
||||
if ((note = switch_xml_child(person, "dm:note"))) {
|
||||
note_txt = note->txt;
|
||||
} else if ((note = switch_xml_child(person, "rpid:note"))) {
|
||||
note_txt = note->txt;
|
||||
}
|
||||
if ((act = switch_xml_child(person, "rpid:activities")) && act->child && act->child->name) {
|
||||
if ((rpid = strchr(act->child->name, ':'))) {
|
||||
rpid++;
|
||||
} else {
|
||||
rpid = act->child->name;
|
||||
}
|
||||
}
|
||||
if (zstr(note_txt)) note_txt = rpid;
|
||||
}
|
||||
|
||||
if (person && (act = switch_xml_child(person, "rpid:activities")) && act->child && act->child->name) {
|
||||
if ((rpid = strchr(act->child->name, ':'))) {
|
||||
rpid++;
|
||||
} else {
|
||||
rpid = act->child->name;
|
||||
}
|
||||
if (!strcasecmp(open_closed, "closed")) {
|
||||
rpid = note_txt = "Unregistered";
|
||||
}
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_MULTIREG) && !open) {
|
||||
|
||||
@@ -1344,7 +1344,8 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_test_flag(listener, LFLAG_HANDLE_DISCO) && switch_epoch_time_now(NULL) > listener->linger_timeout) {
|
||||
if (switch_test_flag(listener, LFLAG_HANDLE_DISCO) &&
|
||||
listener->linger_timeout != (time_t) -1 && switch_epoch_time_now(NULL) > listener->linger_timeout) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(listener->session), SWITCH_LOG_DEBUG, "linger timeout, closing socket\n");
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
break;
|
||||
@@ -1356,8 +1357,18 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
|
||||
char message[128] = "";
|
||||
char disco_buf[512] = "";
|
||||
|
||||
switch_snprintf(message, sizeof(message),
|
||||
"Channel %s has disconnected, lingering by request from remote.\n", switch_channel_get_name(channel));
|
||||
if (listener->linger_timeout != (time_t) -1) {
|
||||
listener->linger_timeout += switch_epoch_time_now(NULL);
|
||||
switch_snprintf(message, sizeof(message),
|
||||
"Channel %s has disconnected, lingering %d seconds by request from remote.\n",
|
||||
switch_channel_get_name(channel), listener->linger_timeout);
|
||||
} else {
|
||||
switch_snprintf(message, sizeof(message),
|
||||
"Channel %s has disconnected, lingering by request from remote.\n",
|
||||
switch_channel_get_name(channel));
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s", message);
|
||||
|
||||
mlen = strlen(message);
|
||||
|
||||
switch_snprintf(disco_buf, sizeof(disco_buf), "Content-Type: text/disconnect-notice\n"
|
||||
@@ -2056,8 +2067,12 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
if (async) {
|
||||
if ((status = switch_core_session_queue_private_event(listener->session, event, SWITCH_FALSE)) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_snprintf(reply, reply_len, "+OK");
|
||||
} else if (status == SWITCH_STATUS_TERM) {
|
||||
switch_snprintf(reply, reply_len, "-ERR closed queue");
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
switch_snprintf(reply, reply_len, "-ERR memory error");
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
switch_ivr_parse_event(listener->session, *event);
|
||||
@@ -2067,8 +2082,12 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
if (!zstr(uuid) && (session = switch_core_session_locate(uuid))) {
|
||||
if ((status = switch_core_session_queue_private_event(session, event, SWITCH_FALSE)) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_snprintf(reply, reply_len, "+OK");
|
||||
} else if (status == SWITCH_STATUS_TERM) {
|
||||
switch_snprintf(reply, reply_len, "-ERR closed queue");
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
switch_snprintf(reply, reply_len, "-ERR memory error");
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
switch_core_session_rwunlock(session);
|
||||
} else {
|
||||
@@ -2267,15 +2286,20 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
}
|
||||
} else if (!strncasecmp(cmd, "linger", 6)) {
|
||||
if (listener->session) {
|
||||
uint32_t linger_time = 600; /* sounds reasonable? */
|
||||
time_t linger_time = 600; /* sounds reasonable? */
|
||||
if (*(cmd+6) == ' ' && *(cmd+7)) { /*how long do you want to linger?*/
|
||||
linger_time = (uint32_t)atoi(cmd+7);
|
||||
linger_time = (time_t) atoi(cmd+7);
|
||||
} else {
|
||||
linger_time = (time_t) -1;
|
||||
}
|
||||
|
||||
/*do we need a mutex to update linger_timeout ?*/
|
||||
listener->linger_timeout = switch_epoch_time_now(NULL) + linger_time;
|
||||
listener->linger_timeout = linger_time;
|
||||
switch_set_flag_locked(listener, LFLAG_LINGER);
|
||||
switch_snprintf(reply, reply_len, "+OK will linger %d seconds", linger_time);
|
||||
if (listener->linger_timeout != (time_t) -1) {
|
||||
switch_snprintf(reply, reply_len, "+OK will linger %d seconds", linger_time);
|
||||
} else {
|
||||
switch_snprintf(reply, reply_len, "+OK will linger");
|
||||
}
|
||||
} else {
|
||||
switch_snprintf(reply, reply_len, "-ERR not controlling a session");
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ static lua_State *lua_init(void)
|
||||
luaopen_freeswitch(L);
|
||||
lua_gc(L, LUA_GCRESTART, 0);
|
||||
lua_atpanic(L, panic);
|
||||
error = luaL_loadbuffer(L, buff, strlen(buff), "line") || docall(L, 0, 1, 0);
|
||||
error = luaL_loadbuffer(L, buff, strlen(buff), "line") || docall(L, 0, 0, 0);
|
||||
}
|
||||
return L;
|
||||
}
|
||||
@@ -141,10 +141,10 @@ static int lua_parse_and_execute(lua_State * L, char *input_code)
|
||||
|
||||
if (*input_code == '~') {
|
||||
char *buff = input_code + 1;
|
||||
error = luaL_loadbuffer(L, buff, strlen(buff), "line") || docall(L, 0, 1, 0); //lua_pcall(L, 0, 0, 0);
|
||||
error = luaL_loadbuffer(L, buff, strlen(buff), "line") || docall(L, 0, 0, 0); //lua_pcall(L, 0, 0, 0);
|
||||
} else if (!strncasecmp(input_code, "#!/lua", 6)) {
|
||||
char *buff = input_code + 6;
|
||||
error = luaL_loadbuffer(L, buff, strlen(buff), "line") || docall(L, 0, 1, 0); //lua_pcall(L, 0, 0, 0);
|
||||
error = luaL_loadbuffer(L, buff, strlen(buff), "line") || docall(L, 0, 0, 0); //lua_pcall(L, 0, 0, 0);
|
||||
} else {
|
||||
char *args = strchr(input_code, ' ');
|
||||
if (args) {
|
||||
@@ -168,14 +168,14 @@ static int lua_parse_and_execute(lua_State * L, char *input_code)
|
||||
}
|
||||
|
||||
if (code) {
|
||||
error = luaL_loadbuffer(L, code, strlen(code), "line") || docall(L, 0, 1, 0);
|
||||
error = luaL_loadbuffer(L, code, strlen(code), "line") || docall(L, 0, 0, 0);
|
||||
switch_safe_free(code);
|
||||
}
|
||||
} else {
|
||||
// Force empty argv table
|
||||
char *code = NULL;
|
||||
code = switch_mprintf("argv = {[0]='%s'};", input_code);
|
||||
error = luaL_loadbuffer(L, code, strlen(code), "line") || docall(L, 0, 1, 0);
|
||||
error = luaL_loadbuffer(L, code, strlen(code), "line") || docall(L, 0, 0, 0);
|
||||
switch_safe_free(code);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ static int lua_parse_and_execute(lua_State * L, char *input_code)
|
||||
switch_assert(fdup);
|
||||
file = fdup;
|
||||
}
|
||||
error = luaL_loadfile(L, file) || docall(L, 0, 1, 0);
|
||||
error = luaL_loadfile(L, file) || docall(L, 0, 0, 0);
|
||||
switch_safe_free(fdup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6595,6 +6595,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_media_bug_set_read_replace_frame(
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_cpu_count() {
|
||||
unsigned long jresult ;
|
||||
uint32_t result;
|
||||
|
||||
result = (uint32_t)switch_core_cpu_count();
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_remove(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -24949,6 +24959,14 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_perform_mark_answered(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_check_zrtp(void * jarg1) {
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
switch_channel_check_zrtp(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_perform_ring_ready_value(void * jarg1, int jarg2, char * jarg3, char * jarg4, int jarg5) {
|
||||
int jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
@@ -25291,19 +25309,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_event_set_extended_data(void *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_expand_variables_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_expand_variables_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4, unsigned long jarg5) {
|
||||
char * jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_event_t *arg3 = (switch_event_t *) 0 ;
|
||||
switch_event_t *arg4 = (switch_event_t *) 0 ;
|
||||
uint32_t arg5 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_event_t *)jarg3;
|
||||
arg4 = (switch_event_t *)jarg4;
|
||||
result = (char *)switch_channel_expand_variables_check(arg1,(char const *)arg2,arg3,arg4);
|
||||
arg5 = (uint32_t)jarg5;
|
||||
result = (char *)switch_channel_expand_variables_check(arg1,(char const *)arg2,arg3,arg4,arg5);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
@@ -26881,19 +26901,21 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_set_body(void * jarg1, char * jar
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_expand_headers_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_expand_headers_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4, unsigned long jarg5) {
|
||||
char * jresult ;
|
||||
switch_event_t *arg1 = (switch_event_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_event_t *arg3 = (switch_event_t *) 0 ;
|
||||
switch_event_t *arg4 = (switch_event_t *) 0 ;
|
||||
uint32_t arg5 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_event_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_event_t *)jarg3;
|
||||
arg4 = (switch_event_t *)jarg4;
|
||||
result = (char *)switch_event_expand_headers_check(arg1,(char const *)arg2,arg3,arg4);
|
||||
arg5 = (uint32_t)jarg5;
|
||||
result = (char *)switch_event_expand_headers_check(arg1,(char const *)arg2,arg3,arg4,arg5);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
@@ -30456,6 +30478,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_break(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_flush(void * jarg1) {
|
||||
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
|
||||
|
||||
arg1 = (switch_rtp_t *)jarg1;
|
||||
switch_rtp_flush(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned char SWIGSTDCALL CSharp_switch_rtp_ready(void * jarg1) {
|
||||
unsigned char jresult ;
|
||||
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
|
||||
@@ -31892,6 +31922,20 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_xml_toxml(void * jarg1, int jarg2) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_xml_toxml_nolock(void * jarg1, int jarg2) {
|
||||
char * jresult ;
|
||||
switch_xml_t arg1 = (switch_xml_t) 0 ;
|
||||
switch_bool_t arg2 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_xml_t)jarg1;
|
||||
arg2 = (switch_bool_t)jarg2;
|
||||
result = (char *)switch_xml_toxml_nolock(arg1,arg2);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_xml_toxml_buf(void * jarg1, char * jarg2, void * jarg3, void * jarg4, int jarg5) {
|
||||
char * jresult ;
|
||||
switch_xml_t arg1 = (switch_xml_t) 0 ;
|
||||
|
||||
@@ -6902,6 +6902,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_media_bug_set_read_replace_frame(
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_cpu_count() {
|
||||
unsigned long jresult ;
|
||||
uint32_t result;
|
||||
|
||||
result = (uint32_t)switch_core_cpu_count();
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_remove(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -7030,6 +7040,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_flush_all(void * jarg1)
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_set_pre_buffer_framecount(void * jarg1, unsigned long jarg2) {
|
||||
int jresult ;
|
||||
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_media_bug_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
result = (switch_status_t)switch_core_media_bug_set_pre_buffer_framecount(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_port_allocator_new(unsigned short jarg1, unsigned short jarg2, unsigned long jarg3, void * jarg4) {
|
||||
int jresult ;
|
||||
switch_port_t arg1 ;
|
||||
@@ -25630,6 +25654,14 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_perform_mark_answered(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_check_zrtp(void * jarg1) {
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
switch_channel_check_zrtp(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_perform_ring_ready_value(void * jarg1, int jarg2, char * jarg3, char * jarg4, int jarg5) {
|
||||
int jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
@@ -25972,19 +26004,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_event_set_extended_data(void *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_expand_variables_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_expand_variables_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4, unsigned long jarg5) {
|
||||
char * jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_event_t *arg3 = (switch_event_t *) 0 ;
|
||||
switch_event_t *arg4 = (switch_event_t *) 0 ;
|
||||
uint32_t arg5 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_event_t *)jarg3;
|
||||
arg4 = (switch_event_t *)jarg4;
|
||||
result = (char *)switch_channel_expand_variables_check(arg1,(char const *)arg2,arg3,arg4);
|
||||
arg5 = (uint32_t)jarg5;
|
||||
result = (char *)switch_channel_expand_variables_check(arg1,(char const *)arg2,arg3,arg4,arg5);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
@@ -27577,19 +27611,21 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_set_body(void * jarg1, char * jar
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_expand_headers_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_expand_headers_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4, unsigned long jarg5) {
|
||||
char * jresult ;
|
||||
switch_event_t *arg1 = (switch_event_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_event_t *arg3 = (switch_event_t *) 0 ;
|
||||
switch_event_t *arg4 = (switch_event_t *) 0 ;
|
||||
uint32_t arg5 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_event_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_event_t *)jarg3;
|
||||
arg4 = (switch_event_t *)jarg4;
|
||||
result = (char *)switch_event_expand_headers_check(arg1,(char const *)arg2,arg3,arg4);
|
||||
arg5 = (uint32_t)jarg5;
|
||||
result = (char *)switch_event_expand_headers_check(arg1,(char const *)arg2,arg3,arg4,arg5);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
@@ -31187,6 +31223,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_break(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_flush(void * jarg1) {
|
||||
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
|
||||
|
||||
arg1 = (switch_rtp_t *)jarg1;
|
||||
switch_rtp_flush(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned char SWIGSTDCALL CSharp_switch_rtp_ready(void * jarg1) {
|
||||
unsigned char jresult ;
|
||||
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
|
||||
@@ -32632,6 +32676,20 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_xml_toxml(void * jarg1, int jarg2) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_xml_toxml_nolock(void * jarg1, int jarg2) {
|
||||
char * jresult ;
|
||||
switch_xml_t arg1 = (switch_xml_t) 0 ;
|
||||
switch_bool_t arg2 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_xml_t)jarg1;
|
||||
arg2 = (switch_bool_t)jarg2;
|
||||
result = (char *)switch_xml_toxml_nolock(arg1,arg2);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_xml_toxml_buf(void * jarg1, char * jarg2, void * jarg3, void * jarg4, int jarg5) {
|
||||
char * jresult ;
|
||||
switch_xml_t arg1 = (switch_xml_t) 0 ;
|
||||
|
||||
@@ -1131,6 +1131,11 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_core_media_bug_set_read_replace_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame));
|
||||
}
|
||||
|
||||
public static uint switch_core_cpu_count() {
|
||||
uint ret = freeswitchPINVOKE.switch_core_cpu_count();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_remove(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_media_bug bug) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_remove(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_media_bug.getCPtr(bug));
|
||||
return ret;
|
||||
@@ -3830,6 +3835,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_channel_check_zrtp(SWIGTYPE_p_switch_channel channel) {
|
||||
freeswitchPINVOKE.switch_channel_check_zrtp(SWIGTYPE_p_switch_channel.getCPtr(channel));
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_perform_ring_ready_value(SWIGTYPE_p_switch_channel channel, switch_ring_ready_t rv, string file, string func, int line) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_perform_ring_ready_value(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)rv, file, func, line);
|
||||
return ret;
|
||||
@@ -3949,8 +3958,8 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_channel_event_set_extended_data(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_event.getCPtr(arg1));
|
||||
}
|
||||
|
||||
public static string switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel channel, string arg1, switch_event var_list, switch_event api_list) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel.getCPtr(channel), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list));
|
||||
public static string switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel channel, string arg1, switch_event var_list, switch_event api_list, uint recur) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel.getCPtr(channel), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list), recur);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4332,8 +4341,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_event_expand_headers_check(switch_event arg0, string arg1, switch_event var_list, switch_event api_list) {
|
||||
string ret = freeswitchPINVOKE.switch_event_expand_headers_check(switch_event.getCPtr(arg0), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list));
|
||||
public static string switch_event_expand_headers_check(switch_event arg0, string arg1, switch_event var_list, switch_event api_list, uint recur) {
|
||||
string ret = freeswitchPINVOKE.switch_event_expand_headers_check(switch_event.getCPtr(arg0), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list), recur);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -5183,6 +5192,10 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_rtp_break(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session));
|
||||
}
|
||||
|
||||
public static void switch_rtp_flush(SWIGTYPE_p_switch_rtp rtp_session) {
|
||||
freeswitchPINVOKE.switch_rtp_flush(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session));
|
||||
}
|
||||
|
||||
public static byte switch_rtp_ready(SWIGTYPE_p_switch_rtp rtp_session) {
|
||||
byte ret = freeswitchPINVOKE.switch_rtp_ready(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session));
|
||||
return ret;
|
||||
@@ -5495,6 +5508,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_xml_toxml_nolock(switch_xml xml, switch_bool_t prn_header) {
|
||||
string ret = freeswitchPINVOKE.switch_xml_toxml_nolock(switch_xml.getCPtr(xml), (int)prn_header);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_xml_toxml_buf(switch_xml xml, string buf, SWIGTYPE_p_switch_size_t buflen, SWIGTYPE_p_switch_size_t offset, switch_bool_t prn_header) {
|
||||
string ret = freeswitchPINVOKE.switch_xml_toxml_buf(switch_xml.getCPtr(xml), buf, SWIGTYPE_p_switch_size_t.getCPtr(buflen), SWIGTYPE_p_switch_size_t.getCPtr(offset), (int)prn_header);
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -7973,6 +7991,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_read_replace_frame")]
|
||||
public static extern void switch_core_media_bug_set_read_replace_frame(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_cpu_count")]
|
||||
public static extern uint switch_core_cpu_count();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_remove")]
|
||||
public static extern int switch_core_media_bug_remove(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -12419,6 +12440,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_perform_mark_answered")]
|
||||
public static extern int switch_channel_perform_mark_answered(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_check_zrtp")]
|
||||
public static extern void switch_channel_check_zrtp(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_perform_ring_ready_value")]
|
||||
public static extern int switch_channel_perform_ring_ready_value(HandleRef jarg1, int jarg2, string jarg3, string jarg4, int jarg5);
|
||||
|
||||
@@ -12492,7 +12516,7 @@ class freeswitchPINVOKE {
|
||||
public static extern void switch_channel_event_set_extended_data(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_expand_variables_check")]
|
||||
public static extern string switch_channel_expand_variables_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
public static extern string switch_channel_expand_variables_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, uint jarg5);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_build_param_string")]
|
||||
public static extern string switch_channel_build_param_string(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
@@ -12846,7 +12870,7 @@ class freeswitchPINVOKE {
|
||||
public static extern int switch_event_set_body(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_expand_headers_check")]
|
||||
public static extern string switch_event_expand_headers_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
public static extern string switch_event_expand_headers_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, uint jarg5);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_create_pres_in_detailed")]
|
||||
public static extern int switch_event_create_pres_in_detailed(string jarg1, string jarg2, int jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8, string jarg9, string jarg10, int jarg11, string jarg12, string jarg13, string jarg14, string jarg15);
|
||||
@@ -13577,6 +13601,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_break")]
|
||||
public static extern void switch_rtp_break(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_flush")]
|
||||
public static extern void switch_rtp_flush(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_ready")]
|
||||
public static extern byte switch_rtp_ready(HandleRef jarg1);
|
||||
|
||||
@@ -13910,6 +13937,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_toxml")]
|
||||
public static extern string switch_xml_toxml(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_toxml_nolock")]
|
||||
public static extern string switch_xml_toxml_nolock(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_toxml_buf")]
|
||||
public static extern string switch_xml_toxml_buf(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, int jarg5);
|
||||
|
||||
@@ -23022,6 +23052,8 @@ public enum switch_channel_flag_t {
|
||||
CF_VIDEO_REFRESH_REQ,
|
||||
CF_SERVICE_AUDIO,
|
||||
CF_SERVICE_VIDEO,
|
||||
CF_ZRTP_HASH,
|
||||
CF_ZRTP_PASS,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
@@ -24627,7 +24659,8 @@ namespace FreeSWITCH.Native {
|
||||
SCF_CLEAR_SQL = (1 << 17),
|
||||
SCF_THREADED_SYSTEM_EXEC = (1 << 18),
|
||||
SCF_SYNC_CLOCK_REQUESTED = (1 << 19),
|
||||
SCF_CORE_ODBC_REQ = (1 << 20)
|
||||
SCF_CORE_ODBC_REQ = (1 << 20),
|
||||
SCF_DEBUG_SQL = (1 << 21)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31284,7 +31317,8 @@ public enum switch_session_ctl_t {
|
||||
SCSC_PAUSE_CHECK,
|
||||
SCSC_READY_CHECK,
|
||||
SCSC_THREADED_SYSTEM_EXEC,
|
||||
SCSC_SYNC_CLOCK_WHEN_IDLE
|
||||
SCSC_SYNC_CLOCK_WHEN_IDLE,
|
||||
SCSC_DEBUG_SQL
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1119,6 +1119,11 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_core_media_bug_set_read_replace_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame));
|
||||
}
|
||||
|
||||
public static uint switch_core_cpu_count() {
|
||||
uint ret = freeswitchPINVOKE.switch_core_cpu_count();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_remove(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_media_bug bug) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_remove(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_media_bug.getCPtr(bug));
|
||||
return ret;
|
||||
@@ -1168,6 +1173,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_set_pre_buffer_framecount(SWIGTYPE_p_switch_media_bug bug, uint framecount) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_set_pre_buffer_framecount(SWIGTYPE_p_switch_media_bug.getCPtr(bug), framecount);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_port_allocator_new(ushort start, ushort end, uint flags, SWIGTYPE_p_p_switch_core_port_allocator new_allocator) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_port_allocator_new(start, end, flags, SWIGTYPE_p_p_switch_core_port_allocator.getCPtr(new_allocator));
|
||||
return ret;
|
||||
@@ -3813,6 +3823,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_channel_check_zrtp(SWIGTYPE_p_switch_channel channel) {
|
||||
freeswitchPINVOKE.switch_channel_check_zrtp(SWIGTYPE_p_switch_channel.getCPtr(channel));
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_perform_ring_ready_value(SWIGTYPE_p_switch_channel channel, switch_ring_ready_t rv, string file, string func, int line) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_perform_ring_ready_value(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)rv, file, func, line);
|
||||
return ret;
|
||||
@@ -3932,8 +3946,8 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_channel_event_set_extended_data(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_event.getCPtr(arg1));
|
||||
}
|
||||
|
||||
public static string switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel channel, string arg1, switch_event var_list, switch_event api_list) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel.getCPtr(channel), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list));
|
||||
public static string switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel channel, string arg1, switch_event var_list, switch_event api_list, uint recur) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel.getCPtr(channel), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list), recur);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4315,8 +4329,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_event_expand_headers_check(switch_event arg0, string arg1, switch_event var_list, switch_event api_list) {
|
||||
string ret = freeswitchPINVOKE.switch_event_expand_headers_check(switch_event.getCPtr(arg0), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list));
|
||||
public static string switch_event_expand_headers_check(switch_event arg0, string arg1, switch_event var_list, switch_event api_list, uint recur) {
|
||||
string ret = freeswitchPINVOKE.switch_event_expand_headers_check(switch_event.getCPtr(arg0), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list), recur);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -5166,6 +5180,10 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_rtp_break(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session));
|
||||
}
|
||||
|
||||
public static void switch_rtp_flush(SWIGTYPE_p_switch_rtp rtp_session) {
|
||||
freeswitchPINVOKE.switch_rtp_flush(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session));
|
||||
}
|
||||
|
||||
public static byte switch_rtp_ready(SWIGTYPE_p_switch_rtp rtp_session) {
|
||||
byte ret = freeswitchPINVOKE.switch_rtp_ready(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session));
|
||||
return ret;
|
||||
@@ -5478,6 +5496,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_xml_toxml_nolock(switch_xml xml, switch_bool_t prn_header) {
|
||||
string ret = freeswitchPINVOKE.switch_xml_toxml_nolock(switch_xml.getCPtr(xml), (int)prn_header);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_xml_toxml_buf(switch_xml xml, string buf, SWIGTYPE_p_switch_size_t buflen, SWIGTYPE_p_switch_size_t offset, switch_bool_t prn_header) {
|
||||
string ret = freeswitchPINVOKE.switch_xml_toxml_buf(switch_xml.getCPtr(xml), buf, SWIGTYPE_p_switch_size_t.getCPtr(buflen), SWIGTYPE_p_switch_size_t.getCPtr(offset), (int)prn_header);
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -7952,6 +7975,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_read_replace_frame")]
|
||||
public static extern void switch_core_media_bug_set_read_replace_frame(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_cpu_count")]
|
||||
public static extern uint switch_core_cpu_count();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_remove")]
|
||||
public static extern int switch_core_media_bug_remove(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -7982,6 +8008,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_flush_all")]
|
||||
public static extern int switch_core_media_bug_flush_all(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_pre_buffer_framecount")]
|
||||
public static extern int switch_core_media_bug_set_pre_buffer_framecount(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_port_allocator_new")]
|
||||
public static extern int switch_core_port_allocator_new(ushort jarg1, ushort jarg2, uint jarg3, HandleRef jarg4);
|
||||
|
||||
@@ -12395,6 +12424,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_perform_mark_answered")]
|
||||
public static extern int switch_channel_perform_mark_answered(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_check_zrtp")]
|
||||
public static extern void switch_channel_check_zrtp(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_perform_ring_ready_value")]
|
||||
public static extern int switch_channel_perform_ring_ready_value(HandleRef jarg1, int jarg2, string jarg3, string jarg4, int jarg5);
|
||||
|
||||
@@ -12468,7 +12500,7 @@ class freeswitchPINVOKE {
|
||||
public static extern void switch_channel_event_set_extended_data(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_expand_variables_check")]
|
||||
public static extern string switch_channel_expand_variables_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
public static extern string switch_channel_expand_variables_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, uint jarg5);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_build_param_string")]
|
||||
public static extern string switch_channel_build_param_string(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
@@ -12822,7 +12854,7 @@ class freeswitchPINVOKE {
|
||||
public static extern int switch_event_set_body(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_expand_headers_check")]
|
||||
public static extern string switch_event_expand_headers_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
public static extern string switch_event_expand_headers_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, uint jarg5);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_create_pres_in_detailed")]
|
||||
public static extern int switch_event_create_pres_in_detailed(string jarg1, string jarg2, int jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8, string jarg9, string jarg10, int jarg11, string jarg12, string jarg13, string jarg14, string jarg15);
|
||||
@@ -13553,6 +13585,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_break")]
|
||||
public static extern void switch_rtp_break(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_flush")]
|
||||
public static extern void switch_rtp_flush(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_ready")]
|
||||
public static extern byte switch_rtp_ready(HandleRef jarg1);
|
||||
|
||||
@@ -13886,6 +13921,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_toxml")]
|
||||
public static extern string switch_xml_toxml(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_toxml_nolock")]
|
||||
public static extern string switch_xml_toxml_nolock(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_xml_toxml_buf")]
|
||||
public static extern string switch_xml_toxml_buf(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, int jarg5);
|
||||
|
||||
@@ -22958,6 +22996,8 @@ public enum switch_channel_flag_t {
|
||||
CF_VIDEO_REFRESH_REQ,
|
||||
CF_SERVICE_AUDIO,
|
||||
CF_SERVICE_VIDEO,
|
||||
CF_ZRTP_HASH,
|
||||
CF_ZRTP_PASS,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
@@ -24541,7 +24581,8 @@ namespace FreeSWITCH.Native {
|
||||
SCF_CLEAR_SQL = (1 << 17),
|
||||
SCF_THREADED_SYSTEM_EXEC = (1 << 18),
|
||||
SCF_SYNC_CLOCK_REQUESTED = (1 << 19),
|
||||
SCF_CORE_ODBC_REQ = (1 << 20)
|
||||
SCF_CORE_ODBC_REQ = (1 << 20),
|
||||
SCF_DEBUG_SQL = (1 << 21)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31108,7 +31149,8 @@ public enum switch_session_ctl_t {
|
||||
SCSC_PAUSE_CHECK,
|
||||
SCSC_READY_CHECK,
|
||||
SCSC_THREADED_SYSTEM_EXEC,
|
||||
SCSC_SYNC_CLOCK_WHEN_IDLE
|
||||
SCSC_SYNC_CLOCK_WHEN_IDLE,
|
||||
SCSC_DEBUG_SQL
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user