Merge branch 'v1.2.stable' of ssh://git.freeswitch.org:222/freeswitch into v1.2.stable

This commit is contained in:
Chris Rienzo 2013-04-18 21:31:52 -04:00
commit 8d7c69572e
18 changed files with 1550 additions and 309 deletions

View File

@ -15,6 +15,10 @@
<param name="callback-context" value="default"/>
<param name="play-new-messages-key" value="1"/>
<param name="play-saved-messages-key" value="2"/>
<!-- play-new-messages-lifo and play-saved-messages-lifo default is false, playing oldest messages first
<param name="play-new-messages-lifo" value="false"/>
<param name="play-saved-messages-lifo" value="false"/>
-->
<param name="login-keys" value="0"/>
<param name="main-menu-key" value="0"/>
<param name="config-menu-key" value="5"/>

View File

@ -493,6 +493,13 @@ struct switch_directories {
typedef struct switch_directories switch_directories;
SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
struct switch_filenames {
char *conf_name;
};
typedef struct switch_filenames switch_filenames;
SWITCH_DECLARE_DATA extern switch_filenames SWITCH_GLOBAL_filenames;
#define SWITCH_MAX_STACKS 16
#define SWITCH_THREAD_STACKSIZE 240 * 1024
#define SWITCH_SYSTEM_THREAD_STACKSIZE 8192 * 1024

View File

@ -15,6 +15,10 @@
<param name="callback-context" value="default"/>
<param name="play-new-messages-key" value="1"/>
<param name="play-saved-messages-key" value="2"/>
<!-- play-new-messages-lifo and play-saved-messages-lifo default is false, playing oldest messages first
<param name="play-new-messages-lifo" value="false"/>
<param name="play-saved-messages-lifo" value="false"/>
-->
<param name="login-keys" value="0"/>
<param name="main-menu-key" value="0"/>
<param name="config-menu-key" value="5"/>

View File

@ -27,6 +27,7 @@
* Bret McDanel <trixter AT 0xdecafbad.com>
* John Wehle (john@feith.com)
* Raymond Chandler <intralanman@gmail.com>
* Kristin King <kristin.king@quentustech.com>
*
* mod_voicemail.c -- Voicemail Module
*
@ -107,6 +108,8 @@ struct vm_profile {
char *name;
char *dbname;
char *odbc_dsn;
char *play_new_messages_lifo;
char *play_saved_messages_lifo;
char terminator_key[2];
char play_new_messages_key[2];
char play_saved_messages_key[2];
@ -548,6 +551,10 @@ vm_profile_t *profile_set_config(vm_profile_t *profile)
&profile->play_new_messages_key, "1", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "play-saved-messages-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->play_saved_messages_key, "2", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "play-new-messages-lifo", SWITCH_CONFIG_BOOL, CONFIG_RELOADABLE,
&profile->play_new_messages_lifo, SWITCH_FALSE, NULL, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "play-saved-messages-lifo", SWITCH_CONFIG_BOOL, CONFIG_RELOADABLE,
&profile->play_saved_messages_lifo, SWITCH_FALSE, NULL, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "login-keys", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->login_keys, "0", &config_login_keys, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "main-menu-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
@ -2059,7 +2066,8 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
{
switch_snprintf(sql, sizeof(sql),
"select created_epoch, read_epoch, username, domain, uuid, cid_name, cid_number, in_folder, file_path, message_len, flags, read_flags, forwarded_by from voicemail_msgs where username='%s' and domain='%s' and read_epoch=0"
" order by read_flags, created_epoch", myid, domain_name);
" order by read_flags, created_epoch %s", myid, domain_name,
profile->play_new_messages_lifo ? "desc" : "asc");
total_messages = total_new_messages;
heard_auto_new = heard_auto_saved = 1;
}
@ -2069,7 +2077,8 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
{
switch_snprintf(sql, sizeof(sql),
"select created_epoch, read_epoch, username, domain, uuid, cid_name, cid_number, in_folder, file_path, message_len, flags, read_flags, forwarded_by from voicemail_msgs where username='%s' and domain='%s' and read_epoch !=0"
" order by read_flags, created_epoch", myid, domain_name);
" order by read_flags, created_epoch %s", myid, domain_name,
profile->play_saved_messages_lifo ? "desc" : "asc");
total_messages = total_saved_messages;
heard_auto_new = heard_auto_saved = 1;
}
@ -5250,17 +5259,17 @@ done:
/* Message API */
#define VM_FSDB_MSG_LIST_USAGE "<format> <profile> <domain> <user> <folder> <filter>"
#define VM_FSDB_MSG_LIST_USAGE "<format> <profile> <domain> <user> <folder> <filter> [msg-order = ASC | DESC]"
SWITCH_STANDARD_API(vm_fsdb_msg_list_function)
{
char *sql;
msg_lst_callback_t cbt = { 0 };
char *ebuf = NULL;
const char *id = NULL, *domain = NULL, *profile_name = NULL, *folder = NULL, *msg_type = NULL;
const char *id = NULL, *domain = NULL, *profile_name = NULL, *folder = NULL, *msg_type = NULL, *msg_order = NULL;
vm_profile_t *profile = NULL;
char *argv[6] = { 0 };
char *argv[7] = { 0 };
char *mycmd = NULL;
switch_memory_pool_t *pool;
@ -5282,24 +5291,33 @@ SWITCH_STANDARD_API(vm_fsdb_msg_list_function)
folder = argv[4]; /* TODO add Support */
if (argv[5])
msg_type = argv[5];
if (argv[6])
msg_order = argv[6];
if (!profile_name || !domain || !id || !folder || !msg_type) {
stream->write_function(stream, "-ERR Missing Arguments\n");
goto done;
}
if (!msg_order) {
msg_order = "ASC";
} else if (strcasecmp(msg_order, "ASC") || strcasecmp(msg_order, "DESC")) {
stream->write_function(stream, "-ERR Bad Argument: '%s'\n", msg_order);
goto done;
}
if (!(profile = get_profile(profile_name))) {
stream->write_function(stream, "-ERR Profile not found\n");
goto done;
}
if (!strcasecmp(msg_type, "not-read")) {
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND read_epoch = 0 ORDER BY read_flags, created_epoch", id, domain);
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND read_epoch = 0 ORDER BY read_flags, created_epoch %q", id, domain, msg_order);
} else if (!strcasecmp(msg_type, "new")) {
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND flags='' ORDER BY read_flags, created_epoch", id, domain);
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND flags='' ORDER BY read_flags, created_epoch %q", id, domain, msg_order);
} else if (!strcasecmp(msg_type, "save")) {
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND flags='save' ORDER BY read_flags, created_epoch", id, domain);
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND flags='save' ORDER BY read_flags, created_epoch %q", id, domain, msg_order);
} else {
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND read_epoch != 0 ORDER BY read_flags, created_epoch", id, domain);
sql = switch_mprintf("SELECT uuid FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND read_epoch != 0 ORDER BY read_flags, created_epoch %q", id, domain, msg_order);
}
memset(&cbt, 0, sizeof(cbt));

View File

@ -1522,6 +1522,13 @@ static switch_status_t sofia_send_dtmf(switch_core_session_t *session, const swi
switch_assert(tech_pvt != NULL);
if (sofia_test_flag(tech_pvt, TFLAG_DROP_DTMF)) {
const char *file = switch_channel_get_variable_dup(tech_pvt->channel, "drop_dtmf_masking_file", SWITCH_FALSE, -1);
if (!zstr(file)) {
switch_ivr_broadcast(switch_core_session_get_uuid(session), file, SMF_ECHO_ALEG);
}
return SWITCH_STATUS_SUCCESS;
}
@ -4323,6 +4330,180 @@ SWITCH_STANDARD_API(sofia_contact_function)
return SWITCH_STATUS_SUCCESS;
}
struct list_result {
int row_process;
int single_col;
switch_stream_handle_t *stream;
};
static int list_result_callback(void *pArg, int argc, char **argv, char **columnNames)
{
struct list_result *cbt = (struct list_result *) pArg;
int i = 0;
cbt->row_process++;
if (cbt->row_process == 1) {
for ( i = 0; i < argc; i++) {
cbt->stream->write_function(cbt->stream,"%s", columnNames[i]);
if (i < argc - 1) {
cbt->stream->write_function(cbt->stream,"|");
}
}
cbt->stream->write_function(cbt->stream,"\n");
}
for ( i = 0; i < argc; i++) {
cbt->stream->write_function(cbt->stream,"%s", zstr(argv[i]) ? "unknown" : argv[i]);
if (i < argc - 1) {
cbt->stream->write_function(cbt->stream,"|");
}
}
if (!cbt->single_col)
cbt->stream->write_function(cbt->stream,"\n");
return 0;
}
static void get_presence_data(sofia_profile_t *profile, const char *user, const char *domain, const char *search, switch_stream_handle_t *stream)
{
struct list_result cb;
char *sql;
char *select;
cb.row_process = 1;
cb.single_col = 1;
cb.stream = stream;
if (!strcasecmp(search, "status")) {
select = switch_mprintf(" p.status ");
} else if (!strcasecmp(search, "rpid")) {
select = switch_mprintf(" p.rpid ");
} else if (!strcasecmp(search, "user_agent")) {
select = switch_mprintf(" r.user_agent ");
} else {
cb.row_process = 0;
cb.single_col = 0;
select = switch_mprintf(" p.status, p.rpid, r.user_agent, r.network_ip, r.network_port ");
}
sql = switch_mprintf(" select %q from sip_registrations as r left join sip_presence as p "
" on p.sip_host = r.sip_host and p.profile_name = r.profile_name and p.hostname = r.orig_hostname "
" and p.sip_user = r.sip_user "
" where r.sip_realm = '%q' and r.sip_user = '%q' and r.profile_name = '%q' ", select, domain, user, profile->name);
switch_assert(sql);
sofia_glue_execute_sql_callback(profile, profile->dbh_mutex, sql, list_result_callback, &cb);
switch_safe_free(sql);
switch_safe_free(select);
}
/* [list|status|rpid|user_agent] [profile/]<user>@domain */
SWITCH_STANDARD_API(sofia_presence_data_function)
{
char *argv[6] = { 0 };
int argc;
char *data;
char *user = NULL;
char *domain = NULL, *dup_domain = NULL;
char *concat = NULL;
char *search = NULL;
char *profile_name = NULL;
char *p;
sofia_profile_t *profile = NULL;
if (!cmd) {
stream->write_function(stream, "%s", "");
return SWITCH_STATUS_SUCCESS;
}
data = strdup(cmd);
switch_assert(data);
argc = switch_separate_string(data, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
if (argc < 2) {
stream->write_function(stream, "%s", "");
return SWITCH_STATUS_SUCCESS;
}
search = argv[0];
if ((p = strchr(argv[1], '/'))) {
profile_name = argv[1];
*p++ = '\0';
user = p;
} else {
user = argv[1];
}
if ((domain = strchr(user, '@'))) {
*domain++ = '\0';
if ((concat = strchr(domain, '/'))) {
*concat++ = '\0';
}
} else {
if ((concat = strchr(user, '/'))) {
*concat++ = '\0';
}
}
if (zstr(domain)) {
dup_domain = switch_core_get_variable_dup("domain");
domain = dup_domain;
}
if (!user) goto end;
if (zstr(profile_name) || strcmp(profile_name, "*") || zstr(domain)) {
if (!zstr(profile_name)) {
profile = sofia_glue_find_profile(profile_name);
}
if (!profile && !zstr(domain)) {
profile = sofia_glue_find_profile(domain);
}
}
if (profile) {
if (zstr(domain)) {
domain = profile->name;
}
if (!zstr(profile->domain_name) && !zstr(profile_name) && !strcmp(profile_name, profile->name)) {
domain = profile->domain_name;
}
get_presence_data(profile, user, domain, search, stream);
sofia_glue_release_profile(profile);
} else if (!zstr(domain)) {
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
switch_hash_index_t *hi;
const void *var;
void *val;
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val) && !strcmp((char *)var, profile->name)) {
get_presence_data(profile, user, domain, search, stream);
profile = NULL;
}
}
}
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
}
if (!strcasecmp(search, "list"))
stream->write_function(stream, "+OK\n");
end:
switch_safe_free(data);
switch_safe_free(dup_domain);
return SWITCH_STATUS_SUCCESS;
}
/* <gateway_name> [ivar|ovar|var] <name> */
SWITCH_STANDARD_API(sofia_gateway_data_function)
{
@ -5885,6 +6066,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
SWITCH_ADD_API(api_interface, "sofia_contact", "Sofia Contacts", sofia_contact_function, "[profile/]<user>@<domain>");
SWITCH_ADD_API(api_interface, "sofia_count_reg", "Count Sofia registration", sofia_count_reg_function, "[profile/]<user>@<domain>");
SWITCH_ADD_API(api_interface, "sofia_dig", "SIP DIG", sip_dig_function, "<url>");
SWITCH_ADD_API(api_interface, "sofia_presence_data", "Sofia Presence Data", sofia_presence_data_function, "[list|status|rpid|user_agent] [profile/]<user>@domain");
SWITCH_ADD_CHAT(chat_interface, SOFIA_CHAT_PROTO, sofia_presence_chat_send);
crtp_init(*module_interface);

View File

@ -4419,9 +4419,20 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
} else if (!strcasecmp(var, "tls")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_TLS);
if (profile->tls_bind_params) {
if (!switch_stristr("transport=tls", profile->tls_bind_params)) {
profile->tls_bind_params = switch_core_sprintf(profile->pool, "%s;transport=tls", profile->tls_bind_params);
}
} else {
profile->tls_bind_params = switch_core_strdup(profile->pool, "transport=tls");
}
}
} else if (!strcasecmp(var, "tls-bind-params")) {
profile->tls_bind_params = switch_core_strdup(profile->pool, val);
if (switch_stristr("transport=tls", val)) {
profile->tls_bind_params = switch_core_strdup(profile->pool, val);
} else {
profile->tls_bind_params = switch_core_sprintf(profile->pool, "%s;transport=tls", val);
}
} else if (!strcasecmp(var, "tls-only")) {
profile->tls_only = switch_true(val);
} else if (!strcasecmp(var, "tls-verify-date")) {
@ -8631,6 +8642,8 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
switch_channel_set_variable(channel, "push_channel_name", "true");
} else if (!strcasecmp(un->un_name, "X-FS-Support")) {
tech_pvt->x_freeswitch_support_remote = switch_core_session_strdup(session, un->un_value);
} else if (!strcasecmp(un->un_name, "Geolocation")) {
switch_channel_set_variable(channel, "sip_geolocation", un->un_value);
} else if (!strncasecmp(un->un_name, "X-", 2) || !strncasecmp(un->un_name, "P-", 2) || !strcasecmp(un->un_name, "User-to-User")) {
if (!zstr(un->un_value)) {
char new_name[512] = "";

View File

@ -652,6 +652,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
}
if (sofia_test_flag(tech_pvt, TFLAG_VIDEO)) {
if (!tech_pvt->local_sdp_video_port) {
sofia_glue_tech_choose_video_port(tech_pvt, 0);
}
@ -861,6 +862,7 @@ void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
if (codec_string) {
char *tmp_codec_string;
switch_channel_set_variable(tech_pvt->channel, "rtp_use_codec_string", codec_string);
if ((tmp_codec_string = switch_core_session_strdup(tech_pvt->session, codec_string))) {
tech_pvt->codec_order_last = switch_separate_string(tmp_codec_string, ',', tech_pvt->codec_order, SWITCH_MAX_CODECS);
tech_pvt->num_codecs =
@ -875,7 +877,7 @@ void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
void sofia_glue_check_video_codecs(private_object_t *tech_pvt)
{
if (tech_pvt->num_codecs && !sofia_test_flag(tech_pvt, TFLAG_VIDEO)) {
if (tech_pvt->num_codecs && !sofia_test_flag(tech_pvt, TFLAG_VIDEO) && !switch_channel_test_flag(tech_pvt->channel, CF_RECOVERING)) {
int i;
tech_pvt->video_count = 0;
for (i = 0; i < tech_pvt->num_codecs; i++) {
@ -2024,6 +2026,10 @@ char *sofia_glue_get_extra_headers(switch_channel_t *channel, const char *prefix
for (; hi; hi = hi->next) {
const char *name = (char *) hi->name;
char *value = (char *) hi->value;
if (!strcasecmp(name, "sip_geolocation")) {
stream.write_function(&stream, "Geolocation: %s\r\n", value);
}
if (!strncasecmp(name, prefix, strlen(prefix))) {
if ( !exclude_regex || !(proceed = switch_regex_perform(name, exclude_regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
@ -5913,6 +5919,13 @@ int sofia_recover_callback(switch_core_session_t *session)
}
}
if ((tmp = switch_channel_get_variable(channel, "rtp_use_codec_string"))) {
char *tmp_codec_string = switch_core_session_strdup(session, tmp);
tech_pvt->codec_order_last = switch_separate_string(tmp_codec_string, ',', tech_pvt->codec_order, SWITCH_MAX_CODECS);
tech_pvt->num_codecs = switch_loadable_module_get_codecs_sorted(tech_pvt->codecs, SWITCH_MAX_CODECS, tech_pvt->codec_order, tech_pvt->codec_order_last);
}
rr = switch_channel_get_variable(channel, "sip_invite_record_route");
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {

View File

@ -25,6 +25,7 @@
*
* Anthony Minessale II <anthm@freeswitch.org>
* Cesar Cepeda <cesar@auronix.com>
* Emmanuel Schmidbauer <e.schmidbauer@gmail.com>
*
*
* mod_local_stream.c -- Local Streaming Audio
@ -38,6 +39,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_local_stream_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_local_stream_shutdown);
SWITCH_MODULE_DEFINITION(mod_local_stream, mod_local_stream_load, mod_local_stream_shutdown, NULL);
static void launch_streams(const char *name);
static void launch_thread(const char *name, const char *path, switch_xml_t directory);
static const char *global_cf = "local_stream.conf";
struct local_stream_source;
@ -82,6 +87,9 @@ struct local_stream_source {
switch_thread_rwlock_t *rwlock;
int ready;
int stopped;
int stop_request;
int part_reload;
int full_reload;
int chime_freq;
int chime_total;
int chime_max;
@ -315,6 +323,64 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
switch_dir_close(source->dir_handle);
source->dir_handle = NULL;
if(source->stop_request||source->full_reload) {
if (source->rwlock && switch_thread_rwlock_trywrlock(source->rwlock) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot stop local_stream://%s because it is in use.\n",source->name);
if (source->part_reload) {
switch_xml_t cfg, xml, directory, param;
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
}
if ((directory = switch_xml_find_child(cfg, "directory", "name", source->name))) {
for (param = switch_xml_child(directory, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "shuffle")) {
source->shuffle = switch_true(val);
} else if (!strcasecmp(var, "chime-freq")) {
int tmp = atoi(val);
if (tmp > 1) {
source->chime_freq = tmp;
}
} else if (!strcasecmp(var, "chime-max")) {
int tmp = atoi(val);
if (tmp > 1) {
source->chime_max = tmp;
}
} else if (!strcasecmp(var, "chime-list")) {
char *list_dup = switch_core_strdup(source->pool, val);
source->chime_total =
switch_separate_string(list_dup, ',', source->chime_list, (sizeof(source->chime_list) / sizeof(source->chime_list[0])));
} else if (!strcasecmp(var, "interval")) {
int tmp = atoi(val);
if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
source->interval = tmp;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"Interval must be multiple of 10 and less than %d, Using default of 20\n", SWITCH_MAX_INTERVAL);
}
}
if (source->chime_max) {
source->chime_max *= source->rate;
}
if (source->chime_total) {
source->chime_counter = source->rate * source->chime_freq;
}
}
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "local_stream://%s partially reloaded.\n",source->name);
source->part_reload = 0;
}
} else if(source->stop_request) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "local_stream://%s stopped.\n",source->name);
source->stopped = 1;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "local_stream://%s fully reloaded.\n",source->name);
launch_streams(source->name);
goto done;
}
}
}
done:
@ -493,114 +559,113 @@ static switch_status_t local_stream_file_read(switch_file_handle_t *handle, void
static char *supported_formats[SWITCH_MAX_CODECS] = { 0 };
static void launch_threads(void)
static void launch_thread(const char *name, const char *path, switch_xml_t directory)
{
char *cf = "local_stream.conf";
switch_xml_t cfg, xml, directory, param;
local_stream_source_t *source = NULL;
switch_memory_pool_t *pool;
local_stream_source_t *source;
switch_xml_t param;
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
return;
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
abort();
}
source = switch_core_alloc(pool, sizeof(*source));
assert(source != NULL);
source->pool = pool;
for (directory = switch_xml_child(cfg, "directory"); directory; directory = directory->next) {
char *path = (char *) switch_xml_attr(directory, "path");
char *name = (char *) switch_xml_attr(directory, "name");
source->name = switch_core_strdup(source->pool, name);
source->location = switch_core_strdup(source->pool, path);
source->rate = 8000;
source->interval = 20;
source->channels = 1;
source->timer_name = "soft";
source->prebuf = DEFAULT_PREBUFFER_SIZE;
source->stopped = 0;
source->chime_freq = 30;
for (param = switch_xml_child(directory, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!(name && path)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid config!\n");
continue;
}
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
abort();
}
source = switch_core_alloc(pool, sizeof(*source));
assert(source != NULL);
source->pool = pool;
source->name = switch_core_strdup(source->pool, name);
source->location = switch_core_strdup(source->pool, path);
source->rate = 8000;
source->interval = 20;
source->channels = 1;
source->timer_name = "soft";
source->prebuf = DEFAULT_PREBUFFER_SIZE;
source->stopped = 0;
source->chime_freq = 30;
for (param = switch_xml_child(directory, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "rate")) {
int tmp = atoi(val);
if (tmp == 8000 || tmp == 12000 || tmp == 16000 || tmp == 24000 || tmp == 32000 || tmp == 48000) {
source->rate = tmp;
}
} else if (!strcasecmp(var, "shuffle")) {
source->shuffle = switch_true(val);
} else if (!strcasecmp(var, "prebuf")) {
int tmp = atoi(val);
if (tmp > 0) {
source->prebuf = (uint32_t) tmp;
}
} else if (!strcasecmp(var, "channels")) {
int tmp = atoi(val);
if (tmp == 1 || tmp == 2) {
source->channels = (uint8_t) tmp;
}
} else if (!strcasecmp(var, "chime-freq")) {
int tmp = atoi(val);
if (tmp > 1) {
source->chime_freq = tmp;
}
} else if (!strcasecmp(var, "chime-max")) {
int tmp = atoi(val);
if (tmp > 1) {
source->chime_max = tmp;
}
} else if (!strcasecmp(var, "chime-list")) {
char *list_dup = switch_core_strdup(source->pool, val);
source->chime_total =
switch_separate_string(list_dup, ',', source->chime_list, (sizeof(source->chime_list) / sizeof(source->chime_list[0])));
} else if (!strcasecmp(var, "interval")) {
int tmp = atoi(val);
if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
source->interval = tmp;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"Interval must be multiple of 10 and less than %d, Using default of 20\n", SWITCH_MAX_INTERVAL);
}
} else if (!strcasecmp(var, "timer-name")) {
source->timer_name = switch_core_strdup(source->pool, val);
if (!strcasecmp(var, "rate")) {
int tmp = atoi(val);
if (tmp == 8000 || tmp == 12000 || tmp == 16000 || tmp == 24000 || tmp == 32000 || tmp == 48000) {
source->rate = tmp;
}
} else if (!strcasecmp(var, "shuffle")) {
source->shuffle = switch_true(val);
} else if (!strcasecmp(var, "prebuf")) {
int tmp = atoi(val);
if (tmp > 0) {
source->prebuf = (uint32_t) tmp;
}
} else if (!strcasecmp(var, "channels")) {
int tmp = atoi(val);
if (tmp == 1 || tmp == 2) {
source->channels = (uint8_t) tmp;
}
} else if (!strcasecmp(var, "chime-freq")) {
int tmp = atoi(val);
if (tmp > 1) {
source->chime_freq = tmp;
}
} else if (!strcasecmp(var, "chime-max")) {
int tmp = atoi(val);
if (tmp > 1) {
source->chime_max = tmp;
}
} else if (!strcasecmp(var, "chime-list")) {
char *list_dup = switch_core_strdup(source->pool, val);
source->chime_total =
switch_separate_string(list_dup, ',', source->chime_list, (sizeof(source->chime_list) / sizeof(source->chime_list[0])));
} else if (!strcasecmp(var, "interval")) {
int tmp = atoi(val);
if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
source->interval = tmp;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"Interval must be multiple of 10 and less than %d, Using default of 20\n", SWITCH_MAX_INTERVAL);
}
} else if (!strcasecmp(var, "timer-name")) {
source->timer_name = switch_core_strdup(source->pool, val);
}
if (source->chime_max) {
source->chime_max *= source->rate;
}
if (source->chime_total) {
source->chime_counter = source->rate * source->chime_freq;
}
source->samples = switch_samples_per_packet(source->rate, source->interval);
switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
switch_threadattr_create(&thd_attr, source->pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&thread, thd_attr, read_stream_thread, source, source->pool);
}
if (source->chime_max) {
source->chime_max *= source->rate;
}
if (source->chime_total) {
source->chime_counter = source->rate * source->chime_freq;
}
source->samples = switch_samples_per_packet(source->rate, source->interval);
switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
switch_threadattr_create(&thd_attr, source->pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&thread, thd_attr, read_stream_thread, source, source->pool);
}
static void launch_streams(const char *name)
{
switch_xml_t cfg, xml, directory;
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
abort();
}
if (zstr(name)) {
for (directory = switch_xml_child(cfg, "directory"); directory; directory = directory->next) {
char *name = (char *) switch_xml_attr(directory, "name");
char *path = (char *) switch_xml_attr(directory, "path");
launch_thread(name, path, directory);
}
} else if ((directory = switch_xml_find_child(cfg, "directory", "name", name))) {
char *path = (char *) switch_xml_attr(directory, "path");
launch_thread(name, path, directory);
}
switch_xml_free(xml);
}
@ -609,6 +674,56 @@ static void event_handler(switch_event_t *event)
RUNNING = 0;
}
#define RELOAD_LOCAL_STREAM_SYNTAX "<local_stream_name>"
SWITCH_STANDARD_API(reload_local_stream_function)
{
local_stream_source_t *source = NULL;
char *mycmd = NULL, *argv[1] = { 0 };
char *local_stream_name = NULL;
int argc = 0;
if (zstr(cmd)) {
goto usage;
}
if (!(mycmd = strdup(cmd))) {
goto usage;
}
if ((argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) < 1) {
goto usage;
}
local_stream_name = argv[0];
if (zstr(local_stream_name)) {
goto usage;
}
switch_mutex_lock(globals.mutex);
source = switch_core_hash_find(globals.source_hash, local_stream_name);
switch_mutex_unlock(globals.mutex);
if (!source) {
stream->write_function(stream, "-ERR Cannot locate local_stream %s!\n", local_stream_name);
goto done;
}
source->full_reload = 1;
source->part_reload = 1;
stream->write_function(stream, "+OK");
goto done;
usage:
stream->write_function(stream, "-USAGE: %s\n", RELOAD_LOCAL_STREAM_SYNTAX);
switch_safe_free(mycmd);
done:
switch_safe_free(mycmd);
return SWITCH_STATUS_SUCCESS;
}
#define STOP_LOCAL_STREAM_SYNTAX "<local_stream_name>"
SWITCH_STANDARD_API(stop_local_stream_function)
{
@ -644,7 +759,7 @@ SWITCH_STANDARD_API(stop_local_stream_function)
goto done;
}
source->stopped = 1;
source->stop_request = 1;
stream->write_function(stream, "+OK");
goto done;
@ -723,7 +838,8 @@ SWITCH_STANDARD_API(show_local_stream_function)
stream->write_function(stream, " total: %d\n", source->total);
stream->write_function(stream, " shuffle: %s\n", (source->shuffle) ? "true" : "false");
stream->write_function(stream, " ready: %s\n", (source->ready) ? "true" : "false");
stream->write_function(stream, " stopped: %s\n", (source->stopped) ? "true" : "false");
stream->write_function(stream, " stopping: %s\n", (source->stop_request) ? "true" : "false");
stream->write_function(stream, " reloading: %s\n", (source->full_reload) ? "true" : "false");
}
} else {
stream->write_function(stream, "-ERR Cannot locate local_stream %s!\n", local_stream_name);
@ -744,23 +860,13 @@ SWITCH_STANDARD_API(show_local_stream_function)
return SWITCH_STATUS_SUCCESS;
}
#define START_LOCAL_STREAM_SYNTAX "<local_stream_name> [<path>] [<rate>] [<shuffle>] [<prebuf>] [<channels>] [<interval>] [<timer_name>]"
#define START_LOCAL_STREAM_SYNTAX "<local_stream_name>"
SWITCH_STANDARD_API(start_local_stream_function)
{
local_stream_source_t *source = NULL;
switch_memory_pool_t *pool;
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
char *mycmd = NULL, *argv[8] = { 0 };
char *local_stream_name = NULL, *path = NULL, *timer_name = NULL, *chime_list = NULL, *list_dup = NULL;
uint32_t prebuf = 1;
int rate = 8000, shuffle = 1, interval = 20, chime_freq = 30;
uint8_t channels = 1;
uint32_t chime_max = 0;
char *local_stream_name = NULL;
int argc = 0;
char *cf = "local_stream.conf";
switch_xml_t cfg, xml, directory, param;
int tmp;
if (zstr(cmd)) {
goto usage;
@ -776,159 +882,19 @@ SWITCH_STANDARD_API(start_local_stream_function)
local_stream_name = argv[0];
if (argv[1]) {
path = strdup(argv[1]);
}
if (argv[2]) {
tmp = atoi(argv[2]);
if (tmp == 8000 || tmp == 16000 || tmp == 32000) {
rate = tmp;
}
}
shuffle = argv[3] ? switch_true(argv[3]) : 1;
prebuf = argv[4] ? atoi(argv[4]) : DEFAULT_PREBUFFER_SIZE;
if (argv[5]) {
tmp = atoi(argv[5]);
if (tmp == 1 || tmp == 2) {
channels = (uint8_t) tmp;
}
}
interval = argv[6] ? atoi(argv[6]) : 20;
if (!SWITCH_ACCEPTABLE_INTERVAL(interval)) {
interval = 20;
}
if (!path) {
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
stream->write_function(stream, "-ERR unable to open file %s!\n", cf);
goto done;
}
for (directory = switch_xml_child(cfg, "directory"); directory; directory = directory->next) {
char *name = (char *) switch_xml_attr(directory, "name");
if (!name || !local_stream_name || strcasecmp(name, local_stream_name)) {
continue;
} else {
path = (char *) switch_xml_attr(directory, "path");
if (!(name && path)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid config!\n");
continue;
}
for (param = switch_xml_child(directory, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "rate")) {
tmp = atoi(val);
if (tmp == 8000 || tmp == 16000 || tmp == 32000) {
rate = tmp;
}
} else if (!strcasecmp(var, "shuffle")) {
shuffle = switch_true(val);
} else if (!strcasecmp(var, "prebuf")) {
tmp = atoi(val);
if (tmp > 0) {
prebuf = (uint32_t) tmp;
}
} else if (!strcasecmp(var, "channels")) {
tmp = atoi(val);
if (tmp == 1 || tmp == 2) {
channels = (uint8_t) tmp;
}
} else if (!strcasecmp(var, "interval")) {
tmp = atoi(val);
if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
interval = tmp;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"Interval must be multiple of 10 and less than %d, Using default of 20\n", SWITCH_MAX_INTERVAL);
}
} else if (!strcasecmp(var, "timer-name")) {
timer_name = strdup(val);
} else if (!strcasecmp(var, "chime-freq")) {
tmp = atoi(val);
if (tmp > 1) {
chime_freq = (uint32_t) tmp;
}
} else if (!strcasecmp(var, "chime-max")) {
tmp = atoi(val);
if (tmp > 1) {
chime_max = (uint32_t) tmp;
}
} else if (!strcasecmp(var, "chime-list")) {
chime_list = val;
}
}
break;
}
}
if (path) {
path = strdup(path);
}
switch_xml_free(xml);
}
if (zstr(local_stream_name) || zstr(path)) {
goto usage;
}
switch_mutex_lock(globals.mutex);
source = switch_core_hash_find(globals.source_hash, local_stream_name);
switch_mutex_unlock(globals.mutex);
if (source) {
source->stopped = 0;
stream->write_function(stream, "+OK stream: %s[%s] %s", source->name, source->location, source->shuffle ? "shuffle" : "no shuffle");
source->stop_request = 0;
stream->write_function(stream, "+OK stream: %s", source->name);
goto done;
}
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool for new local_stream\n");
stream->write_function(stream, "-ERR unable to allocate memory for local_stream %s!\n", local_stream_name);
goto done;
}
launch_streams(local_stream_name);
stream->write_function(stream, "+OK stream: %s", local_stream_name);
source = switch_core_alloc(pool, sizeof(*source));
assert(source != NULL);
source->pool = pool;
source->name = switch_core_strdup(source->pool, local_stream_name);
source->location = switch_core_strdup(source->pool, path);
source->rate = rate;
source->interval = interval;
source->channels = channels;
source->timer_name = switch_core_strdup(source->pool, timer_name ? timer_name : (argv[7] ? argv[7] : "soft"));
list_dup = switch_core_strdup(source->pool, chime_list);
source->chime_total = switch_separate_string(list_dup, ',', source->chime_list, (sizeof(source->chime_list) / sizeof(source->chime_list[0])));
if (source->chime_total) {
source->chime_freq = chime_freq;
if (chime_max) {
source->chime_max = chime_max * source->rate;
}
}
source->chime_counter = source->rate * source->chime_freq;
source->prebuf = prebuf;
source->stopped = 0;
source->shuffle = shuffle;
source->samples = switch_samples_per_packet(source->rate, source->interval);
switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
switch_threadattr_create(&thd_attr, source->pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&thread, thd_attr, read_stream_thread, source, source->pool);
stream->write_function(stream, "+OK stream: %s[%s] %s", source->name, source->location, source->shuffle ? "shuffle" : "no shuffle");
goto done;
usage:
@ -936,8 +902,6 @@ SWITCH_STANDARD_API(start_local_stream_function)
done:
switch_safe_free(path);
switch_safe_free(timer_name);
switch_safe_free(mycmd);
return SWITCH_STATUS_SUCCESS;
}
@ -963,8 +927,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_local_stream_load)
memset(&globals, 0, sizeof(globals));
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, pool);
switch_core_hash_init(&globals.source_hash, pool);
launch_threads();
launch_streams(NULL);
SWITCH_ADD_API(commands_api_interface, "reload_local_stream", "Reloads a local_stream", reload_local_stream_function, RELOAD_LOCAL_STREAM_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "stop_local_stream", "Stops and unloads a local_stream", stop_local_stream_function, STOP_LOCAL_STREAM_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "start_local_stream", "Starts a new local_stream", start_local_stream_function, START_LOCAL_STREAM_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "show_local_stream", "Shows a local stream", show_local_stream_function, SHOW_LOCAL_STREAM_SYNTAX);

View File

@ -1130,6 +1130,26 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_SENSITIVE_DTMF_VARIABLE_get() {
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *)("record_post_process_exec_app");
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *)("record_post_process_exec_api");
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -1210,6 +1230,26 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VAR
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *)("execute_on_pre_bridge");
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *)("execute_on_post_bridge");
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -1330,6 +1370,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_API_BRIDGE_END_VARIABLE_get() {
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_API_BRIDGE_START_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *)("api_before_bridge");
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_API_HANGUP_HOOK_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -7337,6 +7387,24 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_transfer_recordings(void
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_transfer_callback(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
switch_media_bug_callback_t arg3 = (switch_media_bug_callback_t) 0 ;
void *(*arg4)(switch_core_session_t *,void *) = (void *(*)(switch_core_session_t *,void *)) 0 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (switch_core_session_t *)jarg2;
arg3 = (switch_media_bug_callback_t)jarg3;
arg4 = (void *(*)(switch_core_session_t *,void *))jarg4;
result = (switch_status_t)switch_core_media_bug_transfer_callback(arg1,arg2,arg3,arg4);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_read(void * jarg1, void * jarg2, int jarg3) {
int jresult ;
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
@ -8405,6 +8473,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_set_variable(char * jarg1, char *
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_get_variables(void * jarg1) {
int jresult ;
switch_event_t **arg1 = (switch_event_t **) 0 ;
switch_status_t result;
arg1 = (switch_event_t **)jarg1;
result = (switch_status_t)switch_core_get_variables(arg1);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_set_var_conditional(char * jarg1, char * jarg2, char * jarg3) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -8469,6 +8549,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_findall_matching_var(ch
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_findall() {
void * jresult ;
switch_console_callback_match_t *result = 0 ;
result = (switch_console_callback_match_t *)switch_core_session_findall();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_hupall_endpoint(void * jarg1, int jarg2) {
switch_endpoint_interface_t *arg1 = (switch_endpoint_interface_t *) 0 ;
switch_call_cause_t arg2 ;
@ -12004,6 +12094,20 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(char * jarg1, u
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_rate(char * jarg1, unsigned long jarg2) {
unsigned long jresult ;
char *arg1 = (char *) 0 ;
uint32_t arg2 ;
uint32_t result;
arg1 = (char *)jarg1;
arg2 = (uint32_t)jarg2;
result = (uint32_t)switch_default_rate((char const *)arg1,arg2);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, char * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -14798,6 +14902,19 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_string_match(char * jarg1, unsigned lon
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_strcasecmp_any(char * jarg1) {
int jresult ;
char *arg1 = (char *) 0 ;
void *arg2 = 0 ;
int result;
arg1 = (char *)jarg1;
result = (int)switch_strcasecmp_any((char const *)arg1,arg2);
jresult = result;
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_util_quote_shell_arg(char * jarg1) {
char * jresult ;
char *arg1 = (char *) 0 ;
@ -15418,6 +15535,64 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_caller_id_number_get(
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_name_set(void * jarg1, char * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *arg2 = (char *) 0 ;
arg1 = (switch_caller_profile *)jarg1;
arg2 = (char *)jarg2;
{
if (arg2) {
arg1->orig_caller_id_name = (char const *) (new char[strlen((const char *)arg2)+1]);
strcpy((char *)arg1->orig_caller_id_name, (const char *)arg2);
} else {
arg1->orig_caller_id_name = 0;
}
}
}
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_name_get(void * jarg1) {
char * jresult ;
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *result = 0 ;
arg1 = (switch_caller_profile *)jarg1;
result = (char *) ((arg1)->orig_caller_id_name);
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_number_set(void * jarg1, char * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *arg2 = (char *) 0 ;
arg1 = (switch_caller_profile *)jarg1;
arg2 = (char *)jarg2;
{
if (arg2) {
arg1->orig_caller_id_number = (char const *) (new char[strlen((const char *)arg2)+1]);
strcpy((char *)arg1->orig_caller_id_number, (const char *)arg2);
} else {
arg1->orig_caller_id_number = 0;
}
}
}
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_number_get(void * jarg1) {
char * jresult ;
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *result = 0 ;
arg1 = (switch_caller_profile *)jarg1;
result = (char *) ((arg1)->orig_caller_id_number);
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_callee_id_name_set(void * jarg1, char * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *arg2 = (char *) 0 ;
@ -26003,6 +26178,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_caller_profile(void * jarg
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_step_caller_profile(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
arg1 = (switch_channel_t *)jarg1;
switch_channel_step_caller_profile(arg1);
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_channel_get_caller_profile(void * jarg1) {
void * jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
@ -26261,6 +26444,22 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_channel_del_variable_prefix(v
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_transfer_variable_prefix(void * jarg1, void * jarg2, char * jarg3) {
int jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_channel_t *arg2 = (switch_channel_t *) 0 ;
char *arg3 = (char *) 0 ;
switch_status_t result;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_channel_t *)jarg2;
arg3 = (char *)jarg3;
result = (switch_status_t)switch_channel_transfer_variable_prefix(arg1,arg2,(char const *)arg3);
jresult = 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 ;
@ -26438,6 +26637,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_caller_extension(void * ja
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_invert_cid(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
arg1 = (switch_channel_t *)jarg1;
switch_channel_invert_cid(arg1);
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_flip_cid(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
@ -26446,13 +26653,11 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_flip_cid(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_sort_cid(void * jarg1, int jarg2) {
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_sort_cid(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_bool_t arg2 ;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_bool_t)jarg2;
switch_channel_sort_cid(arg1,arg2);
switch_channel_sort_cid(arg1);
}
@ -30422,6 +30627,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_session(void * jarg1, char *
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_transfer_recordings(void * jarg1, void * jarg2) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (switch_core_session_t *)jarg2;
result = (switch_status_t)switch_ivr_transfer_recordings(arg1,arg2);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_pop_eavesdropper(void * jarg1, void * jarg2) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
@ -31076,6 +31295,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_hold_uuid(char * jarg1, char * jarg
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_hold_toggle_uuid(char * jarg1, char * jarg2, int jarg3) {
int jresult ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
switch_bool_t arg3 ;
switch_status_t result;
arg1 = (char *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_bool_t)jarg3;
result = (switch_status_t)switch_ivr_hold_toggle_uuid((char const *)arg1,(char const *)arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_unhold_uuid(char * jarg1) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -32210,6 +32445,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_blind_transfer_ack(void * jarg1, in
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_session_mask(void * jarg1, char * jarg2, int jarg3) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ;
switch_bool_t arg3 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_bool_t)jarg3;
result = (switch_status_t)switch_ivr_record_session_mask(arg1,(char const *)arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
int jresult ;
int result;

View File

@ -1190,6 +1190,39 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_TRANSFER_SOURCE_VARIABLE_get() {
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_SENSITIVE_DTMF_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "sensitive_dtmf";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "record_post_process_exec_app";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "record_post_process_exec_api";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -1278,6 +1311,28 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VAR
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "execute_on_pre_bridge";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "execute_on_post_bridge";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -1410,6 +1465,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_API_BRIDGE_END_VARIABLE_get() {
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_API_BRIDGE_START_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "api_before_bridge";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_API_HANGUP_HOOK_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -7437,6 +7503,30 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_write_replace_fra
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_native_read_frame(void * jarg1) {
void * jresult ;
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
switch_frame_t *result = 0 ;
arg1 = (switch_media_bug_t *)jarg1;
result = (switch_frame_t *)switch_core_media_bug_get_native_read_frame(arg1);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_native_write_frame(void * jarg1) {
void * jresult ;
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
switch_frame_t *result = 0 ;
arg1 = (switch_media_bug_t *)jarg1;
result = (switch_frame_t *)switch_core_media_bug_get_native_write_frame(arg1);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_media_bug_set_write_replace_frame(void * jarg1, void * jarg2) {
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
switch_frame_t *arg2 = (switch_frame_t *) 0 ;
@ -7637,6 +7727,24 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_transfer_recordings(void
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_transfer_callback(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
switch_media_bug_callback_t arg3 = (switch_media_bug_callback_t) 0 ;
void *(*arg4)(switch_core_session_t *,void *) = (void *(*)(switch_core_session_t *,void *)) 0 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (switch_core_session_t *)jarg2;
arg3 = (switch_media_bug_callback_t)jarg3;
arg4 = (void *(*)(switch_core_session_t *,void *))jarg4;
result = (switch_status_t)switch_core_media_bug_transfer_callback(arg1,arg2,arg3,arg4);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_read(void * jarg1, void * jarg2, int jarg3) {
int jresult ;
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
@ -8705,6 +8813,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_set_variable(char * jarg1, char *
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_get_variables(void * jarg1) {
int jresult ;
switch_event_t **arg1 = (switch_event_t **) 0 ;
switch_status_t result;
arg1 = (switch_event_t **)jarg1;
result = (switch_status_t)switch_core_get_variables(arg1);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_set_var_conditional(char * jarg1, char * jarg2, char * jarg3) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -8769,6 +8889,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_findall_matching_var(ch
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_findall() {
void * jresult ;
switch_console_callback_match_t *result = 0 ;
result = (switch_console_callback_match_t *)switch_core_session_findall();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_hupall_endpoint(void * jarg1, int jarg2) {
switch_endpoint_interface_t *arg1 = (switch_endpoint_interface_t *) 0 ;
switch_call_cause_t arg2 ;
@ -12316,6 +12446,20 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(char * jarg1, u
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_rate(char * jarg1, unsigned long jarg2) {
unsigned long jresult ;
char *arg1 = (char *) 0 ;
uint32_t arg2 ;
uint32_t result;
arg1 = (char *)jarg1;
arg2 = (uint32_t)jarg2;
result = (uint32_t)switch_default_rate((char const *)arg1,arg2);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, char * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -15135,6 +15279,19 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_string_match(char * jarg1, unsigned lon
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_strcasecmp_any(char * jarg1) {
int jresult ;
char *arg1 = (char *) 0 ;
void *arg2 = 0 ;
int result;
arg1 = (char *)jarg1;
result = (int)switch_strcasecmp_any((char const *)arg1,arg2);
jresult = result;
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_util_quote_shell_arg(char * jarg1) {
char * jresult ;
char *arg1 = (char *) 0 ;
@ -15757,6 +15914,64 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_caller_id_number_get(
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_name_set(void * jarg1, char * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *arg2 = (char *) 0 ;
arg1 = (switch_caller_profile *)jarg1;
arg2 = (char *)jarg2;
{
if (arg2) {
arg1->orig_caller_id_name = (char const *) (new char[strlen((const char *)arg2)+1]);
strcpy((char *)arg1->orig_caller_id_name, (const char *)arg2);
} else {
arg1->orig_caller_id_name = 0;
}
}
}
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_name_get(void * jarg1) {
char * jresult ;
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *result = 0 ;
arg1 = (switch_caller_profile *)jarg1;
result = (char *) ((arg1)->orig_caller_id_name);
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_number_set(void * jarg1, char * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *arg2 = (char *) 0 ;
arg1 = (switch_caller_profile *)jarg1;
arg2 = (char *)jarg2;
{
if (arg2) {
arg1->orig_caller_id_number = (char const *) (new char[strlen((const char *)arg2)+1]);
strcpy((char *)arg1->orig_caller_id_number, (const char *)arg2);
} else {
arg1->orig_caller_id_number = 0;
}
}
}
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_orig_caller_id_number_get(void * jarg1) {
char * jresult ;
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *result = 0 ;
arg1 = (switch_caller_profile *)jarg1;
result = (char *) ((arg1)->orig_caller_id_number);
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_callee_id_name_set(void * jarg1, char * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
char *arg2 = (char *) 0 ;
@ -20844,6 +21059,52 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_file_handle_prefix_get(void * jarg1)
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_file_handle_max_samples_set(void * jarg1, int jarg2) {
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
int arg2 ;
arg1 = (switch_file_handle *)jarg1;
arg2 = (int)jarg2;
if (arg1) (arg1)->max_samples = arg2;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_file_handle_max_samples_get(void * jarg1) {
int jresult ;
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
int result;
arg1 = (switch_file_handle *)jarg1;
result = (int) ((arg1)->max_samples);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_file_handle_params_set(void * jarg1, void * jarg2) {
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
switch_event_t *arg2 = (switch_event_t *) 0 ;
arg1 = (switch_file_handle *)jarg1;
arg2 = (switch_event_t *)jarg2;
if (arg1) (arg1)->params = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_file_handle_params_get(void * jarg1) {
void * jresult ;
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
switch_event_t *result = 0 ;
arg1 = (switch_file_handle *)jarg1;
result = (switch_event_t *) ((arg1)->params);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_file_handle() {
void * jresult ;
switch_file_handle *result = 0 ;
@ -26663,6 +26924,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_caller_profile(void * jarg
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_step_caller_profile(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
arg1 = (switch_channel_t *)jarg1;
switch_channel_step_caller_profile(arg1);
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_channel_get_caller_profile(void * jarg1) {
void * jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
@ -26921,6 +27190,22 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_channel_del_variable_prefix(v
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_transfer_variable_prefix(void * jarg1, void * jarg2, char * jarg3) {
int jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_channel_t *arg2 = (switch_channel_t *) 0 ;
char *arg3 = (char *) 0 ;
switch_status_t result;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_channel_t *)jarg2;
arg3 = (char *)jarg3;
result = (switch_status_t)switch_channel_transfer_variable_prefix(arg1,arg2,(char const *)arg3);
jresult = 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 ;
@ -27098,6 +27383,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_caller_extension(void * ja
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_invert_cid(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
arg1 = (switch_channel_t *)jarg1;
switch_channel_invert_cid(arg1);
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_flip_cid(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
@ -27106,13 +27399,11 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_flip_cid(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_sort_cid(void * jarg1, int jarg2) {
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_sort_cid(void * jarg1) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_bool_t arg2 ;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_bool_t)jarg2;
switch_channel_sort_cid(arg1,arg2);
switch_channel_sort_cid(arg1);
}
@ -28082,6 +28373,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_state_thread_unlock(void * jar
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_state_thread_trylock(void * jarg1) {
int jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_status_t result;
arg1 = (switch_channel_t *)jarg1;
result = (switch_status_t)switch_channel_state_thread_trylock(arg1);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_buffer_create(void * jarg1, void * jarg2, void * jarg3) {
int jresult ;
switch_memory_pool_t *arg1 = (switch_memory_pool_t *) 0 ;
@ -31114,6 +31417,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_session(void * jarg1, char *
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_transfer_recordings(void * jarg1, void * jarg2) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (switch_core_session_t *)jarg2;
result = (switch_status_t)switch_ivr_transfer_recordings(arg1,arg2);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_pop_eavesdropper(void * jarg1, void * jarg2) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
@ -31768,6 +32085,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_hold_uuid(char * jarg1, char * jarg
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_hold_toggle_uuid(char * jarg1, char * jarg2, int jarg3) {
int jresult ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
switch_bool_t arg3 ;
switch_status_t result;
arg1 = (char *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_bool_t)jarg3;
result = (switch_status_t)switch_ivr_hold_toggle_uuid((char const *)arg1,(char const *)arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_unhold_uuid(char * jarg1) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -32902,6 +33235,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_blind_transfer_ack(void * jarg1, in
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_session_mask(void * jarg1, char * jarg2, int jarg3) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ;
switch_bool_t arg3 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_bool_t)jarg3;
result = (switch_status_t)switch_ivr_record_session_mask(arg1,(char const *)arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
int jresult ;
int result;

View File

@ -1220,6 +1220,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_core_media_bug_transfer_callback(SWIGTYPE_p_switch_core_session orig_session, SWIGTYPE_p_switch_core_session new_session, SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t callback, SWIGTYPE_p_f_p_switch_core_session_p_void__p_void user_data_dup_func) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_transfer_callback(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), SWIGTYPE_p_switch_core_session.getCPtr(new_session), SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t.getCPtr(callback), SWIGTYPE_p_f_p_switch_core_session_p_void__p_void.getCPtr(user_data_dup_func));
return ret;
}
public static switch_status_t switch_core_media_bug_read(SWIGTYPE_p_switch_media_bug bug, switch_frame frame, switch_bool_t fill) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_read(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame), (int)fill);
return ret;
@ -1630,6 +1635,11 @@ public class freeswitch {
freeswitchPINVOKE.switch_core_set_variable(varname, value);
}
public static switch_status_t switch_core_get_variables(SWIGTYPE_p_p_switch_event arg0) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_get_variables(SWIGTYPE_p_p_switch_event.getCPtr(arg0));
return ret;
}
public static switch_bool_t switch_core_set_var_conditional(string varname, string value, string val2) {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_core_set_var_conditional(varname, value, val2);
return ret;
@ -1654,6 +1664,12 @@ public class freeswitch {
return ret;
}
public static switch_console_callback_match switch_core_session_findall() {
IntPtr cPtr = freeswitchPINVOKE.switch_core_session_findall();
switch_console_callback_match ret = (cPtr == IntPtr.Zero) ? null : new switch_console_callback_match(cPtr, false);
return ret;
}
public static void switch_core_session_hupall_endpoint(switch_endpoint_interface endpoint_interface, switch_call_cause_t cause) {
freeswitchPINVOKE.switch_core_session_hupall_endpoint(switch_endpoint_interface.getCPtr(endpoint_interface), (int)cause);
}
@ -2798,6 +2814,11 @@ public class freeswitch {
return ret;
}
public static uint switch_default_rate(string name, uint number) {
uint ret = freeswitchPINVOKE.switch_default_rate(name, number);
return ret;
}
public static switch_status_t switch_core_add_registration(string user, string realm, string token, string url, uint expires, string network_ip, string network_port, string network_proto, string metadata) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_add_registration(user, realm, token, url, expires, network_ip, network_port, network_proto, metadata);
return ret;
@ -3597,6 +3618,11 @@ public class freeswitch {
return ret;
}
public static int switch_strcasecmp_any(string str) {
int ret = freeswitchPINVOKE.switch_strcasecmp_any(str);
return ret;
}
public static string switch_util_quote_shell_arg(string arg0) {
string ret = freeswitchPINVOKE.switch_util_quote_shell_arg(arg0);
return ret;
@ -3876,6 +3902,10 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_set_caller_profile(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_caller_profile.getCPtr(caller_profile));
}
public static void switch_channel_step_caller_profile(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_step_caller_profile(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static switch_caller_profile switch_channel_get_caller_profile(SWIGTYPE_p_switch_channel channel) {
IntPtr cPtr = freeswitchPINVOKE.switch_channel_get_caller_profile(SWIGTYPE_p_switch_channel.getCPtr(channel));
switch_caller_profile ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_profile(cPtr, false);
@ -3971,6 +4001,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_channel_transfer_variable_prefix(SWIGTYPE_p_switch_channel orig_channel, SWIGTYPE_p_switch_channel new_channel, string prefix) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_transfer_variable_prefix(SWIGTYPE_p_switch_channel.getCPtr(orig_channel), SWIGTYPE_p_switch_channel.getCPtr(new_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;
@ -4032,12 +4067,16 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_set_caller_extension(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_caller_extension.getCPtr(caller_extension));
}
public static void switch_channel_invert_cid(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_invert_cid(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static void switch_channel_flip_cid(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_flip_cid(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static void switch_channel_sort_cid(SWIGTYPE_p_switch_channel channel, switch_bool_t arg1) {
freeswitchPINVOKE.switch_channel_sort_cid(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)arg1);
public static void switch_channel_sort_cid(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_sort_cid(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static switch_caller_extension switch_channel_get_caller_extension(SWIGTYPE_p_switch_channel channel) {
@ -4928,6 +4967,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_transfer_recordings(SWIGTYPE_p_switch_core_session orig_session, SWIGTYPE_p_switch_core_session new_session) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_transfer_recordings(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), SWIGTYPE_p_switch_core_session.getCPtr(new_session));
return ret;
}
public static switch_status_t switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_core_session sessionp) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_core_session.getCPtr(sessionp));
return ret;
@ -5109,6 +5153,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_hold_toggle_uuid(string uuid, string message, switch_bool_t moh) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_hold_toggle_uuid(uuid, message, (int)moh);
return ret;
}
public static switch_status_t switch_ivr_unhold_uuid(string uuid) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_unhold_uuid(uuid);
return ret;
@ -5470,6 +5519,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_record_session_mask(SWIGTYPE_p_switch_core_session session, string file, switch_bool_t on) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_record_session_mask(SWIGTYPE_p_switch_core_session.getCPtr(session), file, (int)on);
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();
@ -6413,6 +6467,8 @@ public class freeswitch {
public static readonly string SWITCH_TRANSFER_HISTORY_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_HISTORY_VARIABLE_get();
public static readonly string SWITCH_TRANSFER_SOURCE_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_SOURCE_VARIABLE_get();
public static readonly string SWITCH_SENSITIVE_DTMF_VARIABLE = freeswitchPINVOKE.SWITCH_SENSITIVE_DTMF_VARIABLE_get();
public static readonly string SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE = freeswitchPINVOKE.SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get();
public static readonly string SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE = freeswitchPINVOKE.SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE_get();
@ -6421,6 +6477,8 @@ public class freeswitch {
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE_get();
@ -6433,6 +6491,7 @@ public class freeswitch {
public static readonly string SWITCH_HOLDING_UUID_VARIABLE = freeswitchPINVOKE.SWITCH_HOLDING_UUID_VARIABLE_get();
public static readonly string SWITCH_SOFT_HOLDING_UUID_VARIABLE = freeswitchPINVOKE.SWITCH_SOFT_HOLDING_UUID_VARIABLE_get();
public static readonly string SWITCH_API_BRIDGE_END_VARIABLE = freeswitchPINVOKE.SWITCH_API_BRIDGE_END_VARIABLE_get();
public static readonly string SWITCH_API_BRIDGE_START_VARIABLE = freeswitchPINVOKE.SWITCH_API_BRIDGE_START_VARIABLE_get();
public static readonly string SWITCH_API_HANGUP_HOOK_VARIABLE = freeswitchPINVOKE.SWITCH_API_HANGUP_HOOK_VARIABLE_get();
public static readonly string SWITCH_API_REPORTING_HOOK_VARIABLE = freeswitchPINVOKE.SWITCH_API_REPORTING_HOOK_VARIABLE_get();
public static readonly string SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE = freeswitchPINVOKE.SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE_get();
@ -6990,6 +7049,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_SENSITIVE_DTMF_VARIABLE_get")]
public static extern string SWITCH_SENSITIVE_DTMF_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get")]
public static extern string SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get")]
public static extern string SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
@ -7014,6 +7079,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get();
@ -7050,6 +7121,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_API_BRIDGE_END_VARIABLE_get")]
public static extern string SWITCH_API_BRIDGE_END_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_API_BRIDGE_START_VARIABLE_get")]
public static extern string SWITCH_API_BRIDGE_START_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_API_HANGUP_HOOK_VARIABLE_get")]
public static extern string SWITCH_API_HANGUP_HOOK_VARIABLE_get();
@ -8595,6 +8669,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_transfer_recordings")]
public static extern int switch_core_media_bug_transfer_recordings(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_transfer_callback")]
public static extern int switch_core_media_bug_transfer_callback(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_read")]
public static extern int switch_core_media_bug_read(HandleRef jarg1, HandleRef jarg2, int jarg3);
@ -8841,6 +8918,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_set_variable")]
public static extern void switch_core_set_variable(string jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_get_variables")]
public static extern int switch_core_get_variables(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_set_var_conditional")]
public static extern int switch_core_set_var_conditional(string jarg1, string jarg2, string jarg3);
@ -8856,6 +8936,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_findall_matching_var")]
public static extern IntPtr switch_core_session_findall_matching_var(string jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_findall")]
public static extern IntPtr switch_core_session_findall();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_hupall_endpoint")]
public static extern void switch_core_session_hupall_endpoint(HandleRef jarg1, int jarg2);
@ -9654,6 +9737,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_default_ptime")]
public static extern uint switch_default_ptime(string jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_default_rate")]
public static extern uint switch_default_rate(string jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_add_registration")]
public static extern int switch_core_add_registration(string jarg1, string jarg2, string jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, string jarg9);
@ -10275,6 +10361,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_string_match")]
public static extern int switch_string_match(string jarg1, uint jarg2, string jarg3, uint jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_strcasecmp_any")]
public static extern int switch_strcasecmp_any(string jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_util_quote_shell_arg")]
public static extern string switch_util_quote_shell_arg(string jarg1);
@ -10401,6 +10490,18 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_caller_id_number_get")]
public static extern string switch_caller_profile_caller_id_number_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_name_set")]
public static extern void switch_caller_profile_orig_caller_id_name_set(HandleRef jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_name_get")]
public static extern string switch_caller_profile_orig_caller_id_name_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_number_set")]
public static extern void switch_caller_profile_orig_caller_id_number_set(HandleRef jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_number_get")]
public static extern string switch_caller_profile_orig_caller_id_number_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_callee_id_name_set")]
public static extern void switch_caller_profile_callee_id_name_set(HandleRef jarg1, string jarg2);
@ -13125,6 +13226,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_caller_profile")]
public static extern void switch_channel_set_caller_profile(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_step_caller_profile")]
public static extern void switch_channel_step_caller_profile(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_caller_profile")]
public static extern IntPtr switch_channel_get_caller_profile(HandleRef jarg1);
@ -13182,6 +13286,9 @@ class freeswitchPINVOKE {
[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_transfer_variable_prefix")]
public static extern int switch_channel_transfer_variable_prefix(HandleRef jarg1, HandleRef jarg2, string jarg3);
[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);
@ -13221,11 +13328,14 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_caller_extension")]
public static extern void switch_channel_set_caller_extension(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_invert_cid")]
public static extern void switch_channel_invert_cid(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_flip_cid")]
public static extern void switch_channel_flip_cid(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_sort_cid")]
public static extern void switch_channel_sort_cid(HandleRef jarg1, int jarg2);
public static extern void switch_channel_sort_cid(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_caller_extension")]
public static extern IntPtr switch_channel_get_caller_extension(HandleRef jarg1);
@ -14112,6 +14222,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_record_session")]
public static extern int switch_ivr_record_session(HandleRef jarg1, string jarg2, uint jarg3, HandleRef jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_transfer_recordings")]
public static extern int switch_ivr_transfer_recordings(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_pop_eavesdropper")]
public static extern int switch_ivr_eavesdrop_pop_eavesdropper(HandleRef jarg1, HandleRef jarg2);
@ -14220,6 +14333,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_hold_uuid")]
public static extern int switch_ivr_hold_uuid(string jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_hold_toggle_uuid")]
public static extern int switch_ivr_hold_toggle_uuid(string jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_unhold_uuid")]
public static extern int switch_ivr_unhold_uuid(string jarg1);
@ -14439,6 +14555,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_blind_transfer_ack")]
public static extern int switch_ivr_blind_transfer_ack(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_record_session_mask")]
public static extern int switch_ivr_record_session_mask(HandleRef jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
@ -17811,6 +17930,36 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_f_p_switch_core_session_p_void__p_void {
private HandleRef swigCPtr;
internal SWIGTYPE_p_f_p_switch_core_session_p_void__p_void(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_f_p_switch_core_session_p_void__p_void() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_core_session_p_void__p_void obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_f_p_switch_core_session_t_p_void_p_switch_caller_profile_t__p_switch_caller_extension {
private HandleRef swigCPtr;
@ -23880,6 +24029,26 @@ public class switch_caller_profile : IDisposable {
}
}
public string orig_caller_id_name {
set {
freeswitchPINVOKE.switch_caller_profile_orig_caller_id_name_set(swigCPtr, value);
}
get {
string ret = freeswitchPINVOKE.switch_caller_profile_orig_caller_id_name_get(swigCPtr);
return ret;
}
}
public string orig_caller_id_number {
set {
freeswitchPINVOKE.switch_caller_profile_orig_caller_id_number_set(swigCPtr, value);
}
get {
string ret = freeswitchPINVOKE.switch_caller_profile_orig_caller_id_number_get(swigCPtr);
return ret;
}
}
public string callee_id_name {
set {
freeswitchPINVOKE.switch_caller_profile_callee_id_name_set(swigCPtr, value);
@ -24494,6 +24663,7 @@ public enum switch_channel_flag_t {
CF_JITTERBUFFER,
CF_JITTERBUFFER_PLC,
CF_DIALPLAN,
CF_BLEG,
CF_BLOCK_BROADCAST_UNTIL_MEDIA,
CF_CNG_PLC,
CF_ATTENDED_TRANSFER,
@ -31557,7 +31727,9 @@ namespace FreeSWITCH.Native {
SMBF_STEREO_SWAP = (1 << 11),
SMBF_LOCK = (1 << 12),
SMBF_TAP_NATIVE_READ = (1 << 13),
SMBF_TAP_NATIVE_WRITE = (1 << 14)
SMBF_TAP_NATIVE_WRITE = (1 << 14),
SMBF_ONE_ONLY = (1 << 15),
SMBF_MASK = (1 << 16)
}
}

View File

@ -596,7 +596,8 @@ public class DTMF : IDisposable {
namespace FreeSWITCH.Native {
public enum dtmf_flag_t {
DTMF_FLAG_SKIP_PROCESS = (1 << 0)
DTMF_FLAG_SKIP_PROCESS = (1 << 0),
DTMF_FLAG_SENSITIVE = (1 << 1)
}
}
@ -1116,6 +1117,18 @@ public class freeswitch {
return ret;
}
public static switch_frame switch_core_media_bug_get_native_read_frame(SWIGTYPE_p_switch_media_bug bug) {
IntPtr cPtr = freeswitchPINVOKE.switch_core_media_bug_get_native_read_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug));
switch_frame ret = (cPtr == IntPtr.Zero) ? null : new switch_frame(cPtr, false);
return ret;
}
public static switch_frame switch_core_media_bug_get_native_write_frame(SWIGTYPE_p_switch_media_bug bug) {
IntPtr cPtr = freeswitchPINVOKE.switch_core_media_bug_get_native_write_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug));
switch_frame ret = (cPtr == IntPtr.Zero) ? null : new switch_frame(cPtr, false);
return ret;
}
public static void switch_core_media_bug_set_write_replace_frame(SWIGTYPE_p_switch_media_bug bug, switch_frame frame) {
freeswitchPINVOKE.switch_core_media_bug_set_write_replace_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame));
}
@ -1195,6 +1208,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_core_media_bug_transfer_callback(SWIGTYPE_p_switch_core_session orig_session, SWIGTYPE_p_switch_core_session new_session, SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t callback, SWIGTYPE_p_f_p_switch_core_session_p_void__p_void user_data_dup_func) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_transfer_callback(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), SWIGTYPE_p_switch_core_session.getCPtr(new_session), SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t.getCPtr(callback), SWIGTYPE_p_f_p_switch_core_session_p_void__p_void.getCPtr(user_data_dup_func));
return ret;
}
public static switch_status_t switch_core_media_bug_read(SWIGTYPE_p_switch_media_bug bug, switch_frame frame, switch_bool_t fill) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_read(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame), (int)fill);
return ret;
@ -1605,6 +1623,11 @@ public class freeswitch {
freeswitchPINVOKE.switch_core_set_variable(varname, value);
}
public static switch_status_t switch_core_get_variables(SWIGTYPE_p_p_switch_event arg0) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_get_variables(SWIGTYPE_p_p_switch_event.getCPtr(arg0));
return ret;
}
public static switch_bool_t switch_core_set_var_conditional(string varname, string value, string val2) {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_core_set_var_conditional(varname, value, val2);
return ret;
@ -1629,6 +1652,12 @@ public class freeswitch {
return ret;
}
public static switch_console_callback_match switch_core_session_findall() {
IntPtr cPtr = freeswitchPINVOKE.switch_core_session_findall();
switch_console_callback_match ret = (cPtr == IntPtr.Zero) ? null : new switch_console_callback_match(cPtr, false);
return ret;
}
public static void switch_core_session_hupall_endpoint(switch_endpoint_interface endpoint_interface, switch_call_cause_t cause) {
freeswitchPINVOKE.switch_core_session_hupall_endpoint(switch_endpoint_interface.getCPtr(endpoint_interface), (int)cause);
}
@ -2773,6 +2802,11 @@ public class freeswitch {
return ret;
}
public static uint switch_default_rate(string name, uint number) {
uint ret = freeswitchPINVOKE.switch_default_rate(name, number);
return ret;
}
public static switch_status_t switch_core_add_registration(string user, string realm, string token, string url, uint expires, string network_ip, string network_port, string network_proto, string metadata) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_add_registration(user, realm, token, url, expires, network_ip, network_port, network_proto, metadata);
return ret;
@ -3572,6 +3606,11 @@ public class freeswitch {
return ret;
}
public static int switch_strcasecmp_any(string str) {
int ret = freeswitchPINVOKE.switch_strcasecmp_any(str);
return ret;
}
public static string switch_util_quote_shell_arg(string arg0) {
string ret = freeswitchPINVOKE.switch_util_quote_shell_arg(arg0);
return ret;
@ -3851,6 +3890,10 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_set_caller_profile(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_caller_profile.getCPtr(caller_profile));
}
public static void switch_channel_step_caller_profile(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_step_caller_profile(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static switch_caller_profile switch_channel_get_caller_profile(SWIGTYPE_p_switch_channel channel) {
IntPtr cPtr = freeswitchPINVOKE.switch_channel_get_caller_profile(SWIGTYPE_p_switch_channel.getCPtr(channel));
switch_caller_profile ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_profile(cPtr, false);
@ -3946,6 +3989,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_channel_transfer_variable_prefix(SWIGTYPE_p_switch_channel orig_channel, SWIGTYPE_p_switch_channel new_channel, string prefix) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_transfer_variable_prefix(SWIGTYPE_p_switch_channel.getCPtr(orig_channel), SWIGTYPE_p_switch_channel.getCPtr(new_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;
@ -4007,12 +4055,16 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_set_caller_extension(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_caller_extension.getCPtr(caller_extension));
}
public static void switch_channel_invert_cid(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_invert_cid(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static void switch_channel_flip_cid(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_flip_cid(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static void switch_channel_sort_cid(SWIGTYPE_p_switch_channel channel, switch_bool_t arg1) {
freeswitchPINVOKE.switch_channel_sort_cid(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)arg1);
public static void switch_channel_sort_cid(SWIGTYPE_p_switch_channel channel) {
freeswitchPINVOKE.switch_channel_sort_cid(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static switch_caller_extension switch_channel_get_caller_extension(SWIGTYPE_p_switch_channel channel) {
@ -4372,6 +4424,11 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_state_thread_unlock(SWIGTYPE_p_switch_channel.getCPtr(channel));
}
public static switch_status_t switch_channel_state_thread_trylock(SWIGTYPE_p_switch_channel channel) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_state_thread_trylock(SWIGTYPE_p_switch_channel.getCPtr(channel));
return ret;
}
public static switch_status_t switch_buffer_create(SWIGTYPE_p_apr_pool_t pool, SWIGTYPE_p_p_switch_buffer buffer, SWIGTYPE_p_switch_size_t max_len) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_buffer_create(SWIGTYPE_p_apr_pool_t.getCPtr(pool), SWIGTYPE_p_p_switch_buffer.getCPtr(buffer), SWIGTYPE_p_switch_size_t.getCPtr(max_len));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
@ -4898,6 +4955,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_transfer_recordings(SWIGTYPE_p_switch_core_session orig_session, SWIGTYPE_p_switch_core_session new_session) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_transfer_recordings(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), SWIGTYPE_p_switch_core_session.getCPtr(new_session));
return ret;
}
public static switch_status_t switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_core_session sessionp) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_core_session.getCPtr(sessionp));
return ret;
@ -5079,6 +5141,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_hold_toggle_uuid(string uuid, string message, switch_bool_t moh) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_hold_toggle_uuid(uuid, message, (int)moh);
return ret;
}
public static switch_status_t switch_ivr_unhold_uuid(string uuid) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_unhold_uuid(uuid);
return ret;
@ -5440,6 +5507,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_record_session_mask(SWIGTYPE_p_switch_core_session session, string file, switch_bool_t on) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_record_session_mask(SWIGTYPE_p_switch_core_session.getCPtr(session), file, (int)on);
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();
@ -6382,6 +6454,9 @@ public class freeswitch {
public static readonly string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE = freeswitchPINVOKE.SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
public static readonly string SWITCH_TRANSFER_HISTORY_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_HISTORY_VARIABLE_get();
public static readonly string SWITCH_TRANSFER_SOURCE_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_SOURCE_VARIABLE_get();
public static readonly string SWITCH_SENSITIVE_DTMF_VARIABLE = freeswitchPINVOKE.SWITCH_SENSITIVE_DTMF_VARIABLE_get();
public static readonly string SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE = freeswitchPINVOKE.SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get();
public static readonly string SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE = freeswitchPINVOKE.SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE_get();
@ -6390,6 +6465,8 @@ public class freeswitch {
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE_get();
@ -6402,6 +6479,7 @@ public class freeswitch {
public static readonly string SWITCH_HOLDING_UUID_VARIABLE = freeswitchPINVOKE.SWITCH_HOLDING_UUID_VARIABLE_get();
public static readonly string SWITCH_SOFT_HOLDING_UUID_VARIABLE = freeswitchPINVOKE.SWITCH_SOFT_HOLDING_UUID_VARIABLE_get();
public static readonly string SWITCH_API_BRIDGE_END_VARIABLE = freeswitchPINVOKE.SWITCH_API_BRIDGE_END_VARIABLE_get();
public static readonly string SWITCH_API_BRIDGE_START_VARIABLE = freeswitchPINVOKE.SWITCH_API_BRIDGE_START_VARIABLE_get();
public static readonly string SWITCH_API_HANGUP_HOOK_VARIABLE = freeswitchPINVOKE.SWITCH_API_HANGUP_HOOK_VARIABLE_get();
public static readonly string SWITCH_API_REPORTING_HOOK_VARIABLE = freeswitchPINVOKE.SWITCH_API_REPORTING_HOOK_VARIABLE_get();
public static readonly string SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE = freeswitchPINVOKE.SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE_get();
@ -6952,6 +7030,15 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_TRANSFER_SOURCE_VARIABLE_get")]
public static extern string SWITCH_TRANSFER_SOURCE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_SENSITIVE_DTMF_VARIABLE_get")]
public static extern string SWITCH_SENSITIVE_DTMF_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get")]
public static extern string SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get")]
public static extern string SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
@ -6976,6 +7063,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get();
@ -7012,6 +7105,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_API_BRIDGE_END_VARIABLE_get")]
public static extern string SWITCH_API_BRIDGE_END_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_API_BRIDGE_START_VARIABLE_get")]
public static extern string SWITCH_API_BRIDGE_START_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_API_HANGUP_HOOK_VARIABLE_get")]
public static extern string SWITCH_API_HANGUP_HOOK_VARIABLE_get();
@ -8503,6 +8599,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_write_replace_frame")]
public static extern IntPtr switch_core_media_bug_get_write_replace_frame(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_native_read_frame")]
public static extern IntPtr switch_core_media_bug_get_native_read_frame(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_native_write_frame")]
public static extern IntPtr switch_core_media_bug_get_native_write_frame(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_write_replace_frame")]
public static extern void switch_core_media_bug_set_write_replace_frame(HandleRef jarg1, HandleRef jarg2);
@ -8551,6 +8653,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_transfer_recordings")]
public static extern int switch_core_media_bug_transfer_recordings(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_transfer_callback")]
public static extern int switch_core_media_bug_transfer_callback(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_read")]
public static extern int switch_core_media_bug_read(HandleRef jarg1, HandleRef jarg2, int jarg3);
@ -8797,6 +8902,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_set_variable")]
public static extern void switch_core_set_variable(string jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_get_variables")]
public static extern int switch_core_get_variables(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_set_var_conditional")]
public static extern int switch_core_set_var_conditional(string jarg1, string jarg2, string jarg3);
@ -8812,6 +8920,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_findall_matching_var")]
public static extern IntPtr switch_core_session_findall_matching_var(string jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_findall")]
public static extern IntPtr switch_core_session_findall();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_hupall_endpoint")]
public static extern void switch_core_session_hupall_endpoint(HandleRef jarg1, int jarg2);
@ -9610,6 +9721,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_default_ptime")]
public static extern uint switch_default_ptime(string jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_default_rate")]
public static extern uint switch_default_rate(string jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_add_registration")]
public static extern int switch_core_add_registration(string jarg1, string jarg2, string jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, string jarg9);
@ -10231,6 +10345,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_string_match")]
public static extern int switch_string_match(string jarg1, uint jarg2, string jarg3, uint jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_strcasecmp_any")]
public static extern int switch_strcasecmp_any(string jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_util_quote_shell_arg")]
public static extern string switch_util_quote_shell_arg(string jarg1);
@ -10357,6 +10474,18 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_caller_id_number_get")]
public static extern string switch_caller_profile_caller_id_number_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_name_set")]
public static extern void switch_caller_profile_orig_caller_id_name_set(HandleRef jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_name_get")]
public static extern string switch_caller_profile_orig_caller_id_name_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_number_set")]
public static extern void switch_caller_profile_orig_caller_id_number_set(HandleRef jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_orig_caller_id_number_get")]
public static extern string switch_caller_profile_orig_caller_id_number_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_callee_id_name_set")]
public static extern void switch_caller_profile_callee_id_name_set(HandleRef jarg1, string jarg2);
@ -11614,6 +11743,18 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_prefix_get")]
public static extern string switch_file_handle_prefix_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_max_samples_set")]
public static extern void switch_file_handle_max_samples_set(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_max_samples_get")]
public static extern int switch_file_handle_max_samples_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_params_set")]
public static extern void switch_file_handle_params_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_params_get")]
public static extern IntPtr switch_file_handle_params_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_file_handle")]
public static extern IntPtr new_switch_file_handle();
@ -13069,6 +13210,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_caller_profile")]
public static extern void switch_channel_set_caller_profile(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_step_caller_profile")]
public static extern void switch_channel_step_caller_profile(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_caller_profile")]
public static extern IntPtr switch_channel_get_caller_profile(HandleRef jarg1);
@ -13126,6 +13270,9 @@ class freeswitchPINVOKE {
[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_transfer_variable_prefix")]
public static extern int switch_channel_transfer_variable_prefix(HandleRef jarg1, HandleRef jarg2, string jarg3);
[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);
@ -13165,11 +13312,14 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_caller_extension")]
public static extern void switch_channel_set_caller_extension(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_invert_cid")]
public static extern void switch_channel_invert_cid(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_flip_cid")]
public static extern void switch_channel_flip_cid(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_sort_cid")]
public static extern void switch_channel_sort_cid(HandleRef jarg1, int jarg2);
public static extern void switch_channel_sort_cid(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_caller_extension")]
public static extern IntPtr switch_channel_get_caller_extension(HandleRef jarg1);
@ -13396,6 +13546,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_state_thread_unlock")]
public static extern void switch_channel_state_thread_unlock(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_state_thread_trylock")]
public static extern int switch_channel_state_thread_trylock(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_buffer_create")]
public static extern int switch_buffer_create(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3);
@ -14053,6 +14206,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_record_session")]
public static extern int switch_ivr_record_session(HandleRef jarg1, string jarg2, uint jarg3, HandleRef jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_transfer_recordings")]
public static extern int switch_ivr_transfer_recordings(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_pop_eavesdropper")]
public static extern int switch_ivr_eavesdrop_pop_eavesdropper(HandleRef jarg1, HandleRef jarg2);
@ -14161,6 +14317,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_hold_uuid")]
public static extern int switch_ivr_hold_uuid(string jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_hold_toggle_uuid")]
public static extern int switch_ivr_hold_toggle_uuid(string jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_unhold_uuid")]
public static extern int switch_ivr_unhold_uuid(string jarg1);
@ -14380,6 +14539,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_blind_transfer_ack")]
public static extern int switch_ivr_blind_transfer_ack(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_record_session_mask")]
public static extern int switch_ivr_record_session_mask(HandleRef jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
@ -17770,6 +17932,36 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_f_p_switch_core_session_p_void__p_void {
private HandleRef swigCPtr;
internal SWIGTYPE_p_f_p_switch_core_session_p_void__p_void(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_f_p_switch_core_session_p_void__p_void() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_core_session_p_void__p_void obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_f_p_switch_core_session__switch_status_t {
private HandleRef swigCPtr;
@ -21794,6 +21986,8 @@ public enum switch_abc_type_t {
SWITCH_ABC_TYPE_WRITE_REPLACE,
SWITCH_ABC_TYPE_READ_REPLACE,
SWITCH_ABC_TYPE_READ_PING,
SWITCH_ABC_TYPE_TAP_NATIVE_READ,
SWITCH_ABC_TYPE_TAP_NATIVE_WRITE,
SWITCH_ABC_TYPE_CLOSE
}
@ -23876,6 +24070,26 @@ public class switch_caller_profile : IDisposable {
}
}
public string orig_caller_id_name {
set {
freeswitchPINVOKE.switch_caller_profile_orig_caller_id_name_set(swigCPtr, value);
}
get {
string ret = freeswitchPINVOKE.switch_caller_profile_orig_caller_id_name_get(swigCPtr);
return ret;
}
}
public string orig_caller_id_number {
set {
freeswitchPINVOKE.switch_caller_profile_orig_caller_id_number_set(swigCPtr, value);
}
get {
string ret = freeswitchPINVOKE.switch_caller_profile_orig_caller_id_number_get(swigCPtr);
return ret;
}
}
public string callee_id_name {
set {
freeswitchPINVOKE.switch_caller_profile_callee_id_name_set(swigCPtr, value);
@ -24391,6 +24605,7 @@ public enum switch_channel_flag_t {
CF_JITTERBUFFER,
CF_JITTERBUFFER_PLC,
CF_DIALPLAN,
CF_BLEG,
CF_BLOCK_BROADCAST_UNTIL_MEDIA,
CF_CNG_PLC,
CF_ATTENDED_TRANSFER,
@ -28335,6 +28550,27 @@ public class switch_file_handle : IDisposable {
}
}
public int max_samples {
set {
freeswitchPINVOKE.switch_file_handle_max_samples_set(swigCPtr, value);
}
get {
int ret = freeswitchPINVOKE.switch_file_handle_max_samples_get(swigCPtr);
return ret;
}
}
public switch_event params {
set {
freeswitchPINVOKE.switch_file_handle_params_set(swigCPtr, switch_event.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.switch_file_handle_params_get(swigCPtr);
switch_event ret = (cPtr == IntPtr.Zero) ? null : new switch_event(cPtr, false);
return ret;
}
}
public switch_file_handle() : this(freeswitchPINVOKE.new_switch_file_handle(), true) {
}
@ -31332,11 +31568,16 @@ namespace FreeSWITCH.Native {
SMBF_READ_PING = (1 << 4),
SMBF_STEREO = (1 << 5),
SMBF_ANSWER_REQ = (1 << 6),
SMBF_THREAD_LOCK = (1 << 7),
SMBF_PRUNE = (1 << 8),
SMBF_NO_PAUSE = (1 << 9),
SMBF_STEREO_SWAP = (1 << 10),
SMBF_LOCK = (1 << 11)
SMBF_BRIDGE_REQ = (1 << 7),
SMBF_THREAD_LOCK = (1 << 8),
SMBF_PRUNE = (1 << 9),
SMBF_NO_PAUSE = (1 << 10),
SMBF_STEREO_SWAP = (1 << 11),
SMBF_LOCK = (1 << 12),
SMBF_TAP_NATIVE_READ = (1 << 13),
SMBF_TAP_NATIVE_WRITE = (1 << 14),
SMBF_ONE_ONLY = (1 << 15),
SMBF_MASK = (1 << 16)
}
}

View File

@ -366,6 +366,7 @@ static const char usage[] =
"\t-c -- output to a console and stay in the foreground\n"
"\n\tOptions to control locations of files:\n"
"\t-base [basedir] -- alternate prefix directory\n"
"\t-cfgname [filename] -- alternate filename for FreeSWITCH main configuration file\n"
"\t-conf [confdir] -- alternate directory for FreeSWITCH configuration files\n"
"\t-log [logdir] -- alternate directory for logfiles\n"
"\t-run [rundir] -- alternate directory for runtime files\n"
@ -857,6 +858,21 @@ int main(int argc, char *argv[])
strcpy(SWITCH_GLOBAL_dirs.sounds_dir, local_argv[x]);
}
else if (!strcmp(local_argv[x], "-cfgname")) {
x++;
if (switch_strlen_zero(local_argv[x]) || is_option(local_argv[x])) {
fprintf(stderr, "When using -cfgname you must specify a filename\n");
return 255;
}
SWITCH_GLOBAL_filenames.conf_name = (char *) malloc(strlen(local_argv[x]) + 1);
if (!SWITCH_GLOBAL_filenames.conf_name) {
fprintf(stderr, "Allocation error\n");
return 255;
}
strcpy(SWITCH_GLOBAL_filenames.conf_name, local_argv[x]);
}
/* Unknown option (always last!) */
else {
fprintf(stderr, "Unknown option '%s', see '%s -help' for a list of valid options\n",

View File

@ -53,6 +53,7 @@
SWITCH_DECLARE_DATA switch_directories SWITCH_GLOBAL_dirs = { 0 };
SWITCH_DECLARE_DATA switch_filenames SWITCH_GLOBAL_filenames = { 0 };
/* The main runtime obj we keep this hidden for ourselves */
struct switch_runtime runtime = { 0 };
@ -728,6 +729,10 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
#endif
}
if (!SWITCH_GLOBAL_filenames.conf_name && (SWITCH_GLOBAL_filenames.conf_name = (char *) malloc(BUFSIZE))) {
switch_snprintf(SWITCH_GLOBAL_filenames.conf_name, BUFSIZE, "%s", "freeswitch.xml");
}
/* Do this last because it being empty is part of the above logic */
if (!SWITCH_GLOBAL_dirs.base_dir && (SWITCH_GLOBAL_dirs.base_dir = (char *) malloc(BUFSIZE))) {
switch_snprintf(SWITCH_GLOBAL_dirs.base_dir, BUFSIZE, "%s", base_dir);
@ -746,6 +751,8 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
switch_assert(SWITCH_GLOBAL_dirs.recordings_dir);
switch_assert(SWITCH_GLOBAL_dirs.sounds_dir);
switch_assert(SWITCH_GLOBAL_dirs.temp_dir);
switch_assert(SWITCH_GLOBAL_filenames.conf_name);
}

View File

@ -3235,11 +3235,15 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_
if (err) {
runtime.odbc_dsn = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Transactions not supported on your DB, disabling non-SQLite support; using SQLite\n");
switch_cache_db_release_db_handle(&sql_manager.dbh);
free(err);
goto top;
//runtime.odbc_dsn = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Database Error [%s]\n", err);
//switch_cache_db_release_db_handle(&sql_manager.dbh);
if (switch_stristr("read-only", err)) {
free(err);
} else {
free(err);
goto top;
}
}
}
break;

View File

@ -251,12 +251,14 @@ SWITCH_DECLARE(const char *) API::executeString(const char *cmd)
{
char *arg;
switch_stream_handle_t stream = { 0 };
char *mycmd = strdup(cmd);
switch_assert(mycmd);
char *mycmd = NULL;
this_check("");
mycmd = strdup(cmd);
switch_assert(mycmd);
if ((arg = strchr(mycmd, ' '))) {
*arg++ = '\0';
}

View File

@ -273,24 +273,17 @@ SWITCH_DECLARE(uint32_t) switch_unmerge_sln(int16_t *data, uint32_t samples, int
SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t channels)
{
int16_t *buf;
switch_size_t len = samples * sizeof(int16_t);
switch_size_t i = 0;
uint32_t j = 0, k = 0;
switch_zmalloc(buf, len);
uint32_t j = 0;
for (i = 0; i < samples; i++) {
int32_t z = 0;
for (j = 0; j < channels; j++) {
int32_t z = buf[i] + data[k++];
z += data[i * channels + j];
switch_normalize_to_16bit(z);
buf[i] = (int16_t) z;
data[i] = (int16_t) z;
}
}
memcpy(data, buf, len);
free(buf);
}
SWITCH_DECLARE(void) switch_change_sln_volume_granular(int16_t *data, uint32_t samples, int32_t vol)

View File

@ -2167,7 +2167,7 @@ SWITCH_DECLARE_NONSTD(switch_xml_t) __switch_xml_open_root(uint8_t reload, const
}
}
switch_snprintf(path_buf, sizeof(path_buf), "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "freeswitch.xml");
switch_snprintf(path_buf, sizeof(path_buf), "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, SWITCH_GLOBAL_filenames.conf_name);
if ((new_main = switch_xml_parse_file(path_buf))) {
*err = switch_xml_error(new_main);
switch_copy_string(not_so_threadsafe_error_buffer, *err, sizeof(not_so_threadsafe_error_buffer));