mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 14:14:16 +00:00
Merge branch 'master' into smgmaster
This commit is contained in:
commit
132323c534
54 files changed
+4033
-387
No files matched your search
@@ -2580,7 +2580,10 @@ static void conference_loop_output(conference_member_t *member)
|
||||
if (member->fnode) {
|
||||
member_add_file_data(member, write_frame.data, write_frame.datalen);
|
||||
}
|
||||
switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
if (switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2590,7 +2593,10 @@ static void conference_loop_output(conference_member_t *member)
|
||||
write_frame.samples = samples;
|
||||
memset(write_frame.data, 255, write_frame.datalen);
|
||||
member_add_file_data(member, write_frame.data, write_frame.datalen);
|
||||
switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
if (switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
break;
|
||||
}
|
||||
} else if (!switch_test_flag(member->conference, CFLAG_WASTE_BANDWIDTH)) {
|
||||
if (switch_test_flag(member, MFLAG_WASTE_BANDWIDTH)) {
|
||||
if (member->conference->comfort_noise_level) {
|
||||
@@ -2603,7 +2609,10 @@ static void conference_loop_output(conference_member_t *member)
|
||||
write_frame.samples = samples;
|
||||
write_frame.timestamp = timer.samplecount;
|
||||
|
||||
switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
if (switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>mod_distributor</ProjectName>
|
||||
<ProjectGuid>{5C2B4D88-3BEA-4FE0-90DF-FA9836099D5F}</ProjectGuid>
|
||||
<RootNamespace>mod_distributor</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_debug.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="mod_distributor.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2010.vcxproj">
|
||||
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -95,6 +95,176 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
|
||||
return extension;
|
||||
}
|
||||
|
||||
struct action_binding {
|
||||
char *realm;
|
||||
char *input;
|
||||
char *string;
|
||||
char *value;
|
||||
switch_core_session_t *session;
|
||||
};
|
||||
|
||||
static switch_status_t digit_nomatch_action_callback(switch_ivr_dmachine_match_t *match)
|
||||
{
|
||||
switch_core_session_t *session = (switch_core_session_t *) match->user_data;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
char str[DMACHINE_MAX_DIGIT_LEN + 2];
|
||||
switch_event_t *event;
|
||||
switch_status_t status;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s Digit NOT match binding [%s]\n",
|
||||
switch_channel_get_name(channel), match->match_digits);
|
||||
|
||||
if (switch_event_create_plain(&event, SWITCH_EVENT_CHANNEL_DATA) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "digits", match->match_digits);
|
||||
|
||||
if ((status = switch_core_session_queue_event(session, &event)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_destroy(&event);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s event queue faiure.\n",
|
||||
switch_core_session_get_name(session));
|
||||
}
|
||||
}
|
||||
|
||||
/* send it back around flagged to skip the dmachine */
|
||||
switch_snprintf(str, sizeof(str), "!%s", match->match_digits);
|
||||
|
||||
switch_channel_queue_dtmf_string(channel, str);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t digit_action_callback(switch_ivr_dmachine_match_t *match)
|
||||
{
|
||||
struct action_binding *act = (struct action_binding *) match->user_data;
|
||||
switch_event_t *event;
|
||||
switch_status_t status;
|
||||
int exec = 0;
|
||||
char *string = act->string;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(act->session);
|
||||
|
||||
if (switch_event_create_plain(&event, SWITCH_EVENT_CHANNEL_DATA) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(act->session), SWITCH_LOG_DEBUG, "%s Digit match binding [%s][%s]\n",
|
||||
switch_channel_get_name(channel), act->string, act->value);
|
||||
|
||||
if (!strncasecmp(string, "exec:", 5)) {
|
||||
string += 5;
|
||||
exec = 1;
|
||||
}
|
||||
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, string, act->value);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "digits", match->match_digits);
|
||||
|
||||
if (exec) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute", exec == 2 ? "non-blocking" : "blocking");
|
||||
}
|
||||
|
||||
if ((status = switch_core_session_queue_event(act->session, &event)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_destroy(&event);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(act->session), SWITCH_LOG_WARNING, "%s event queue faiure.\n",
|
||||
switch_core_session_get_name(act->session));
|
||||
}
|
||||
}
|
||||
|
||||
if (exec) {
|
||||
char *cmd = switch_core_session_sprintf(act->session, "%s::%s", string, act->value);
|
||||
switch_ivr_broadcast_in_thread(act->session, cmd, SMF_ECHO_ALEG|SMF_HOLD_BLEG);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#define CLEAR_DIGIT_ACTION_USAGE "<realm>|all"
|
||||
SWITCH_STANDARD_APP(clear_digit_action_function)
|
||||
{
|
||||
//switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_ivr_dmachine_t *dmachine;
|
||||
char *realm = (char *) data;
|
||||
|
||||
if ((dmachine = switch_core_session_get_dmachine(session))) {
|
||||
if (zstr(realm) || !strcasecmp(realm, "all")) {
|
||||
switch_core_session_set_dmachine(session, NULL);
|
||||
switch_ivr_dmachine_destroy(&dmachine);
|
||||
} else {
|
||||
switch_ivr_dmachine_clear_realm(dmachine, realm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define DIGIT_ACTION_SET_REALM_USAGE "<realm>"
|
||||
SWITCH_STANDARD_APP(digit_action_set_realm_function)
|
||||
{
|
||||
switch_ivr_dmachine_t *dmachine;
|
||||
char *realm = (char *) data;
|
||||
|
||||
if (zstr(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Syntax Error, USAGE %s\n", DIGIT_ACTION_SET_REALM_USAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((dmachine = switch_core_session_get_dmachine(session))) {
|
||||
switch_ivr_dmachine_set_realm(dmachine, realm);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define BIND_DIGIT_ACTION_USAGE "<realm>,<digits|~regex>,<string>,<value>"
|
||||
SWITCH_STANDARD_APP(bind_digit_action_function)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_ivr_dmachine_t *dmachine;
|
||||
char *mydata;
|
||||
int argc = 0;
|
||||
char *argv[4] = { 0 };
|
||||
struct action_binding *act;
|
||||
|
||||
if (zstr(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Syntax Error, USAGE %s\n", BIND_DIGIT_ACTION_USAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
mydata = switch_core_session_strdup(session, data);
|
||||
|
||||
argc = switch_separate_string(mydata, ',', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||
|
||||
if (argc < 4 || zstr(argv[0]) || zstr(argv[1]) || zstr(argv[2]) || zstr(argv[3])) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Syntax Error, USAGE %s\n", BIND_DIGIT_ACTION_USAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!(dmachine = switch_core_session_get_dmachine(session))) {
|
||||
uint32_t digit_timeout = 1500;
|
||||
uint32_t input_timeout = 0;
|
||||
const char *var;
|
||||
uint32_t tmp;
|
||||
|
||||
if ((var = switch_channel_get_variable(channel, "bind_digit_digit_timeout"))) {
|
||||
tmp = (uint32_t) atol(var);
|
||||
if (tmp < 0) tmp = 0;
|
||||
digit_timeout = tmp;
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(channel, "bind_digit_input_timeout"))) {
|
||||
tmp = (uint32_t) atol(var);
|
||||
if (tmp < 0) tmp = 0;
|
||||
input_timeout = tmp;
|
||||
}
|
||||
|
||||
switch_ivr_dmachine_create(&dmachine, "DPTOOLS", NULL, digit_timeout, input_timeout, NULL, digit_nomatch_action_callback, session);
|
||||
switch_core_session_set_dmachine(session, dmachine);
|
||||
}
|
||||
|
||||
|
||||
act = switch_core_session_alloc(session, sizeof(*act));
|
||||
act->realm = argv[0];
|
||||
act->input = argv[1];
|
||||
act->string = argv[2];
|
||||
act->value = argv[3];
|
||||
act->session = session;
|
||||
|
||||
switch_ivr_dmachine_bind(dmachine, act->realm, act->input, 0, digit_action_callback, act);
|
||||
}
|
||||
|
||||
|
||||
#define DETECT_SPEECH_SYNTAX "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume"
|
||||
SWITCH_STANDARD_APP(detect_speech_function)
|
||||
{
|
||||
@@ -3277,6 +3447,17 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
|
||||
SWITCH_ADD_API(api_interface, "chat", "chat", chat_api_function, "<proto>|<from>|<to>|<message>|[<content-type>]");
|
||||
SWITCH_ADD_API(api_interface, "strftime", "strftime", strftime_api_function, "<format_string>");
|
||||
SWITCH_ADD_API(api_interface, "presence", "presence", presence_api_function, PRESENCE_USAGE);
|
||||
|
||||
SWITCH_ADD_APP(app_interface, "bind_digit_action", "bind a key sequence or regex to an action",
|
||||
"bind a key sequence or regex to an action", bind_digit_action_function, BIND_DIGIT_ACTION_USAGE, SAF_SUPPORT_NOMEDIA);
|
||||
|
||||
SWITCH_ADD_APP(app_interface, "clear_digit_action", "clear all digit bindings", "",
|
||||
clear_digit_action_function, CLEAR_DIGIT_ACTION_USAGE, SAF_SUPPORT_NOMEDIA);
|
||||
|
||||
SWITCH_ADD_APP(app_interface, "digit_action_set_realm", "change binding realm", "",
|
||||
digit_action_set_realm_function, DIGIT_ACTION_SET_REALM_USAGE, SAF_SUPPORT_NOMEDIA);
|
||||
|
||||
|
||||
SWITCH_ADD_APP(app_interface, "privacy", "Set privacy on calls", "Set caller privacy on calls.", privacy_function, "off|on|name|full|number",
|
||||
SAF_SUPPORT_NOMEDIA);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_redis_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_redis_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_redis, mod_redis_load, NULL, mod_redis_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_redis, mod_redis_load, mod_redis_shutdown, NULL);
|
||||
|
||||
static struct{
|
||||
char *host;
|
||||
|
||||
@@ -2317,7 +2317,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
|
||||
const char *caller_id_name,
|
||||
const char *caller_id_number,
|
||||
const char *forwarded_by,
|
||||
switch_bool_t copy, const char *use_uuid)
|
||||
switch_bool_t copy, const char *use_uuid, switch_core_session_t *session)
|
||||
{
|
||||
char *file_path = NULL, *dir_path = NULL;
|
||||
const char *myid = switch_xml_attr(x_user, "id");
|
||||
@@ -2342,7 +2342,9 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
|
||||
switch_status_t ret = SWITCH_STATUS_SUCCESS;
|
||||
char *convert_cmd = profile->convert_cmd;
|
||||
char *convert_ext = profile->convert_ext;
|
||||
int del_file = 0;
|
||||
|
||||
|
||||
if (!params) {
|
||||
switch_event_create(&local_event, SWITCH_EVENT_REQUEST_PARAMS);
|
||||
params = local_event;
|
||||
@@ -2634,14 +2636,35 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
|
||||
}
|
||||
|
||||
if (!insert_db) {
|
||||
if (unlink(file_path) != 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", file_path);
|
||||
del_file = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (session) {
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
const char *vm_cc;
|
||||
|
||||
if ((vm_cc = switch_channel_get_variable(channel, "vm_cc"))) {
|
||||
char *cmd = switch_core_session_sprintf(session, "%s %s %s '%s' %s@%s %s",
|
||||
vm_cc, file_path, caller_id_number, caller_id_name, myid, domain_name, read_flags);
|
||||
|
||||
if (voicemail_inject(cmd, session) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
failed:
|
||||
|
||||
if (del_file && file_path) {
|
||||
if (unlink(file_path) != 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", file_path);
|
||||
}
|
||||
}
|
||||
|
||||
switch_event_destroy(&local_event);
|
||||
|
||||
switch_safe_free(dir_path);
|
||||
@@ -2785,7 +2808,7 @@ static switch_status_t voicemail_inject(const char *data, switch_core_session_t
|
||||
switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
|
||||
status =
|
||||
deliver_vm(profile, ux, domain, path, 0, read_flags, my_params, pool, cid_name, cid_num, forwarded_by,
|
||||
SWITCH_TRUE, session ? switch_core_session_get_uuid(session) : NULL);
|
||||
SWITCH_TRUE, session ? switch_core_session_get_uuid(session) : NULL, NULL);
|
||||
switch_event_destroy(&my_params);
|
||||
}
|
||||
continue;
|
||||
@@ -2794,7 +2817,7 @@ static switch_status_t voicemail_inject(const char *data, switch_core_session_t
|
||||
switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
|
||||
status = deliver_vm(profile, ut, domain, path, 0, read_flags,
|
||||
my_params, pool, cid_name, cid_num, forwarded_by, SWITCH_TRUE,
|
||||
session ? switch_core_session_get_uuid(session) : NULL);
|
||||
session ? switch_core_session_get_uuid(session) : NULL, NULL);
|
||||
switch_event_destroy(&my_params);
|
||||
}
|
||||
}
|
||||
@@ -2817,7 +2840,7 @@ static switch_status_t voicemail_inject(const char *data, switch_core_session_t
|
||||
switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
|
||||
status = deliver_vm(profile, ut, domain, path, 0, read_flags,
|
||||
my_params, pool, cid_name, cid_num, forwarded_by, SWITCH_TRUE,
|
||||
session ? switch_core_session_get_uuid(session) : NULL);
|
||||
session ? switch_core_session_get_uuid(session) : NULL, NULL);
|
||||
switch_event_destroy(&my_params);
|
||||
}
|
||||
}
|
||||
@@ -2831,7 +2854,7 @@ static switch_status_t voicemail_inject(const char *data, switch_core_session_t
|
||||
switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
|
||||
status = deliver_vm(profile, ut, domain, path, 0, read_flags,
|
||||
my_params, pool, cid_name, cid_num, forwarded_by, SWITCH_TRUE,
|
||||
session ? switch_core_session_get_uuid(session) : NULL);
|
||||
session ? switch_core_session_get_uuid(session) : NULL, NULL);
|
||||
switch_event_destroy(&my_params);
|
||||
} else {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
@@ -2889,7 +2912,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||
const char *caller_id_number = NULL;
|
||||
switch_xml_t x_user = NULL, x_params = NULL, x_param = NULL;
|
||||
switch_event_t *vars = NULL;
|
||||
const char *vm_cc = NULL, *vtmp, *vm_ext = NULL;
|
||||
const char *vtmp, *vm_ext = NULL;
|
||||
int disk_quota = 0;
|
||||
switch_bool_t skip_greeting = switch_true(switch_channel_get_variable(channel, "skip_greeting"));
|
||||
switch_bool_t skip_instructions = switch_true(switch_channel_get_variable(channel, "skip_instructions"));
|
||||
@@ -3175,20 +3198,9 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||
switch_channel_get_variables(channel, &vars);
|
||||
status = deliver_vm(profile, x_user, domain_name, file_path, message_len, read_flags, vars,
|
||||
switch_core_session_get_pool(session), caller_id_name, caller_id_number, NULL, SWITCH_FALSE,
|
||||
session ? switch_core_session_get_uuid(session) : NULL);
|
||||
session ? switch_core_session_get_uuid(session) : NULL, session);
|
||||
switch_event_destroy(&vars);
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
if ((vm_cc = switch_channel_get_variable(channel, "vm_cc"))) {
|
||||
char *cmd = switch_core_session_sprintf(session, "%s %s %s '%s' %s@%s %s",
|
||||
vm_cc, file_path, caller_id_number, caller_id_name, id, domain_name, read_flags);
|
||||
|
||||
if (voicemail_inject(cmd, session) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to deliver message\n");
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "deleted", NULL, NULL));
|
||||
}
|
||||
@@ -3213,7 +3225,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||
|
||||
|
||||
#define VM_DESC "voicemail"
|
||||
#define VM_USAGE "[check|auth] <profile_name> <domain_name> [<id>]"
|
||||
#define VM_USAGE "[check] [auth] <profile_name> <domain_name> [<id>]"
|
||||
|
||||
SWITCH_STANDARD_APP(voicemail_function)
|
||||
{
|
||||
|
||||
@@ -65,9 +65,6 @@ unsigned long long g_next_session_id = 0;
|
||||
/* hash of sessions (I think a linked list suits better here, but FS does not have the data type) */
|
||||
static switch_hash_t *g_sessions_hash = NULL;
|
||||
|
||||
/* global memory pool provided by FS */
|
||||
static switch_memory_pool_t *g_pool = NULL;
|
||||
|
||||
typedef struct vocallo_codec_s {
|
||||
int codec_id; /* vocallo codec ID */
|
||||
int iana; /* IANA code to register in FS */
|
||||
@@ -450,25 +447,31 @@ static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec
|
||||
*encoded_data_len = encoded_frame.datalen;
|
||||
}
|
||||
|
||||
/* update encoding stats */
|
||||
sess->encoder.rx++;
|
||||
|
||||
now_time = switch_micro_time_now();
|
||||
if (!sess->encoder.last_rx_time) {
|
||||
sess->encoder.last_rx_time = now_time;
|
||||
} else {
|
||||
difftime = now_time - sess->encoder.last_rx_time;
|
||||
sess->encoder.avgrxus = sess->encoder.avgrxus ? ((sess->encoder.avgrxus + difftime)/2) : difftime;
|
||||
sess->encoder.last_rx_time = now_time;
|
||||
}
|
||||
|
||||
/* check sequence and bump lost rx packets count if needed */
|
||||
if (sess->encoder.lastrxseqno >= 0) {
|
||||
if (encoded_frame.seq > (sess->encoder.lastrxseqno + 2) ) {
|
||||
sess->encoder.rxlost += encoded_frame.seq - sess->encoder.lastrxseqno - 1;
|
||||
/* update encoding stats if we received a frame */
|
||||
if (*encoded_data_len) {
|
||||
if (*encoded_data_len != codec->implementation->encoded_bytes_per_packet) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Returning odd encoded frame of %d bytes intead of %d bytes\n", *encoded_data_len, codec->implementation->encoded_bytes_per_packet);
|
||||
}
|
||||
sess->encoder.rx++;
|
||||
now_time = switch_micro_time_now();
|
||||
if (!sess->encoder.last_rx_time) {
|
||||
sess->encoder.last_rx_time = now_time;
|
||||
} else {
|
||||
difftime = now_time - sess->encoder.last_rx_time;
|
||||
sess->encoder.avgrxus = sess->encoder.avgrxus ? ((sess->encoder.avgrxus + difftime)/2) : difftime;
|
||||
sess->encoder.last_rx_time = now_time;
|
||||
}
|
||||
|
||||
/* check sequence and bump lost rx packets count if needed */
|
||||
if (sess->encoder.lastrxseqno >= 0) {
|
||||
if (encoded_frame.seq > (sess->encoder.lastrxseqno + 2) ) {
|
||||
sess->encoder.rxlost += encoded_frame.seq - sess->encoder.lastrxseqno - 1;
|
||||
}
|
||||
}
|
||||
sess->encoder.lastrxseqno = encoded_frame.seq;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No output from sangoma encoder\n");
|
||||
}
|
||||
sess->encoder.lastrxseqno = encoded_frame.seq;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -573,25 +576,34 @@ static switch_status_t switch_sangoma_decode(switch_codec_t *codec, /* codec ses
|
||||
*decoded_data_len = i * 2;
|
||||
}
|
||||
|
||||
/* update decoding stats */
|
||||
sess->decoder.rx++;
|
||||
|
||||
now_time = switch_micro_time_now();
|
||||
if (!sess->decoder.last_rx_time) {
|
||||
sess->decoder.last_rx_time = now_time;
|
||||
} else {
|
||||
difftime = now_time - sess->decoder.last_rx_time;
|
||||
sess->decoder.avgrxus = sess->decoder.avgrxus ? ((sess->decoder.avgrxus + difftime)/2) : difftime;
|
||||
sess->decoder.last_rx_time = now_time;
|
||||
}
|
||||
|
||||
/* check sequence and bump lost rx packets count if needed */
|
||||
if (sess->decoder.lastrxseqno >= 0) {
|
||||
if (ulaw_frame.seq > (sess->decoder.lastrxseqno + 2) ) {
|
||||
sess->decoder.rxlost += ulaw_frame.seq - sess->decoder.lastrxseqno - 1;
|
||||
if (*decoded_data_len) {
|
||||
if (*decoded_data_len != codec->implementation->decoded_bytes_per_packet) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Returning odd decoded frame of %d bytes intead of %d bytes\n", *decoded_data_len, codec->implementation->decoded_bytes_per_packet);
|
||||
}
|
||||
/* update decoding stats */
|
||||
sess->decoder.rx++;
|
||||
|
||||
now_time = switch_micro_time_now();
|
||||
if (!sess->decoder.last_rx_time) {
|
||||
sess->decoder.last_rx_time = now_time;
|
||||
} else {
|
||||
difftime = now_time - sess->decoder.last_rx_time;
|
||||
sess->decoder.avgrxus = sess->decoder.avgrxus ? ((sess->decoder.avgrxus + difftime)/2) : difftime;
|
||||
sess->decoder.last_rx_time = now_time;
|
||||
}
|
||||
|
||||
/* check sequence and bump lost rx packets count if needed */
|
||||
if (sess->decoder.lastrxseqno >= 0) {
|
||||
if (ulaw_frame.seq > (sess->decoder.lastrxseqno + 2) ) {
|
||||
sess->decoder.rxlost += ulaw_frame.seq - sess->decoder.lastrxseqno - 1;
|
||||
}
|
||||
}
|
||||
sess->decoder.lastrxseqno = ulaw_frame.seq;
|
||||
} else {
|
||||
*decoded_data_len = codec->implementation->decoded_bytes_per_packet;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No output from sangoma decoder, returning silent frame of %d bytes\n", *decoded_data_len);
|
||||
memset(dbuf_linear, 0, *decoded_data_len);
|
||||
}
|
||||
sess->decoder.lastrxseqno = ulaw_frame.seq;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -740,10 +752,14 @@ SWITCH_STANDARD_API(sangoma_function)
|
||||
stream->write_function(stream, "Failed to find session %lu\n", sessid);
|
||||
goto done;
|
||||
}
|
||||
stream->write_function(stream, "Session: %lu\n", sessid);
|
||||
stream->write_function(stream, "Stats for transcoding session: %lu\n", sessid);
|
||||
|
||||
if (sess->encoder.rxrtp) {
|
||||
stats = switch_rtp_get_stats(sess->encoder.rxrtp, NULL);
|
||||
stream->write_function(stream, "=== Encoder ===\n");
|
||||
|
||||
stream->write_function(stream, "Remote address: %s:%d\n\n", switch_rtp_get_remote_host(sess->encoder.rxrtp), switch_rtp_get_remote_port(sess->encoder.rxrtp));
|
||||
|
||||
stream->write_function(stream, "-- Encoder Inbound Stats --\n");
|
||||
stream->write_function(stream, "Rx Discarded: %lu\n", sess->encoder.rxdiscarded);
|
||||
sangoma_print_stats(stream, &stats->inbound);
|
||||
@@ -752,10 +768,16 @@ SWITCH_STANDARD_API(sangoma_function)
|
||||
stats = switch_rtp_get_stats(sess->encoder.txrtp, NULL);
|
||||
stream->write_function(stream, "-- Encoder Outbound Stats --\n");
|
||||
sangoma_print_stats(stream, &stats->outbound);
|
||||
} else {
|
||||
stream->write_function(stream, "\n=== No Encoder ===\n\n");
|
||||
}
|
||||
|
||||
if (sess->decoder.rxrtp) {
|
||||
stats = switch_rtp_get_stats(sess->decoder.rxrtp, NULL);
|
||||
|
||||
stream->write_function(stream, "=== Decoder ===\n");
|
||||
stream->write_function(stream, "Remote address: %s:%d\n\n", switch_rtp_get_remote_host(sess->decoder.rxrtp), switch_rtp_get_remote_port(sess->decoder.rxrtp));
|
||||
|
||||
stream->write_function(stream, "-- Decoder Inbound Stats --\n");
|
||||
stream->write_function(stream, "Rx Discarded: %lu\n", sess->decoder.rxdiscarded);
|
||||
sangoma_print_stats(stream, &stats->inbound);
|
||||
@@ -763,6 +785,8 @@ SWITCH_STANDARD_API(sangoma_function)
|
||||
stats = switch_rtp_get_stats(sess->decoder.txrtp, NULL);
|
||||
stream->write_function(stream, "-- Decoder Outbound Stats --\n");
|
||||
sangoma_print_stats(stream, &stats->outbound);
|
||||
} else {
|
||||
stream->write_function(stream, "\n=== No Decoder ===\n\n");
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, "Unknown Command [%s]\n", argv[0]);
|
||||
@@ -894,8 +918,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
g_pool = pool;
|
||||
|
||||
g_init_cfg.log = sangoma_logger;
|
||||
g_init_cfg.create_rtp = sangoma_create_rtp;
|
||||
g_init_cfg.create_rtp_port = sangoma_create_rtp_port;
|
||||
|
||||
@@ -242,19 +242,18 @@ static switch_status_t sofia_on_execute(switch_core_session_t *session)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
char *generate_pai_str(switch_core_session_t *session)
|
||||
char *generate_pai_str(private_object_t *tech_pvt)
|
||||
{
|
||||
private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
|
||||
switch_core_session_t *session = tech_pvt->session;
|
||||
const char *callee_name = NULL, *callee_number = NULL;
|
||||
const char *var, *header, *ua = switch_channel_get_variable(tech_pvt->channel, "sip_user_agent");
|
||||
char *pai = NULL;
|
||||
|
||||
if (!sofia_test_pflag(tech_pvt->profile, PFLAG_CID_IN_1XX) ||
|
||||
if (!sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID) || !sofia_test_pflag(tech_pvt->profile, PFLAG_CID_IN_1XX) ||
|
||||
((var = switch_channel_get_variable(tech_pvt->channel, "sip_cid_in_1xx")) && switch_false(var))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
if (zstr((callee_name = switch_channel_get_variable(tech_pvt->channel, "effective_callee_id_name"))) &&
|
||||
zstr((callee_name = switch_channel_get_variable(tech_pvt->channel, "sip_callee_id_name")))) {
|
||||
callee_name = switch_channel_get_variable(tech_pvt->channel, "callee_id_name");
|
||||
@@ -521,7 +520,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
switch_channel_set_variable(channel, "sip_hangup_disposition", "send_refuse");
|
||||
}
|
||||
if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
char *cid = generate_pai_str(session);
|
||||
char *cid = generate_pai_str(tech_pvt);
|
||||
|
||||
nua_respond(tech_pvt->nh, sip_cause, sip_status_phrase(sip_cause),
|
||||
TAG_IF(!zstr(reason), SIPTAG_REASON_STR(reason)),
|
||||
@@ -703,9 +702,9 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
|
||||
char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_RESPONSE_HEADER_PREFIX);
|
||||
char *cid = NULL;
|
||||
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID)) {
|
||||
cid = generate_pai_str(session);
|
||||
}
|
||||
|
||||
cid = generate_pai_str(tech_pvt);
|
||||
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) && tech_pvt->early_sdp && strcmp(tech_pvt->early_sdp, tech_pvt->local_sdp_str)) {
|
||||
/* The SIP RFC for SOA forbids sending a 183 with one sdp then a 200 with another but it won't do us much good unless
|
||||
@@ -1968,7 +1967,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
} else if (code == 484 && msg->numeric_arg) {
|
||||
const char *to = switch_channel_get_variable(channel, "sip_to_uri");
|
||||
const char *max_forwards = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
|
||||
char *cid = generate_pai_str(session);
|
||||
char *cid = generate_pai_str(tech_pvt);
|
||||
char *to_uri = NULL;
|
||||
|
||||
if (to) {
|
||||
@@ -2066,7 +2065,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
!switch_channel_test_flag(channel, CF_EARLY_MEDIA) && !switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||
char *extra_header = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
|
||||
const char *call_info = switch_channel_get_variable(channel, "presence_call_info_full");
|
||||
char *cid = generate_pai_str(session);
|
||||
char *cid = generate_pai_str(tech_pvt);
|
||||
|
||||
switch (ring_ready_val) {
|
||||
|
||||
@@ -2187,9 +2186,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
char *extra_header = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
|
||||
char *cid = NULL;
|
||||
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID)) {
|
||||
cid = generate_pai_str(session);
|
||||
}
|
||||
cid = generate_pai_str(tech_pvt);
|
||||
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) &&
|
||||
tech_pvt->early_sdp && strcmp(tech_pvt->early_sdp, tech_pvt->local_sdp_str)) {
|
||||
@@ -3176,6 +3174,17 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[1], "watchdog")) {
|
||||
if (argc > 2) {
|
||||
int value = switch_true(argv[2]);
|
||||
profile->watchdog_enabled = value;
|
||||
stream->write_function(stream, "%s sip debugging on %s", value ? "Enabled" : "Disabled", profile->name);
|
||||
} else {
|
||||
stream->write_function(stream, "Usage: sofia profile <name> watchdog <on/off>\n");
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
if (!strcasecmp(argv[1], "gwlist")) {
|
||||
int up = 1;
|
||||
@@ -3601,18 +3610,16 @@ SWITCH_STANDARD_API(sofia_function)
|
||||
"[register|unregister] [<gateway name>|all]|"
|
||||
"killgw <gateway name>|"
|
||||
"[stun-auto-disable|stun-enabled] [true|false]]|"
|
||||
"siptrace [on|off]\n"
|
||||
"siptrace <on|off>|"
|
||||
"watchdog <on|off>\n"
|
||||
"sofia status|xmlstatus profile <name> [ reg <contact str> ] | [ pres <pres str> ] | [ user <user@domain> ]\n"
|
||||
"sofia status|xmlstatus gateway <name>\n"
|
||||
"sofia loglevel <all|default|tport|iptsec|nea|nta|nth_client|nth_server|nua|soa|sresolv|stun> [0-9]\n"
|
||||
"sofia tracelevel <console|alert|crit|err|warning|notice|info|debug>\n"
|
||||
"sofa global siptrace [on|off]\n"
|
||||
"sofia global siptrace <on|off>|"
|
||||
"watchdog <on|off>\n"
|
||||
"--------------------------------------------------------------------------------\n";
|
||||
|
||||
if (session) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (zstr(cmd)) {
|
||||
stream->write_function(stream, "%s", usage_string);
|
||||
goto done;
|
||||
@@ -3663,21 +3670,30 @@ SWITCH_STANDARD_API(sofia_function)
|
||||
stream->write_function(stream, "%s", usage_string);
|
||||
goto done;
|
||||
} else if (!strcasecmp(argv[0], "global")) {
|
||||
int on = -1;
|
||||
int ston = -1;
|
||||
int wdon = -1;
|
||||
|
||||
if (argc > 1) {
|
||||
if (!strcasecmp(argv[1], "siptrace")) {
|
||||
if (argc > 2) {
|
||||
on = switch_true(argv[2]);
|
||||
ston = switch_true(argv[2]);
|
||||
}
|
||||
}
|
||||
if (!strcasecmp(argv[1], "watchdog")) {
|
||||
if (argc > 2) {
|
||||
wdon = switch_true(argv[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (on != -1) {
|
||||
sofia_glue_global_siptrace(on);
|
||||
stream->write_function(stream, "+OK Global siptrace %s", on ? "on" : "off");
|
||||
if (ston != -1) {
|
||||
sofia_glue_global_siptrace(ston);
|
||||
stream->write_function(stream, "+OK Global siptrace %s", ston ? "on" : "off");
|
||||
} else if (wdon != -1) {
|
||||
sofia_glue_global_watchdog(wdon);
|
||||
stream->write_function(stream, "+OK Global watchdog %s", wdon ? "on" : "off");
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR Usage: siptrace on|off");
|
||||
stream->write_function(stream, "-ERR Usage: siptrace <on|off>|watchdog <on|off>");
|
||||
}
|
||||
|
||||
goto done;
|
||||
@@ -4759,6 +4775,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
|
||||
switch_console_set_complete("add sofia tracelevel ::[console:alert:crit:err:warning:notice:info:debug");
|
||||
|
||||
switch_console_set_complete("add sofia global siptrace ::[on:off");
|
||||
switch_console_set_complete("add sofia global watchdog ::[on:off");
|
||||
|
||||
switch_console_set_complete("add sofia profile");
|
||||
switch_console_set_complete("add sofia profile restart all");
|
||||
@@ -4774,6 +4791,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles killgw ::sofia::list_profile_gateway");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles siptrace on");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles siptrace off");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles watchdog on");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles watchdog off");
|
||||
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles gwlist up");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles gwlist down");
|
||||
|
||||
@@ -562,6 +562,11 @@ struct sofia_profile {
|
||||
char *contact_user;
|
||||
char *local_network;
|
||||
uint32_t trans_timeout;
|
||||
switch_time_t last_sip_event;
|
||||
switch_time_t last_root_step;
|
||||
uint32_t step_timeout;
|
||||
uint32_t event_timeout;
|
||||
int watchdog_enabled;
|
||||
};
|
||||
|
||||
struct private_object {
|
||||
@@ -1016,6 +1021,7 @@ void sofia_glue_tech_simplify(private_object_t *tech_pvt);
|
||||
switch_console_callback_match_t *sofia_reg_find_reg_url_multi(sofia_profile_t *profile, const char *user, const char *host);
|
||||
switch_bool_t sofia_glue_profile_exists(const char *key);
|
||||
void sofia_glue_global_siptrace(switch_bool_t on);
|
||||
void sofia_glue_global_watchdog(switch_bool_t on);
|
||||
void sofia_glue_proxy_codec(switch_core_session_t *session, const char *r_sdp);
|
||||
switch_status_t sofia_glue_sdp_map(const char *r_sdp, switch_event_t **fmtp, switch_event_t **pt);
|
||||
void sofia_glue_build_vid_refresh_message(switch_core_session_t *session, const char *pl);
|
||||
@@ -731,6 +731,7 @@ void sofia_event_callback(nua_event_t event,
|
||||
int locked = 0;
|
||||
int check_destroy = 1;
|
||||
|
||||
profile->last_sip_event = switch_time_now();
|
||||
|
||||
/* sofia_private will be == &mod_sofia_globals.keep_private whenever a request is done with a new handle that has to be
|
||||
freed whenever the request is done */
|
||||
@@ -1309,6 +1310,40 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread
|
||||
}
|
||||
|
||||
if (++loops >= 1000) {
|
||||
|
||||
|
||||
|
||||
if (profile->watchdog_enabled) {
|
||||
uint32_t event_diff = 0, step_diff = 0, event_fail = 0, step_fail = 0;
|
||||
|
||||
if (profile->step_timeout) {
|
||||
step_diff = (uint32_t) ((switch_time_now() - profile->last_root_step) / 1000);
|
||||
|
||||
if (step_diff > profile->step_timeout) {
|
||||
step_fail = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (profile->event_timeout) {
|
||||
event_diff = (uint32_t) ((switch_time_now() - profile->last_sip_event) / 1000);
|
||||
|
||||
if (event_diff > profile->event_timeout) {
|
||||
event_fail = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (step_fail && profile->event_timeout && !event_fail) {
|
||||
step_fail = 0;
|
||||
}
|
||||
|
||||
if (event_fail || step_fail) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile %s: SIP STACK FAILURE DETECTED!\n"
|
||||
"GOODBYE CRUEL WORLD, I'M LEAVING YOU TODAY....GOODBYE, GOODBYE, GOOD BYE\n", profile->name);
|
||||
switch_yield(2000);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
if (++ireg_loops >= IREG_SECONDS) {
|
||||
time_t now = switch_epoch_time_now(NULL);
|
||||
sofia_reg_check_expire(profile, now, 0);
|
||||
@@ -1548,6 +1583,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
|
||||
|
||||
while (mod_sofia_globals.running == 1 && sofia_test_pflag(profile, PFLAG_RUNNING) && sofia_test_pflag(profile, PFLAG_WORKER_RUNNING)) {
|
||||
su_root_step(profile->s_root, 1000);
|
||||
profile->last_root_step = switch_time_now();
|
||||
}
|
||||
|
||||
sofia_clear_pflag_locked(profile, PFLAG_RUNNING);
|
||||
@@ -2298,6 +2334,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_DEL_SUBS_ON_REG);
|
||||
}
|
||||
} else if (!strcasecmp(var, "watchdog-enabled")) {
|
||||
profile->watchdog_enabled = switch_true(val);
|
||||
} else if (!strcasecmp(var, "watchdog-step-timeout")) {
|
||||
profile->step_timeout = (unsigned long) atol(val);
|
||||
} else if (!strcasecmp(var, "watchdog-event-timeout")) {
|
||||
profile->event_timeout = (unsigned long) atol(val);
|
||||
} else if (!strcasecmp(var, "in-dialog-chat")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_IN_DIALOG_CHAT);
|
||||
@@ -2978,6 +3020,13 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_LOG_AUTH_FAIL);
|
||||
}
|
||||
} else if (!strcasecmp(var, "watchdog-enabled")) {
|
||||
profile->watchdog_enabled = switch_true(val);
|
||||
} else if (!strcasecmp(var, "watchdog-step-timeout")) {
|
||||
profile->step_timeout = atoi(val);
|
||||
} else if (!strcasecmp(var, "watchdog-event-timeout")) {
|
||||
profile->event_timeout = atoi(val);
|
||||
|
||||
} else if (!strcasecmp(var, "in-dialog-chat")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_IN_DIALOG_CHAT);
|
||||
@@ -5028,7 +5077,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
}
|
||||
|
||||
if (channel) {
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_EARLY_MEDIA) && !sofia_test_flag(tech_pvt, TFLAG_ANS)) {
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_ANS);
|
||||
sofia_set_flag(tech_pvt, TFLAG_SDP);
|
||||
switch_channel_mark_answered(channel);
|
||||
|
||||
@@ -1425,9 +1425,12 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
||||
}
|
||||
|
||||
if (tech_pvt->adv_sdp_audio_ip && !strncmp("c=IN IP", p, 7)) {
|
||||
strncpy(q, p, 9);
|
||||
p += 9;
|
||||
q += 9;
|
||||
strncpy(q, p, 7);
|
||||
p += 7;
|
||||
q += 7;
|
||||
strncpy(q, strchr(tech_pvt->adv_sdp_audio_ip, ':') ? "6 " : "4 ", 2);
|
||||
p +=2;
|
||||
q +=2;
|
||||
strncpy(q, tech_pvt->adv_sdp_audio_ip, strlen(tech_pvt->adv_sdp_audio_ip));
|
||||
q += strlen(tech_pvt->adv_sdp_audio_ip);
|
||||
|
||||
@@ -4752,6 +4755,26 @@ void sofia_glue_global_siptrace(switch_bool_t on)
|
||||
|
||||
}
|
||||
|
||||
void sofia_glue_global_watchdog(switch_bool_t on)
|
||||
{
|
||||
switch_hash_index_t *hi;
|
||||
const void *var;
|
||||
void *val;
|
||||
sofia_profile_t *pptr;
|
||||
|
||||
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
||||
if (mod_sofia_globals.profile_hash) {
|
||||
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 ((pptr = (sofia_profile_t *) val)) {
|
||||
pptr->watchdog_enabled = (on ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
|
||||
|
||||
}
|
||||
|
||||
void sofia_glue_del_profile(sofia_profile_t *profile)
|
||||
{
|
||||
sofia_gateway_t *gp;
|
||||
|
||||
@@ -571,22 +571,22 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
|
||||
switch_safe_free(sql);
|
||||
|
||||
|
||||
sql = switch_mprintf("select sip_registrations.sip_user, sip_registrations.orig_hostname, sip_registrations.status, "
|
||||
sql = switch_mprintf("select sip_registrations.sip_user, sip_registrations.sip_host, sip_registrations.status, "
|
||||
"sip_registrations.rpid,'', sip_dialogs.uuid, sip_dialogs.state, sip_dialogs.direction, "
|
||||
"sip_dialogs.sip_to_user, sip_dialogs.sip_to_host, sip_presence.status,sip_presence.rpid,sip_presence.open_closed,"
|
||||
"'%q','%q' "
|
||||
|
||||
"from sip_registrations left join sip_dialogs on "
|
||||
"(sip_dialogs.sip_from_user = sip_registrations.sip_user "
|
||||
"and (sip_dialogs.sip_from_host = sip_registrations.orig_hostname or "
|
||||
"and (sip_dialogs.sip_from_host = sip_registrations.orig_server_host or "
|
||||
"sip_dialogs.sip_from_host = sip_registrations.sip_host) ) "
|
||||
|
||||
|
||||
"left join sip_presence on "
|
||||
"(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_hostname=sip_presence.sip_host and "
|
||||
"(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_server_host=sip_presence.sip_host and "
|
||||
"sip_registrations.profile_name=sip_presence.profile_name) "
|
||||
"where sip_registrations.sip_user='%q' and "
|
||||
"(sip_registrations.orig_hostname='%q' or sip_registrations.sip_host='%q' "
|
||||
"(sip_registrations.orig_server_host='%q' or sip_registrations.sip_host='%q' "
|
||||
"or sip_registrations.presence_hosts like '%%%q%%')",
|
||||
dh.status, dh.rpid, probe_euser, probe_host, probe_host, probe_host);
|
||||
switch_assert(sql);
|
||||
@@ -742,8 +742,8 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
|
||||
}
|
||||
|
||||
sofia_glue_execute_sql_callback(profile, NULL, sql, sofia_presence_sub_callback, &helper);
|
||||
|
||||
|
||||
switch_safe_free(sql);
|
||||
|
||||
sql = switch_mprintf("update sip_subscriptions set version=version+1 where event='dialog' and sub_to_user='%q' "
|
||||
"and (sub_to_host='%q' or presence_hosts like '%%%q%%') "
|
||||
"and (profile_name = '%q' or presence_hosts != sub_to_host)",
|
||||
@@ -757,8 +757,6 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
|
||||
event->event_id == SWITCH_EVENT_PRESENCE_IN ? "IN" : "OUT", profile->name);
|
||||
}
|
||||
|
||||
switch_safe_free(sql);
|
||||
|
||||
if (!zstr((char *) helper.stream.data)) {
|
||||
char *this_sql = (char *) helper.stream.data;
|
||||
char *next = NULL;
|
||||
|
||||
@@ -1011,6 +1011,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABL
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("passthru_ptime_mismatch");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1685,6 +1695,28 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_dtmf_t_duration_get(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_dtmf_t_flags_set(void * jarg1, int jarg2) {
|
||||
switch_dtmf_t *arg1 = (switch_dtmf_t *) 0 ;
|
||||
int32_t arg2 ;
|
||||
|
||||
arg1 = (switch_dtmf_t *)jarg1;
|
||||
arg2 = (int32_t)jarg2;
|
||||
if (arg1) (arg1)->flags = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_dtmf_t_flags_get(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_dtmf_t *arg1 = (switch_dtmf_t *) 0 ;
|
||||
int32_t result;
|
||||
|
||||
arg1 = (switch_dtmf_t *)jarg1;
|
||||
result = (int32_t) ((arg1)->flags);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_dtmf_t() {
|
||||
void * jresult ;
|
||||
switch_dtmf_t *result = 0 ;
|
||||
@@ -3860,6 +3892,151 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_console_callback_match(void * j
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_DMACHINE_MAX_DIGIT_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)(512);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_dmachine_set(void * jarg1, void * jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
switch_ivr_dmachine_t *arg2 = (switch_ivr_dmachine_t *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_t *)jarg2;
|
||||
if (arg1) (arg1)->dmachine = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_ivr_dmachine_match_dmachine_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
switch_ivr_dmachine_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (switch_ivr_dmachine_t *) ((arg1)->dmachine);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_digits_set(void * jarg1, char * jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg2) {
|
||||
arg1->match_digits = (char const *) (new char[strlen((const char *)arg2)+1]);
|
||||
strcpy((char *)arg1->match_digits, (const char *)arg2);
|
||||
} else {
|
||||
arg1->match_digits = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_digits_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (char *) ((arg1)->match_digits);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_key_set(void * jarg1, int jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
int32_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (int32_t)jarg2;
|
||||
if (arg1) (arg1)->match_key = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_key_get(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
int32_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (int32_t) ((arg1)->match_key);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_type_set(void * jarg1, int jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
dm_match_type_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (dm_match_type_t)jarg2;
|
||||
if (arg1) (arg1)->type = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_match_type_get(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
dm_match_type_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (dm_match_type_t) ((arg1)->type);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_user_data_set(void * jarg1, void * jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (void *)jarg2;
|
||||
if (arg1) (arg1)->user_data = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_ivr_dmachine_match_user_data_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
void *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (void *) ((arg1)->user_data);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_ivr_dmachine_match() {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_match *result = 0 ;
|
||||
|
||||
result = (switch_ivr_dmachine_match *)new switch_ivr_dmachine_match();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_ivr_dmachine_match(void * jarg1) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_input_args_t_input_callback_set(void * jarg1, void * jarg2) {
|
||||
switch_input_args_t *arg1 = (switch_input_args_t *) 0 ;
|
||||
switch_input_callback_function_t arg2 = (switch_input_callback_function_t) 0 ;
|
||||
@@ -3970,6 +4147,28 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_input_args_t_user_data_get(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_input_args_t_dmachine_set(void * jarg1, void * jarg2) {
|
||||
switch_input_args_t *arg1 = (switch_input_args_t *) 0 ;
|
||||
switch_ivr_dmachine_t *arg2 = (switch_ivr_dmachine_t *) 0 ;
|
||||
|
||||
arg1 = (switch_input_args_t *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_t *)jarg2;
|
||||
if (arg1) (arg1)->dmachine = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_input_args_t_dmachine_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_input_args_t *arg1 = (switch_input_args_t *) 0 ;
|
||||
switch_ivr_dmachine_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_input_args_t *)jarg1;
|
||||
result = (switch_ivr_dmachine_t *) ((arg1)->dmachine);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_input_args_t() {
|
||||
void * jresult ;
|
||||
switch_input_args_t *result = 0 ;
|
||||
@@ -6841,6 +7040,28 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_soft_unlock(void * jarg1)
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_set_dmachine(void * jarg1, void * jarg2) {
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_ivr_dmachine_t *arg2 = (switch_ivr_dmachine_t *) 0 ;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_t *)jarg2;
|
||||
switch_core_session_set_dmachine(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_get_dmachine(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_ivr_dmachine_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
result = (switch_ivr_dmachine_t *)switch_core_session_get_dmachine(arg1);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_get_uuid() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -10211,6 +10432,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_in_thread(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(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_ptime((char const *)arg1,arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_loadable_module_interface_module_name_set(void * jarg1, char * jarg2) {
|
||||
switch_loadable_module_interface *arg1 = (switch_loadable_module_interface *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -11833,20 +12068,6 @@ SWIGEXPORT unsigned char SWIGSTDCALL CSharp_switch_char_to_rfc2833(char jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(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_ptime((char const *)arg1,arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_sanitize_number(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
@@ -26366,6 +26587,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_broadcast(char * jarg1, char * jarg
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_broadcast_in_thread(void * jarg1, char * jarg2, int jarg3) {
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 ;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
switch_ivr_broadcast_in_thread(arg1,(char const *)arg2,arg3);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_transfer_variable(void * jarg1, void * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -27026,6 +27259,176 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_exists(char * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_create(void * jarg1, char * jarg2, void * jarg3, unsigned long jarg4, unsigned long jarg5, void * jarg6, void * jarg7, void * jarg8) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t **arg1 = (switch_ivr_dmachine_t **) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_memory_pool_t *arg3 = (switch_memory_pool_t *) 0 ;
|
||||
uint32_t arg4 ;
|
||||
uint32_t arg5 ;
|
||||
switch_ivr_dmachine_callback_t arg6 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
switch_ivr_dmachine_callback_t arg7 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
void *arg8 = (void *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t **)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_memory_pool_t *)jarg3;
|
||||
arg4 = (uint32_t)jarg4;
|
||||
arg5 = (uint32_t)jarg5;
|
||||
arg6 = (switch_ivr_dmachine_callback_t)jarg6;
|
||||
arg7 = (switch_ivr_dmachine_callback_t)jarg7;
|
||||
arg8 = (void *)jarg8;
|
||||
result = (switch_status_t)switch_ivr_dmachine_create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_destroy(void * jarg1) {
|
||||
switch_ivr_dmachine_t **arg1 = (switch_ivr_dmachine_t **) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t **)jarg1;
|
||||
switch_ivr_dmachine_destroy(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_bind(void * jarg1, char * jarg2, char * jarg3, int jarg4, void * jarg5, void * jarg6) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
int32_t arg4 ;
|
||||
switch_ivr_dmachine_callback_t arg5 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
void *arg6 = (void *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
arg4 = (int32_t)jarg4;
|
||||
arg5 = (switch_ivr_dmachine_callback_t)jarg5;
|
||||
arg6 = (void *)jarg6;
|
||||
result = (switch_status_t)switch_ivr_dmachine_bind(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_feed(void * jarg1, char * jarg2, void * jarg3) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_ivr_dmachine_match_t **arg3 = (switch_ivr_dmachine_match_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_ivr_dmachine_match_t **)jarg3;
|
||||
result = (switch_status_t)switch_ivr_dmachine_feed(arg1,(char const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_clear(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (switch_status_t)switch_ivr_dmachine_clear(arg1);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_ping(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_ivr_dmachine_match_t **arg2 = (switch_ivr_dmachine_match_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_match_t **)jarg2;
|
||||
result = (switch_status_t)switch_ivr_dmachine_ping(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_ivr_dmachine_get_match(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_ivr_dmachine_match_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (switch_ivr_dmachine_match_t *)switch_ivr_dmachine_get_match(arg1);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_dmachine_get_failed_digits(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (char *)switch_ivr_dmachine_get_failed_digits(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_set_digit_timeout_ms(void * jarg1, unsigned long jarg2) {
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
switch_ivr_dmachine_set_digit_timeout_ms(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_set_input_timeout_ms(void * jarg1, unsigned long jarg2) {
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
switch_ivr_dmachine_set_input_timeout_ms(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_clear_realm(void * jarg1, char * jarg2) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (switch_status_t)switch_ivr_dmachine_clear_realm(arg1,(char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_set_realm(void * jarg1, char * jarg2) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (switch_status_t)switch_ivr_dmachine_set_realm(arg1,(char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
@@ -1070,6 +1070,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABL
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "passthru_ptime_mismatch";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1422,6 +1433,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_EXPORT_VARS_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_BRIDGE_EXPORT_VARS_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "bridge_export_vars";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_R_SDP_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1798,6 +1820,29 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_dtmf_t_duration_get(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_dtmf_t_flags_set(void * jarg1, int jarg2) {
|
||||
switch_dtmf_t *arg1 = (switch_dtmf_t *) 0 ;
|
||||
int32_t arg2 ;
|
||||
|
||||
arg1 = (switch_dtmf_t *)jarg1;
|
||||
arg2 = (int32_t)jarg2;
|
||||
if (arg1) (arg1)->flags = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_dtmf_t_flags_get(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_dtmf_t *arg1 = (switch_dtmf_t *) 0 ;
|
||||
int32_t result;
|
||||
|
||||
arg1 = (switch_dtmf_t *)jarg1;
|
||||
result = (int32_t) ((arg1)->flags);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_dtmf_t() {
|
||||
void * jresult ;
|
||||
switch_dtmf_t *result = 0 ;
|
||||
@@ -4053,6 +4098,157 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_console_callback_match(void * j
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_DMACHINE_MAX_DIGIT_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int) 512;
|
||||
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_dmachine_set(void * jarg1, void * jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
switch_ivr_dmachine_t *arg2 = (switch_ivr_dmachine_t *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_t *)jarg2;
|
||||
if (arg1) (arg1)->dmachine = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_ivr_dmachine_match_dmachine_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
switch_ivr_dmachine_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (switch_ivr_dmachine_t *) ((arg1)->dmachine);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_digits_set(void * jarg1, char * jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg2) {
|
||||
arg1->match_digits = (char const *) (new char[strlen((const char *)arg2)+1]);
|
||||
strcpy((char *)arg1->match_digits, (const char *)arg2);
|
||||
} else {
|
||||
arg1->match_digits = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_digits_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (char *) ((arg1)->match_digits);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_key_set(void * jarg1, int jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
int32_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (int32_t)jarg2;
|
||||
if (arg1) (arg1)->match_key = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_match_match_key_get(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
int32_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (int32_t) ((arg1)->match_key);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_type_set(void * jarg1, int jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
dm_match_type_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (dm_match_type_t)jarg2;
|
||||
if (arg1) (arg1)->type = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_match_type_get(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
dm_match_type_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (dm_match_type_t) ((arg1)->type);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_match_user_data_set(void * jarg1, void * jarg2) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
arg2 = (void *)jarg2;
|
||||
if (arg1) (arg1)->user_data = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_ivr_dmachine_match_user_data_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
void *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
result = (void *) ((arg1)->user_data);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_ivr_dmachine_match() {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_match *result = 0 ;
|
||||
|
||||
result = (switch_ivr_dmachine_match *)new switch_ivr_dmachine_match();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_ivr_dmachine_match(void * jarg1) {
|
||||
switch_ivr_dmachine_match *arg1 = (switch_ivr_dmachine_match *) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_match *)jarg1;
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_input_args_t_input_callback_set(void * jarg1, void * jarg2) {
|
||||
switch_input_args_t *arg1 = (switch_input_args_t *) 0 ;
|
||||
switch_input_callback_function_t arg2 = (switch_input_callback_function_t) 0 ;
|
||||
@@ -4168,6 +4364,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_input_args_t_user_data_get(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_input_args_t_dmachine_set(void * jarg1, void * jarg2) {
|
||||
switch_input_args_t *arg1 = (switch_input_args_t *) 0 ;
|
||||
switch_ivr_dmachine_t *arg2 = (switch_ivr_dmachine_t *) 0 ;
|
||||
|
||||
arg1 = (switch_input_args_t *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_t *)jarg2;
|
||||
if (arg1) (arg1)->dmachine = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_input_args_t_dmachine_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_input_args_t *arg1 = (switch_input_args_t *) 0 ;
|
||||
switch_ivr_dmachine_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_input_args_t *)jarg1;
|
||||
result = (switch_ivr_dmachine_t *) ((arg1)->dmachine);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_input_args_t() {
|
||||
void * jresult ;
|
||||
switch_input_args_t *result = 0 ;
|
||||
@@ -4279,7 +4498,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_API_VERSION_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int) 4;
|
||||
result = (int) 5;
|
||||
|
||||
jresult = result;
|
||||
return jresult;
|
||||
@@ -7111,6 +7330,28 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_soft_unlock(void * jarg1)
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_set_dmachine(void * jarg1, void * jarg2) {
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_ivr_dmachine_t *arg2 = (switch_ivr_dmachine_t *) 0 ;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_t *)jarg2;
|
||||
switch_core_session_set_dmachine(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_get_dmachine(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_ivr_dmachine_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
result = (switch_ivr_dmachine_t *)switch_core_session_get_dmachine(arg1);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_get_uuid() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -8198,6 +8439,24 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_copy(void * jarg1, void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_parse_fmtp(char * jarg1, char * jarg2, unsigned long jarg3, void * jarg4) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
uint32_t arg3 ;
|
||||
switch_codec_fmtp_t *arg4 = (switch_codec_fmtp_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (uint32_t)jarg3;
|
||||
arg4 = (switch_codec_fmtp_t *)jarg4;
|
||||
result = (switch_status_t)switch_core_codec_parse_fmtp((char const *)arg1,(char const *)arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_reset(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_codec_t *arg1 = (switch_codec_t *) 0 ;
|
||||
@@ -10469,6 +10728,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_in_thread(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(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_ptime((char const *)arg1,arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_loadable_module_interface_module_name_set(void * jarg1, char * jarg2) {
|
||||
switch_loadable_module_interface *arg1 = (switch_loadable_module_interface *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -11836,6 +12109,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_is_digit_string(char * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_known_bitrate(unsigned char jarg1) {
|
||||
unsigned long jresult ;
|
||||
switch_payload_t arg1 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (switch_payload_t)jarg1;
|
||||
result = (uint32_t)switch_known_bitrate(arg1);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_fd_read_line(int jarg1, char * jarg2, void * jarg3) {
|
||||
void * jresult ;
|
||||
int arg1 ;
|
||||
@@ -12100,20 +12385,6 @@ SWIGEXPORT unsigned char SWIGSTDCALL CSharp_switch_char_to_rfc2833(char jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(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_ptime((char const *)arg1,arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_sanitize_number(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
@@ -22988,36 +23259,54 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_get_variable_partner(void *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_export_variable_var_check(void * jarg1, char * jarg2, char * jarg3, int jarg4) {
|
||||
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 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
switch_bool_t arg4 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
switch_bool_t arg5 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
arg4 = (switch_bool_t)jarg4;
|
||||
result = (switch_status_t)switch_channel_export_variable_var_check(arg1,(char const *)arg2,(char const *)arg3,arg4);
|
||||
arg4 = (char *)jarg4;
|
||||
arg5 = (switch_bool_t)jarg5;
|
||||
result = (switch_status_t)switch_channel_export_variable_var_check(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_export_variable_printf(void * jarg1, char * jarg2, char * jarg3) {
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_process_export(void * jarg1, void * jarg2, void * jarg3, char * jarg4) {
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
switch_channel_t *arg2 = (switch_channel_t *) 0 ;
|
||||
switch_event_t *arg3 = (switch_event_t *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (switch_channel_t *)jarg2;
|
||||
arg3 = (switch_event_t *)jarg3;
|
||||
arg4 = (char *)jarg4;
|
||||
switch_channel_process_export(arg1,arg2,arg3,(char const *)arg4);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_export_variable_printf(void * jarg1, char * jarg2, char * jarg3, char * jarg4) {
|
||||
int jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
void *arg4 = 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
void *arg5 = 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (switch_status_t)switch_channel_export_variable_printf(arg1,(char const *)arg2,(char const *)arg3,arg4);
|
||||
arg4 = (char *)jarg4;
|
||||
result = (switch_status_t)switch_channel_export_variable_printf(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
@@ -26986,6 +27275,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_broadcast(char * jarg1, char * jarg
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_broadcast_in_thread(void * jarg1, char * jarg2, int jarg3) {
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 ;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
switch_ivr_broadcast_in_thread(arg1,(char const *)arg2,arg3);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_transfer_variable(void * jarg1, void * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -27646,6 +27947,176 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_exists(char * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_create(void * jarg1, char * jarg2, void * jarg3, unsigned long jarg4, unsigned long jarg5, void * jarg6, void * jarg7, void * jarg8) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t **arg1 = (switch_ivr_dmachine_t **) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_memory_pool_t *arg3 = (switch_memory_pool_t *) 0 ;
|
||||
uint32_t arg4 ;
|
||||
uint32_t arg5 ;
|
||||
switch_ivr_dmachine_callback_t arg6 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
switch_ivr_dmachine_callback_t arg7 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
void *arg8 = (void *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t **)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_memory_pool_t *)jarg3;
|
||||
arg4 = (uint32_t)jarg4;
|
||||
arg5 = (uint32_t)jarg5;
|
||||
arg6 = (switch_ivr_dmachine_callback_t)jarg6;
|
||||
arg7 = (switch_ivr_dmachine_callback_t)jarg7;
|
||||
arg8 = (void *)jarg8;
|
||||
result = (switch_status_t)switch_ivr_dmachine_create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_destroy(void * jarg1) {
|
||||
switch_ivr_dmachine_t **arg1 = (switch_ivr_dmachine_t **) 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t **)jarg1;
|
||||
switch_ivr_dmachine_destroy(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_bind(void * jarg1, char * jarg2, char * jarg3, int jarg4, void * jarg5, void * jarg6) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
int32_t arg4 ;
|
||||
switch_ivr_dmachine_callback_t arg5 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
void *arg6 = (void *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
arg4 = (int32_t)jarg4;
|
||||
arg5 = (switch_ivr_dmachine_callback_t)jarg5;
|
||||
arg6 = (void *)jarg6;
|
||||
result = (switch_status_t)switch_ivr_dmachine_bind(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_feed(void * jarg1, char * jarg2, void * jarg3) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_ivr_dmachine_match_t **arg3 = (switch_ivr_dmachine_match_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_ivr_dmachine_match_t **)jarg3;
|
||||
result = (switch_status_t)switch_ivr_dmachine_feed(arg1,(char const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_clear(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (switch_status_t)switch_ivr_dmachine_clear(arg1);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_ping(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_ivr_dmachine_match_t **arg2 = (switch_ivr_dmachine_match_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (switch_ivr_dmachine_match_t **)jarg2;
|
||||
result = (switch_status_t)switch_ivr_dmachine_ping(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_ivr_dmachine_get_match(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_ivr_dmachine_match_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (switch_ivr_dmachine_match_t *)switch_ivr_dmachine_get_match(arg1);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_dmachine_get_failed_digits(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (char *)switch_ivr_dmachine_get_failed_digits(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_set_digit_timeout_ms(void * jarg1, unsigned long jarg2) {
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
switch_ivr_dmachine_set_digit_timeout_ms(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_set_input_timeout_ms(void * jarg1, unsigned long jarg2) {
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
switch_ivr_dmachine_set_input_timeout_ms(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_clear_realm(void * jarg1, char * jarg2) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (switch_status_t)switch_ivr_dmachine_clear_realm(arg1,(char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_set_realm(void * jarg1, char * jarg2) {
|
||||
int jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (switch_status_t)switch_ivr_dmachine_set_realm(arg1,(char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\..\managed\debug\</OutputPath>
|
||||
<OutputPath>..\..\..\..\..\Debug\mod\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -27,11 +27,27 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\..\managed\release\</OutputPath>
|
||||
<OutputPath>..\..\..\..\..\Release\mod\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\..\..\..\x64\Debug\mod\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>..\..\..\..\..\x64\Release\mod\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
||||
@@ -440,6 +440,22 @@ public class CoreSession : IDisposable {
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
public enum dm_match_type_t {
|
||||
DM_MATCH_POSITIVE,
|
||||
DM_MATCH_NEGATIVE
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.0
|
||||
*
|
||||
* 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;
|
||||
|
||||
@@ -509,6 +525,21 @@ public class DTMF : IDisposable {
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
public enum dtmf_flag_t {
|
||||
DTMF_FLAG_SKIP_PROCESS = (1 << 0)
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.0
|
||||
*
|
||||
* 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;
|
||||
|
||||
@@ -1301,6 +1332,16 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_core_session_soft_unlock(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
}
|
||||
|
||||
public static void switch_core_session_set_dmachine(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
freeswitchPINVOKE.switch_core_session_set_dmachine(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
}
|
||||
|
||||
public static SWIGTYPE_p_switch_ivr_dmachine switch_core_session_get_dmachine(SWIGTYPE_p_switch_core_session session) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_core_session_get_dmachine(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
SWIGTYPE_p_switch_ivr_dmachine ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_ivr_dmachine(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_core_get_uuid() {
|
||||
string ret = freeswitchPINVOKE.switch_core_get_uuid();
|
||||
return ret;
|
||||
@@ -2314,6 +2355,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_default_ptime(string name, uint number) {
|
||||
uint ret = freeswitchPINVOKE.switch_default_ptime(name, number);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_loadable_module_init(switch_bool_t autoload) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_loadable_module_init((int)autoload);
|
||||
return ret;
|
||||
@@ -2735,11 +2781,6 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_default_ptime(string name, uint number) {
|
||||
uint ret = freeswitchPINVOKE.switch_default_ptime(name, number);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_sanitize_number(string number) {
|
||||
string ret = freeswitchPINVOKE.switch_sanitize_number(number);
|
||||
return ret;
|
||||
@@ -4144,6 +4185,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_broadcast_in_thread(SWIGTYPE_p_switch_core_session session, string app, int flags) {
|
||||
freeswitchPINVOKE.switch_ivr_broadcast_in_thread(SWIGTYPE_p_switch_core_session.getCPtr(session), app, flags);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_transfer_variable(SWIGTYPE_p_switch_core_session sessa, SWIGTYPE_p_switch_core_session sessb, string var) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_transfer_variable(SWIGTYPE_p_switch_core_session.getCPtr(sessa), SWIGTYPE_p_switch_core_session.getCPtr(sessb), var);
|
||||
return ret;
|
||||
@@ -4348,6 +4393,64 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_create(SWIGTYPE_p_p_switch_ivr_dmachine dmachine_p, string name, SWIGTYPE_p_apr_pool_t pool, uint digit_timeout, uint input_timeout, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t match_callback, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t nonmatch_callback, SWIGTYPE_p_void user_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_create(SWIGTYPE_p_p_switch_ivr_dmachine.getCPtr(dmachine_p), name, SWIGTYPE_p_apr_pool_t.getCPtr(pool), digit_timeout, input_timeout, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(match_callback), SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(nonmatch_callback), SWIGTYPE_p_void.getCPtr(user_data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_destroy(SWIGTYPE_p_p_switch_ivr_dmachine dmachine) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_destroy(SWIGTYPE_p_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_bind(SWIGTYPE_p_switch_ivr_dmachine dmachine, string realm, string digits, int key, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t callback, SWIGTYPE_p_void user_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_bind(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), realm, digits, key, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(callback), SWIGTYPE_p_void.getCPtr(user_data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_feed(SWIGTYPE_p_switch_ivr_dmachine dmachine, string digits, SWIGTYPE_p_p_switch_ivr_dmachine_match match) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_feed(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), digits, SWIGTYPE_p_p_switch_ivr_dmachine_match.getCPtr(match));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_clear(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_clear(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_ping(SWIGTYPE_p_switch_ivr_dmachine dmachine, SWIGTYPE_p_p_switch_ivr_dmachine_match match_p) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_ping(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), SWIGTYPE_p_p_switch_ivr_dmachine_match.getCPtr(match_p));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_ivr_dmachine_match switch_ivr_dmachine_get_match(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_ivr_dmachine_get_match(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
switch_ivr_dmachine_match ret = (cPtr == IntPtr.Zero) ? null : new switch_ivr_dmachine_match(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_ivr_dmachine_get_failed_digits(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
string ret = freeswitchPINVOKE.switch_ivr_dmachine_get_failed_digits(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_set_digit_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine dmachine, uint digit_timeout_ms) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_set_digit_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), digit_timeout_ms);
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_set_input_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine dmachine, uint input_timeout_ms) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_set_input_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), input_timeout_ms);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_clear_realm(SWIGTYPE_p_switch_ivr_dmachine dmachine, string realm) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_clear_realm(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), realm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_set_realm(SWIGTYPE_p_switch_ivr_dmachine dmachine, string realm) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_set_realm(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), realm);
|
||||
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();
|
||||
@@ -5188,6 +5291,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_CURRENT_APPLICATION_VARIABLE = freeswitchPINVOKE.SWITCH_CURRENT_APPLICATION_VARIABLE_get();
|
||||
public static readonly string SWITCH_CURRENT_APPLICATION_DATA_VARIABLE = freeswitchPINVOKE.SWITCH_CURRENT_APPLICATION_DATA_VARIABLE_get();
|
||||
public static readonly string SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE = freeswitchPINVOKE.SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE_get();
|
||||
public static readonly string SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE = freeswitchPINVOKE.SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get();
|
||||
public static readonly string SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE = freeswitchPINVOKE.SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get();
|
||||
public static readonly string SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_READ_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_READ_RESULT_VARIABLE_get();
|
||||
@@ -5264,6 +5368,7 @@ public class freeswitch {
|
||||
public static readonly int SWITCH_CORE_QUEUE_LEN = freeswitchPINVOKE.SWITCH_CORE_QUEUE_LEN_get();
|
||||
public static readonly int SWITCH_MAX_MANAGEMENT_BUFFER_LEN = freeswitchPINVOKE.SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get();
|
||||
public static readonly int SWITCH_RTP_CNG_PAYLOAD = freeswitchPINVOKE.SWITCH_RTP_CNG_PAYLOAD_get();
|
||||
public static readonly int DMACHINE_MAX_DIGIT_LEN = freeswitchPINVOKE.DMACHINE_MAX_DIGIT_LEN_get();
|
||||
public static readonly int SWITCH_API_VERSION = freeswitchPINVOKE.SWITCH_API_VERSION_get();
|
||||
public static readonly int SWITCH_CORE_DB_OK = freeswitchPINVOKE.SWITCH_CORE_DB_OK_get();
|
||||
public static readonly int SWITCH_CORE_DB_ERROR = freeswitchPINVOKE.SWITCH_CORE_DB_ERROR_get();
|
||||
@@ -5714,6 +5819,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE_get")]
|
||||
public static extern string SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get")]
|
||||
public static extern string SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get")]
|
||||
public static extern string SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get();
|
||||
|
||||
@@ -5915,6 +6023,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_duration_get")]
|
||||
public static extern uint switch_dtmf_t_duration_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_flags_set")]
|
||||
public static extern void switch_dtmf_t_flags_set(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_flags_get")]
|
||||
public static extern int switch_dtmf_t_flags_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_dtmf_t")]
|
||||
public static extern IntPtr new_switch_dtmf_t();
|
||||
|
||||
@@ -6470,6 +6584,45 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_console_callback_match")]
|
||||
public static extern void delete_switch_console_callback_match(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_DMACHINE_MAX_DIGIT_LEN_get")]
|
||||
public static extern int DMACHINE_MAX_DIGIT_LEN_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_dmachine_set")]
|
||||
public static extern void switch_ivr_dmachine_match_dmachine_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_dmachine_get")]
|
||||
public static extern IntPtr switch_ivr_dmachine_match_dmachine_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_digits_set")]
|
||||
public static extern void switch_ivr_dmachine_match_match_digits_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_digits_get")]
|
||||
public static extern string switch_ivr_dmachine_match_match_digits_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_key_set")]
|
||||
public static extern void switch_ivr_dmachine_match_match_key_set(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_key_get")]
|
||||
public static extern int switch_ivr_dmachine_match_match_key_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_type_set")]
|
||||
public static extern void switch_ivr_dmachine_match_type_set(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_type_get")]
|
||||
public static extern int switch_ivr_dmachine_match_type_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_user_data_set")]
|
||||
public static extern void switch_ivr_dmachine_match_user_data_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_user_data_get")]
|
||||
public static extern IntPtr switch_ivr_dmachine_match_user_data_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_ivr_dmachine_match")]
|
||||
public static extern IntPtr new_switch_ivr_dmachine_match();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_ivr_dmachine_match")]
|
||||
public static extern void delete_switch_ivr_dmachine_match(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_input_callback_set")]
|
||||
public static extern void switch_input_args_t_input_callback_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -6500,6 +6653,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_user_data_get")]
|
||||
public static extern IntPtr switch_input_args_t_user_data_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_dmachine_set")]
|
||||
public static extern void switch_input_args_t_dmachine_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_dmachine_get")]
|
||||
public static extern IntPtr switch_input_args_t_dmachine_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_input_args_t")]
|
||||
public static extern IntPtr new_switch_input_args_t();
|
||||
|
||||
@@ -7202,6 +7361,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_soft_unlock")]
|
||||
public static extern void switch_core_session_soft_unlock(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_set_dmachine")]
|
||||
public static extern void switch_core_session_set_dmachine(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_dmachine")]
|
||||
public static extern IntPtr switch_core_session_get_dmachine(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_get_uuid")]
|
||||
public static extern string switch_core_get_uuid();
|
||||
|
||||
@@ -7970,6 +8135,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_in_thread")]
|
||||
public static extern int switch_core_session_in_thread(HandleRef jarg1);
|
||||
|
||||
[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_loadable_module_interface_module_name_set")]
|
||||
public static extern void switch_loadable_module_interface_module_name_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -8336,9 +8504,6 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_char_to_rfc2833")]
|
||||
public static extern byte switch_char_to_rfc2833(char jarg1);
|
||||
|
||||
[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_sanitize_number")]
|
||||
public static extern string switch_sanitize_number(string jarg1);
|
||||
|
||||
@@ -11849,6 +12014,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_broadcast")]
|
||||
public static extern int switch_ivr_broadcast(string jarg1, string jarg2, uint jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_broadcast_in_thread")]
|
||||
public static extern void switch_ivr_broadcast_in_thread(HandleRef jarg1, string jarg2, int jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_transfer_variable")]
|
||||
public static extern int switch_ivr_transfer_variable(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
|
||||
@@ -11972,6 +12140,42 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_exists")]
|
||||
public static extern int switch_ivr_uuid_exists(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_create")]
|
||||
public static extern int switch_ivr_dmachine_create(HandleRef jarg1, string jarg2, HandleRef jarg3, uint jarg4, uint jarg5, HandleRef jarg6, HandleRef jarg7, HandleRef jarg8);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_destroy")]
|
||||
public static extern void switch_ivr_dmachine_destroy(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_bind")]
|
||||
public static extern int switch_ivr_dmachine_bind(HandleRef jarg1, string jarg2, string jarg3, int jarg4, HandleRef jarg5, HandleRef jarg6);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_feed")]
|
||||
public static extern int switch_ivr_dmachine_feed(HandleRef jarg1, string jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_clear")]
|
||||
public static extern int switch_ivr_dmachine_clear(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_ping")]
|
||||
public static extern int switch_ivr_dmachine_ping(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_get_match")]
|
||||
public static extern IntPtr switch_ivr_dmachine_get_match(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_get_failed_digits")]
|
||||
public static extern string switch_ivr_dmachine_get_failed_digits(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_digit_timeout_ms")]
|
||||
public static extern void switch_ivr_dmachine_set_digit_timeout_ms(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_input_timeout_ms")]
|
||||
public static extern void switch_ivr_dmachine_set_input_timeout_ms(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_clear_realm")]
|
||||
public static extern int switch_ivr_dmachine_clear_realm(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_realm")]
|
||||
public static extern int switch_ivr_dmachine_set_realm(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
|
||||
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
|
||||
|
||||
@@ -15466,6 +15670,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t 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.0
|
||||
*
|
||||
* 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_ivr_menu_p_char_p_char_size_t_p_void__switch_ivr_action_t {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -16846,6 +17080,66 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_p_switch_ivr_dmachine {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_p_switch_ivr_dmachine(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_p_switch_ivr_dmachine() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_ivr_dmachine 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.0
|
||||
*
|
||||
* 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_p_switch_ivr_dmachine_match {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_p_switch_ivr_dmachine_match(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_p_switch_ivr_dmachine_match() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_ivr_dmachine_match 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.0
|
||||
*
|
||||
* 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_p_switch_ivr_menu {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -17686,6 +17980,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_switch_ivr_dmachine {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_switch_ivr_dmachine(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_switch_ivr_dmachine() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_switch_ivr_dmachine 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.0
|
||||
*
|
||||
* 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_switch_ivr_menu {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -20927,6 +21251,8 @@ public enum switch_channel_flag_t {
|
||||
CF_EARLY_HANGUP,
|
||||
CF_MEDIA_SET,
|
||||
CF_CONSUME_ON_ORIGINATE,
|
||||
CF_PASSTHRU_PTIME_MISMATCH,
|
||||
CF_BRIDGE_NOWRITE,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
@@ -23499,6 +23825,16 @@ public class switch_dtmf_t : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public int flags {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_dtmf_t_flags_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_dtmf_t_flags_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_dtmf_t() : this(freeswitchPINVOKE.new_switch_dtmf_t(), true) {
|
||||
}
|
||||
|
||||
@@ -25078,6 +25414,17 @@ public class switch_input_args_t : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_switch_ivr_dmachine dmachine {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_input_args_t_dmachine_set(swigCPtr, SWIGTYPE_p_switch_ivr_dmachine.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_input_args_t_dmachine_get(swigCPtr);
|
||||
SWIGTYPE_p_switch_ivr_dmachine ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_ivr_dmachine(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_input_args_t() : this(freeswitchPINVOKE.new_switch_input_args_t(), true) {
|
||||
}
|
||||
|
||||
@@ -26387,6 +26734,107 @@ public enum switch_ivr_action_t {
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class switch_ivr_dmachine_match : IDisposable {
|
||||
private HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
internal switch_ivr_dmachine_match(IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(switch_ivr_dmachine_match obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~switch_ivr_dmachine_match() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public virtual void Dispose() {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
freeswitchPINVOKE.delete_switch_ivr_dmachine_match(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_switch_ivr_dmachine dmachine {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_dmachine_set(swigCPtr, SWIGTYPE_p_switch_ivr_dmachine.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_ivr_dmachine_match_dmachine_get(swigCPtr);
|
||||
SWIGTYPE_p_switch_ivr_dmachine ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_ivr_dmachine(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string match_digits {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_match_digits_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_ivr_dmachine_match_match_digits_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public int match_key {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_match_key_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_ivr_dmachine_match_match_key_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public dm_match_type_t type {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_type_set(swigCPtr, (int)value);
|
||||
}
|
||||
get {
|
||||
dm_match_type_t ret = (dm_match_type_t)freeswitchPINVOKE.switch_ivr_dmachine_match_type_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_void user_data {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_user_data_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_ivr_dmachine_match_user_data_get(swigCPtr);
|
||||
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_ivr_dmachine_match() : this(freeswitchPINVOKE.new_switch_ivr_dmachine_match(), true) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.0
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
public enum switch_ivr_menu_flags {
|
||||
SWITCH_IVR_MENU_FLAG_FALLTOMAIN = (1 << 0),
|
||||
SWITCH_IVR_MENU_FLAG_FREEPOOL = (1 << 1),
|
||||
@@ -29377,6 +29825,7 @@ public enum switch_status_t {
|
||||
SWITCH_STATUS_NOUNLOAD,
|
||||
SWITCH_STATUS_IGNORE,
|
||||
SWITCH_STATUS_TOO_SMALL,
|
||||
SWITCH_STATUS_FOUND,
|
||||
SWITCH_STATUS_NOT_INITALIZED
|
||||
}
|
||||
|
||||
|
||||
@@ -436,6 +436,22 @@ public class CoreSession : IDisposable {
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
public enum dm_match_type_t {
|
||||
DM_MATCH_POSITIVE,
|
||||
DM_MATCH_NEGATIVE
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* 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;
|
||||
|
||||
@@ -503,6 +519,21 @@ public class DTMF : IDisposable {
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
public enum dtmf_flag_t {
|
||||
DTMF_FLAG_SKIP_PROCESS = (1 << 0)
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* 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;
|
||||
|
||||
@@ -1291,6 +1322,16 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_core_session_soft_unlock(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
}
|
||||
|
||||
public static void switch_core_session_set_dmachine(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
freeswitchPINVOKE.switch_core_session_set_dmachine(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
}
|
||||
|
||||
public static SWIGTYPE_p_switch_ivr_dmachine switch_core_session_get_dmachine(SWIGTYPE_p_switch_core_session session) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_core_session_get_dmachine(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
SWIGTYPE_p_switch_ivr_dmachine ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_ivr_dmachine(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_core_get_uuid() {
|
||||
string ret = freeswitchPINVOKE.switch_core_get_uuid();
|
||||
return ret;
|
||||
@@ -1673,6 +1714,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_codec_parse_fmtp(string codec_name, string fmtp, uint rate, switch_codec_fmtp codec_fmtp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_codec_parse_fmtp(codec_name, fmtp, rate, switch_codec_fmtp.getCPtr(codec_fmtp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_codec_reset(switch_codec codec) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_codec_reset(switch_codec.getCPtr(codec));
|
||||
return ret;
|
||||
@@ -2299,6 +2345,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_default_ptime(string name, uint number) {
|
||||
uint ret = freeswitchPINVOKE.switch_default_ptime(name, number);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_loadable_module_init(switch_bool_t autoload) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_loadable_module_init((int)autoload);
|
||||
return ret;
|
||||
@@ -2635,6 +2686,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_known_bitrate(byte payload) {
|
||||
uint ret = freeswitchPINVOKE.switch_known_bitrate(payload);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static SWIGTYPE_p_switch_size_t switch_fd_read_line(int fd, string buf, SWIGTYPE_p_switch_size_t len) {
|
||||
SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_fd_read_line(fd, buf, SWIGTYPE_p_switch_size_t.getCPtr(len)), true);
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -2715,11 +2771,6 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_default_ptime(string name, uint number) {
|
||||
uint ret = freeswitchPINVOKE.switch_default_ptime(name, number);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_sanitize_number(string number) {
|
||||
string ret = freeswitchPINVOKE.switch_sanitize_number(number);
|
||||
return ret;
|
||||
@@ -3178,13 +3229,17 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_export_variable_var_check(SWIGTYPE_p_switch_channel channel, string varname, string value, 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, value, (int)var_check);
|
||||
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;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_export_variable_printf(SWIGTYPE_p_switch_channel channel, string varname, string fmt) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_export_variable_printf(SWIGTYPE_p_switch_channel.getCPtr(channel), varname, fmt);
|
||||
public static void switch_channel_process_export(SWIGTYPE_p_switch_channel channel, SWIGTYPE_p_switch_channel peer_channel, switch_event var_event, string export_varname) {
|
||||
freeswitchPINVOKE.switch_channel_process_export(SWIGTYPE_p_switch_channel.getCPtr(channel), SWIGTYPE_p_switch_channel.getCPtr(peer_channel), switch_event.getCPtr(var_event), export_varname);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_export_variable_printf(SWIGTYPE_p_switch_channel channel, string varname, string export_varname, string fmt) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_export_variable_printf(SWIGTYPE_p_switch_channel.getCPtr(channel), varname, export_varname, fmt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4120,6 +4175,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_broadcast_in_thread(SWIGTYPE_p_switch_core_session session, string app, int flags) {
|
||||
freeswitchPINVOKE.switch_ivr_broadcast_in_thread(SWIGTYPE_p_switch_core_session.getCPtr(session), app, flags);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_transfer_variable(SWIGTYPE_p_switch_core_session sessa, SWIGTYPE_p_switch_core_session sessb, string var) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_transfer_variable(SWIGTYPE_p_switch_core_session.getCPtr(sessa), SWIGTYPE_p_switch_core_session.getCPtr(sessb), var);
|
||||
return ret;
|
||||
@@ -4324,6 +4383,64 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_create(SWIGTYPE_p_p_switch_ivr_dmachine dmachine_p, string name, SWIGTYPE_p_apr_pool_t pool, uint digit_timeout, uint input_timeout, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t match_callback, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t nonmatch_callback, SWIGTYPE_p_void user_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_create(SWIGTYPE_p_p_switch_ivr_dmachine.getCPtr(dmachine_p), name, SWIGTYPE_p_apr_pool_t.getCPtr(pool), digit_timeout, input_timeout, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(match_callback), SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(nonmatch_callback), SWIGTYPE_p_void.getCPtr(user_data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_destroy(SWIGTYPE_p_p_switch_ivr_dmachine dmachine) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_destroy(SWIGTYPE_p_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_bind(SWIGTYPE_p_switch_ivr_dmachine dmachine, string realm, string digits, int key, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t callback, SWIGTYPE_p_void user_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_bind(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), realm, digits, key, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(callback), SWIGTYPE_p_void.getCPtr(user_data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_feed(SWIGTYPE_p_switch_ivr_dmachine dmachine, string digits, SWIGTYPE_p_p_switch_ivr_dmachine_match match) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_feed(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), digits, SWIGTYPE_p_p_switch_ivr_dmachine_match.getCPtr(match));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_clear(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_clear(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_ping(SWIGTYPE_p_switch_ivr_dmachine dmachine, SWIGTYPE_p_p_switch_ivr_dmachine_match match_p) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_ping(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), SWIGTYPE_p_p_switch_ivr_dmachine_match.getCPtr(match_p));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_ivr_dmachine_match switch_ivr_dmachine_get_match(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_ivr_dmachine_get_match(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
switch_ivr_dmachine_match ret = (cPtr == IntPtr.Zero) ? null : new switch_ivr_dmachine_match(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_ivr_dmachine_get_failed_digits(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
string ret = freeswitchPINVOKE.switch_ivr_dmachine_get_failed_digits(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_set_digit_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine dmachine, uint digit_timeout_ms) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_set_digit_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), digit_timeout_ms);
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_set_input_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine dmachine, uint input_timeout_ms) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_set_input_timeout_ms(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), input_timeout_ms);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_clear_realm(SWIGTYPE_p_switch_ivr_dmachine dmachine, string realm) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_clear_realm(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), realm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_dmachine_set_realm(SWIGTYPE_p_switch_ivr_dmachine dmachine, string realm) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_set_realm(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), realm);
|
||||
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();
|
||||
@@ -5164,6 +5281,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_CURRENT_APPLICATION_VARIABLE = freeswitchPINVOKE.SWITCH_CURRENT_APPLICATION_VARIABLE_get();
|
||||
public static readonly string SWITCH_CURRENT_APPLICATION_DATA_VARIABLE = freeswitchPINVOKE.SWITCH_CURRENT_APPLICATION_DATA_VARIABLE_get();
|
||||
public static readonly string SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE = freeswitchPINVOKE.SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE_get();
|
||||
public static readonly string SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE = freeswitchPINVOKE.SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get();
|
||||
public static readonly string SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE = freeswitchPINVOKE.SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get();
|
||||
public static readonly string SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_READ_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_READ_RESULT_VARIABLE_get();
|
||||
@@ -5196,6 +5314,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_ENDPOINT_DISPOSITION_VARIABLE = freeswitchPINVOKE.SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get();
|
||||
public static readonly string SWITCH_HOLD_MUSIC_VARIABLE = freeswitchPINVOKE.SWITCH_HOLD_MUSIC_VARIABLE_get();
|
||||
public static readonly string SWITCH_EXPORT_VARS_VARIABLE = freeswitchPINVOKE.SWITCH_EXPORT_VARS_VARIABLE_get();
|
||||
public static readonly string SWITCH_BRIDGE_EXPORT_VARS_VARIABLE = freeswitchPINVOKE.SWITCH_BRIDGE_EXPORT_VARS_VARIABLE_get();
|
||||
public static readonly string SWITCH_R_SDP_VARIABLE = freeswitchPINVOKE.SWITCH_R_SDP_VARIABLE_get();
|
||||
public static readonly string SWITCH_L_SDP_VARIABLE = freeswitchPINVOKE.SWITCH_L_SDP_VARIABLE_get();
|
||||
public static readonly string SWITCH_B_SDP_VARIABLE = freeswitchPINVOKE.SWITCH_B_SDP_VARIABLE_get();
|
||||
@@ -5239,6 +5358,7 @@ public class freeswitch {
|
||||
public static readonly int SWITCH_CORE_QUEUE_LEN = freeswitchPINVOKE.SWITCH_CORE_QUEUE_LEN_get();
|
||||
public static readonly int SWITCH_MAX_MANAGEMENT_BUFFER_LEN = freeswitchPINVOKE.SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get();
|
||||
public static readonly int SWITCH_RTP_CNG_PAYLOAD = freeswitchPINVOKE.SWITCH_RTP_CNG_PAYLOAD_get();
|
||||
public static readonly int DMACHINE_MAX_DIGIT_LEN = freeswitchPINVOKE.DMACHINE_MAX_DIGIT_LEN_get();
|
||||
public static readonly int SWITCH_API_VERSION = freeswitchPINVOKE.SWITCH_API_VERSION_get();
|
||||
public static readonly int SWITCH_CORE_DB_OK = freeswitchPINVOKE.SWITCH_CORE_DB_OK_get();
|
||||
public static readonly int SWITCH_CORE_DB_ERROR = freeswitchPINVOKE.SWITCH_CORE_DB_ERROR_get();
|
||||
@@ -5685,6 +5805,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE_get")]
|
||||
public static extern string SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get")]
|
||||
public static extern string SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get")]
|
||||
public static extern string SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get();
|
||||
|
||||
@@ -5781,6 +5904,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_EXPORT_VARS_VARIABLE_get")]
|
||||
public static extern string SWITCH_EXPORT_VARS_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_BRIDGE_EXPORT_VARS_VARIABLE_get")]
|
||||
public static extern string SWITCH_BRIDGE_EXPORT_VARS_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_R_SDP_VARIABLE_get")]
|
||||
public static extern string SWITCH_R_SDP_VARIABLE_get();
|
||||
|
||||
@@ -5883,6 +6009,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_duration_get")]
|
||||
public static extern uint switch_dtmf_t_duration_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_flags_set")]
|
||||
public static extern void switch_dtmf_t_flags_set(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_flags_get")]
|
||||
public static extern int switch_dtmf_t_flags_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_dtmf_t")]
|
||||
public static extern IntPtr new_switch_dtmf_t();
|
||||
|
||||
@@ -6438,6 +6570,45 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_console_callback_match")]
|
||||
public static extern void delete_switch_console_callback_match(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_DMACHINE_MAX_DIGIT_LEN_get")]
|
||||
public static extern int DMACHINE_MAX_DIGIT_LEN_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_dmachine_set")]
|
||||
public static extern void switch_ivr_dmachine_match_dmachine_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_dmachine_get")]
|
||||
public static extern IntPtr switch_ivr_dmachine_match_dmachine_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_digits_set")]
|
||||
public static extern void switch_ivr_dmachine_match_match_digits_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_digits_get")]
|
||||
public static extern string switch_ivr_dmachine_match_match_digits_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_key_set")]
|
||||
public static extern void switch_ivr_dmachine_match_match_key_set(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_match_key_get")]
|
||||
public static extern int switch_ivr_dmachine_match_match_key_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_type_set")]
|
||||
public static extern void switch_ivr_dmachine_match_type_set(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_type_get")]
|
||||
public static extern int switch_ivr_dmachine_match_type_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_user_data_set")]
|
||||
public static extern void switch_ivr_dmachine_match_user_data_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_match_user_data_get")]
|
||||
public static extern IntPtr switch_ivr_dmachine_match_user_data_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_ivr_dmachine_match")]
|
||||
public static extern IntPtr new_switch_ivr_dmachine_match();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_ivr_dmachine_match")]
|
||||
public static extern void delete_switch_ivr_dmachine_match(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_input_callback_set")]
|
||||
public static extern void switch_input_args_t_input_callback_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -6468,6 +6639,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_user_data_get")]
|
||||
public static extern IntPtr switch_input_args_t_user_data_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_dmachine_set")]
|
||||
public static extern void switch_input_args_t_dmachine_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_input_args_t_dmachine_get")]
|
||||
public static extern IntPtr switch_input_args_t_dmachine_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_input_args_t")]
|
||||
public static extern IntPtr new_switch_input_args_t();
|
||||
|
||||
@@ -7170,6 +7347,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_soft_unlock")]
|
||||
public static extern void switch_core_session_soft_unlock(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_set_dmachine")]
|
||||
public static extern void switch_core_session_set_dmachine(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_dmachine")]
|
||||
public static extern IntPtr switch_core_session_get_dmachine(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_get_uuid")]
|
||||
public static extern string switch_core_get_uuid();
|
||||
|
||||
@@ -7401,6 +7584,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_copy")]
|
||||
public static extern int switch_core_codec_copy(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_parse_fmtp")]
|
||||
public static extern int switch_core_codec_parse_fmtp(string jarg1, string jarg2, uint jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_reset")]
|
||||
public static extern int switch_core_codec_reset(HandleRef jarg1);
|
||||
|
||||
@@ -7935,6 +8121,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_in_thread")]
|
||||
public static extern int switch_core_session_in_thread(HandleRef jarg1);
|
||||
|
||||
[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_loadable_module_interface_module_name_set")]
|
||||
public static extern void switch_loadable_module_interface_module_name_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -8253,6 +8442,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_is_digit_string")]
|
||||
public static extern int switch_is_digit_string(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_known_bitrate")]
|
||||
public static extern uint switch_known_bitrate(byte jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_fd_read_line")]
|
||||
public static extern IntPtr switch_fd_read_line(int jarg1, string jarg2, HandleRef jarg3);
|
||||
|
||||
@@ -8298,9 +8490,6 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_char_to_rfc2833")]
|
||||
public static extern byte switch_char_to_rfc2833(char jarg1);
|
||||
|
||||
[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_sanitize_number")]
|
||||
public static extern string switch_sanitize_number(string jarg1);
|
||||
|
||||
@@ -10966,10 +11155,13 @@ class freeswitchPINVOKE {
|
||||
public static extern string switch_channel_get_variable_partner(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_export_variable_var_check")]
|
||||
public static extern int switch_channel_export_variable_var_check(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
|
||||
public static extern int switch_channel_export_variable_var_check(HandleRef jarg1, string jarg2, string jarg3, string jarg4, int jarg5);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_process_export")]
|
||||
public static extern void switch_channel_process_export(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, string jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_export_variable_printf")]
|
||||
public static extern int switch_channel_export_variable_printf(HandleRef jarg1, string jarg2, string jarg3);
|
||||
public static extern int switch_channel_export_variable_printf(HandleRef jarg1, string jarg2, string jarg3, string jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_variable_dup")]
|
||||
public static extern string switch_channel_get_variable_dup(HandleRef jarg1, string jarg2, int jarg3);
|
||||
@@ -11808,6 +12000,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_broadcast")]
|
||||
public static extern int switch_ivr_broadcast(string jarg1, string jarg2, uint jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_broadcast_in_thread")]
|
||||
public static extern void switch_ivr_broadcast_in_thread(HandleRef jarg1, string jarg2, int jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_transfer_variable")]
|
||||
public static extern int switch_ivr_transfer_variable(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
|
||||
@@ -11931,6 +12126,42 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_exists")]
|
||||
public static extern int switch_ivr_uuid_exists(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_create")]
|
||||
public static extern int switch_ivr_dmachine_create(HandleRef jarg1, string jarg2, HandleRef jarg3, uint jarg4, uint jarg5, HandleRef jarg6, HandleRef jarg7, HandleRef jarg8);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_destroy")]
|
||||
public static extern void switch_ivr_dmachine_destroy(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_bind")]
|
||||
public static extern int switch_ivr_dmachine_bind(HandleRef jarg1, string jarg2, string jarg3, int jarg4, HandleRef jarg5, HandleRef jarg6);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_feed")]
|
||||
public static extern int switch_ivr_dmachine_feed(HandleRef jarg1, string jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_clear")]
|
||||
public static extern int switch_ivr_dmachine_clear(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_ping")]
|
||||
public static extern int switch_ivr_dmachine_ping(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_get_match")]
|
||||
public static extern IntPtr switch_ivr_dmachine_get_match(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_get_failed_digits")]
|
||||
public static extern string switch_ivr_dmachine_get_failed_digits(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_digit_timeout_ms")]
|
||||
public static extern void switch_ivr_dmachine_set_digit_timeout_ms(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_input_timeout_ms")]
|
||||
public static extern void switch_ivr_dmachine_set_input_timeout_ms(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_clear_realm")]
|
||||
public static extern int switch_ivr_dmachine_clear_realm(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_realm")]
|
||||
public static extern int switch_ivr_dmachine_set_realm(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
|
||||
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
|
||||
|
||||
@@ -15417,6 +15648,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t 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_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -16767,6 +17028,66 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_p_switch_ivr_dmachine {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_p_switch_ivr_dmachine(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_p_switch_ivr_dmachine() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_ivr_dmachine 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_p_switch_ivr_dmachine_match {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_p_switch_ivr_dmachine_match(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_p_switch_ivr_dmachine_match() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_ivr_dmachine_match 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_p_switch_ivr_menu {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -17607,6 +17928,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_switch_ivr_dmachine {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_switch_ivr_dmachine(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_switch_ivr_dmachine() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_switch_ivr_dmachine 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_switch_ivr_menu_action_function_t {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -20848,6 +21199,8 @@ public enum switch_channel_flag_t {
|
||||
CF_EARLY_HANGUP,
|
||||
CF_MEDIA_SET,
|
||||
CF_CONSUME_ON_ORIGINATE,
|
||||
CF_PASSTHRU_PTIME_MISMATCH,
|
||||
CF_BRIDGE_NOWRITE,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
@@ -23384,6 +23737,16 @@ public class switch_dtmf_t : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public int flags {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_dtmf_t_flags_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_dtmf_t_flags_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_dtmf_t() : this(freeswitchPINVOKE.new_switch_dtmf_t(), true) {
|
||||
}
|
||||
|
||||
@@ -24949,6 +25312,17 @@ public class switch_input_args_t : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_switch_ivr_dmachine dmachine {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_input_args_t_dmachine_set(swigCPtr, SWIGTYPE_p_switch_ivr_dmachine.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_input_args_t_dmachine_get(swigCPtr);
|
||||
SWIGTYPE_p_switch_ivr_dmachine ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_ivr_dmachine(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_input_args_t() : this(freeswitchPINVOKE.new_switch_input_args_t(), true) {
|
||||
}
|
||||
|
||||
@@ -26230,6 +26604,105 @@ public enum switch_ivr_action_t {
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class switch_ivr_dmachine_match : IDisposable {
|
||||
private HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
internal switch_ivr_dmachine_match(IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(switch_ivr_dmachine_match obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~switch_ivr_dmachine_match() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public virtual void Dispose() {
|
||||
lock(this) {
|
||||
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
freeswitchPINVOKE.delete_switch_ivr_dmachine_match(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_switch_ivr_dmachine dmachine {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_dmachine_set(swigCPtr, SWIGTYPE_p_switch_ivr_dmachine.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_ivr_dmachine_match_dmachine_get(swigCPtr);
|
||||
SWIGTYPE_p_switch_ivr_dmachine ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_ivr_dmachine(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string match_digits {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_match_digits_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_ivr_dmachine_match_match_digits_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public int match_key {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_match_key_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_ivr_dmachine_match_match_key_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public dm_match_type_t type {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_type_set(swigCPtr, (int)value);
|
||||
}
|
||||
get {
|
||||
dm_match_type_t ret = (dm_match_type_t)freeswitchPINVOKE.switch_ivr_dmachine_match_type_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_void user_data {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_match_user_data_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_ivr_dmachine_match_user_data_get(swigCPtr);
|
||||
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_ivr_dmachine_match() : this(freeswitchPINVOKE.new_switch_ivr_dmachine_match(), true) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* 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 {
|
||||
|
||||
public enum switch_ivr_menu_flags {
|
||||
SWITCH_IVR_MENU_FLAG_FALLTOMAIN = (1 << 0),
|
||||
SWITCH_IVR_MENU_FLAG_FREEPOOL = (1 << 1),
|
||||
@@ -29186,6 +29659,7 @@ public enum switch_status_t {
|
||||
SWITCH_STATUS_NOUNLOAD,
|
||||
SWITCH_STATUS_IGNORE,
|
||||
SWITCH_STATUS_TOO_SMALL,
|
||||
SWITCH_STATUS_FOUND,
|
||||
SWITCH_STATUS_NOT_INITALIZED
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
move freeswitch_wrap.cxx freeswitch_wrap.bak
|
||||
\dev\swig20\swig.exe -I..\..\..\include -v -O -c++ -csharp -namespace FreeSWITCH.Native -dllimport mod_managed -DSWIG_CSHARP_NO_STRING_HELPER freeswitch.i
|
||||
del swig.csx
|
||||
move freeswitch_wrap.cxx freeswitch_wrap.2010.cxx
|
||||
move freeswitch_wrap.bak freeswitch_wrap.cxx
|
||||
@ECHO OFF
|
||||
for %%X in (*.cs) do type %%X >> swig.csx
|
||||
@ECHO ON
|
||||
move swig.csx managed\swig.2010.cs
|
||||
del *.cs
|
||||
@@ -1,4 +1,4 @@
|
||||
\dev\swig\swig.exe -I..\..\..\include -v -O -c++ -csharp -namespace FreeSWITCH.Native -dllimport mod_managed -DSWIG_CSHARP_NO_STRING_HELPER freeswitch.i
|
||||
\dev\swig135\swig.exe -I..\..\..\include -v -O -c++ -csharp -namespace FreeSWITCH.Native -dllimport mod_managed -DSWIG_CSHARP_NO_STRING_HELPER freeswitch.i
|
||||
del swig.csx
|
||||
@ECHO OFF
|
||||
for %%X in (*.cs) do type %%X >> swig.csx
|
||||
|
||||
@@ -9732,17 +9732,17 @@ XS(SWIG_init) {
|
||||
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
|
||||
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
|
||||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
|
||||
SvREADONLY_on(sv);
|
||||
} while(0) /*@SWIG@*/;
|
||||
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
|
||||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
|
||||
SvREADONLY_on(sv);
|
||||
} while(0) /*@SWIG@*/;
|
||||
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
|
||||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
|
||||
SvREADONLY_on(sv);
|
||||
|
||||
@@ -0,0 +1,502 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the name of the original author; nor the names of any contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Braga Bruno <bruno.braga@gmail.com>
|
||||
*
|
||||
*
|
||||
* mod_say_ja.c -- Say for Japanese.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_say_ja_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_say_ja, mod_say_ja_load, NULL, NULL);
|
||||
|
||||
#define say_num(num, meth) { \
|
||||
char tmp[80]; \
|
||||
switch_status_t tstatus; \
|
||||
switch_say_method_t smeth = say_args->method; \
|
||||
switch_say_type_t stype = say_args->type; \
|
||||
say_args->type = SST_ITEMS; say_args->method = meth; \
|
||||
switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num); \
|
||||
if ((tstatus = \
|
||||
ja_say_general_count(session, tmp, say_args, args)) \
|
||||
!= SWITCH_STATUS_SUCCESS) { \
|
||||
return tstatus; \
|
||||
} \
|
||||
say_args->method = smeth; say_args->type = stype; \
|
||||
} \
|
||||
|
||||
#define say_file(...) { \
|
||||
char tmp[80]; \
|
||||
switch_status_t tstatus; \
|
||||
switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__); \
|
||||
if ((tstatus = \
|
||||
switch_ivr_play_file(session, NULL, tmp, args)) \
|
||||
!= SWITCH_STATUS_SUCCESS){ \
|
||||
return tstatus; \
|
||||
} \
|
||||
if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
|
||||
return SWITCH_STATUS_FALSE; \
|
||||
}} \
|
||||
|
||||
static switch_status_t ja_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
|
||||
{
|
||||
int in;
|
||||
char sbuf[13] = "";
|
||||
char digits[11];
|
||||
int i;
|
||||
|
||||
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
in = atoi(tosay);
|
||||
|
||||
if (in != 0) {
|
||||
snprintf(digits, sizeof(digits), "%10.10d", in);
|
||||
switch (say_args->method) {
|
||||
case SSM_COUNTED:
|
||||
say_file("digits/ordinal.wav");
|
||||
/* Fall through */
|
||||
case SSM_PRONOUNCED:
|
||||
for (i = 0; i <= 9; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
/* Billions column */
|
||||
if (digits[i] != '0') {
|
||||
if (digits[i] != '1')
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/10.wav");
|
||||
if (memcmp(digits + 1, "0", 1) == 0)
|
||||
say_file("digits/100000000.wav", digits[i]);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
/* Hundred millions columns */
|
||||
if (digits[i] != '0') {
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/100000000.wav", digits[i]);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
/* Ten millions column */
|
||||
if (digits[i] != '0') {
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/1000.wav");
|
||||
if (memcmp(digits + 3, "000", 3) == 0)
|
||||
say_file("digits/10000.wav", digits[i]);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
/* Millions column */
|
||||
if (digits[i] != '0') {
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/100.wav");
|
||||
if (memcmp(digits + 4, "00", 2) == 0)
|
||||
say_file("digits/10000.wav", digits[i]);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
/* Hundred thousands column */
|
||||
if (digits[i] != '0') {
|
||||
if (digits[i] != '1')
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/10.wav");
|
||||
if (memcmp(digits + 5, "0", 1) == 0)
|
||||
say_file("digits/10000.wav", digits[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
/* Ten thousands column */
|
||||
if (digits[i] != '0') {
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/10000.wav");
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
/* thousands column */
|
||||
if (digits[i] != '0') {
|
||||
|
||||
switch (digits[i]) {
|
||||
case '1':
|
||||
if (memcmp(digits, "000000", 6) != 0) {
|
||||
say_file("digits/1000s.wav");
|
||||
} else {
|
||||
say_file("digits/1000.wav");
|
||||
}
|
||||
break;
|
||||
case '3':
|
||||
say_file("digits/3000.wav");
|
||||
break;
|
||||
default:
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/1000.wav");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
/* hundreds column */
|
||||
if (digits[i] != '0') {
|
||||
switch (digits[i]) {
|
||||
case '1':
|
||||
say_file("digits/100.wav");
|
||||
break;
|
||||
case '3':
|
||||
say_file("digits/300.wav");
|
||||
break;
|
||||
case '6':
|
||||
say_file("digits/600.wav");
|
||||
break;
|
||||
case '8':
|
||||
say_file("digits/800.wav");
|
||||
break;
|
||||
default:
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/100.wav");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
/* Tens column */
|
||||
if (digits[i] != '0') {
|
||||
if (digits[i] != '1')
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
say_file("digits/10.wav");
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
/* Units column */
|
||||
if (digits[i] != '0')
|
||||
say_file("digits/%c.wav", digits[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SSM_ITERATED:
|
||||
{
|
||||
char *p;
|
||||
for (p = tosay; p && *p; p++)
|
||||
say_file("digits/%c.wav", *p);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
say_file("digits/0.wav");
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t ja_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
|
||||
{
|
||||
int32_t t;
|
||||
switch_time_t target = 0;
|
||||
switch_time_exp_t tm;
|
||||
uint8_t say_date = 0;
|
||||
uint8_t say_time = 0;
|
||||
|
||||
int mod_min;
|
||||
char buffer[3];
|
||||
|
||||
|
||||
if (say_args->type == SST_TIME_MEASUREMENT) {
|
||||
int64_t hours = 0;
|
||||
int64_t minutes = 0;
|
||||
int64_t seconds = 0;
|
||||
int64_t r = 0;
|
||||
if (strchr(tosay, ':')) {
|
||||
char *tme = switch_core_session_strdup(session, tosay);
|
||||
char *p;
|
||||
|
||||
if ((p = strrchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
seconds = atoi(p);
|
||||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((seconds = atoi(tosay)) <= 0) {
|
||||
seconds = (int64_t) switch_epoch_time_now(NULL);
|
||||
}
|
||||
|
||||
if (seconds >= 60) {
|
||||
minutes = seconds / 60;
|
||||
r = seconds % 60;
|
||||
seconds = r;
|
||||
}
|
||||
|
||||
if (minutes >= 60) {
|
||||
hours = minutes / 60;
|
||||
r = minutes % 60;
|
||||
minutes = r;
|
||||
}
|
||||
}
|
||||
|
||||
if (hours) {
|
||||
say_num(hours, SSM_PRONOUNCED);
|
||||
say_file("time/hours.wav");
|
||||
}
|
||||
if (minutes) {
|
||||
say_num(minutes, SSM_PRONOUNCED);
|
||||
say_file("time/minute.wav");
|
||||
} else {
|
||||
if (hours) {
|
||||
say_file("digits/0.wav");
|
||||
say_file("time/minute.wav");
|
||||
}
|
||||
}
|
||||
|
||||
if (seconds) {
|
||||
say_num(hours, SSM_PRONOUNCED);
|
||||
say_file("time/seconds.wav");
|
||||
} else {
|
||||
if (hours || minutes) {
|
||||
say_file("digits/0.wav");
|
||||
say_file("time/second.wav");
|
||||
}
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if ((t = atoi(tosay)) > 0)
|
||||
target = switch_time_make(t, 0);
|
||||
else
|
||||
target = switch_micro_time_now();
|
||||
switch_time_exp_lt(&tm, target);
|
||||
|
||||
switch (say_args->type) {
|
||||
case SST_CURRENT_DATE_TIME:
|
||||
say_date = say_time = 1;
|
||||
break;
|
||||
case SST_CURRENT_DATE:
|
||||
say_date = 1;
|
||||
break;
|
||||
case SST_CURRENT_TIME:
|
||||
say_time = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (say_date) {
|
||||
say_num(tm.tm_year + 1900, SSM_PRONOUNCED);
|
||||
say_file("time/year.wav");
|
||||
say_file("time/month-%d.wav", tm.tm_mon);
|
||||
say_file("time/day-%d.wav", tm.tm_mday);
|
||||
}
|
||||
|
||||
if (say_time) {
|
||||
int32_t hour = tm.tm_hour;
|
||||
|
||||
if (hour < 12) {
|
||||
say_file("time/am.wav");
|
||||
} else {
|
||||
say_file("time/pm.wav");
|
||||
}
|
||||
say_file("time/hour-%d.wav", tm.tm_hour);
|
||||
if (tm.tm_min > 10) {
|
||||
int temp;
|
||||
char tch[1+1];
|
||||
mod_min = tm.tm_min % 10;
|
||||
memset(buffer,0,sizeof(buffer));
|
||||
memset(tch,0,sizeof(tch));
|
||||
sprintf(buffer, "%d", tm.tm_min);
|
||||
memcpy(tch,buffer,1);
|
||||
temp = atoi(tch);
|
||||
if (temp > 1){
|
||||
say_num(temp,SSM_PRONOUNCED);
|
||||
}
|
||||
if (mod_min != 0){
|
||||
say_file("digits/10.wav");
|
||||
}
|
||||
else{
|
||||
mod_min = 10;
|
||||
}
|
||||
} else {
|
||||
mod_min = tm.tm_min;
|
||||
}
|
||||
switch(mod_min) {
|
||||
case 0:
|
||||
say_file("time/oclock.wav", mod_min);
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
case 6:
|
||||
case 8:
|
||||
case 10:
|
||||
say_file("time/min-%d.wav", mod_min);
|
||||
break;
|
||||
default:
|
||||
say_num(mod_min, SSM_PRONOUNCED);
|
||||
say_file("time/minute.wav");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t ja_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
|
||||
{
|
||||
char sbuf[16] = ""; /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
|
||||
char *dollars = NULL;
|
||||
char *cents = NULL;
|
||||
|
||||
if (strlen(tosay) > 15 || !(tosay = switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
dollars = sbuf;
|
||||
|
||||
if ((cents = strchr(sbuf, '.'))) {
|
||||
*cents++ = '\0';
|
||||
if (strlen(cents) > 2) {
|
||||
cents[2] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* If positive sign - skip over" */
|
||||
if (sbuf[0] == '+') {
|
||||
dollars++;
|
||||
}
|
||||
|
||||
/* If negative say "negative" */
|
||||
if (sbuf[0] == '-') {
|
||||
say_file("currency/negative.wav");
|
||||
dollars++;
|
||||
}
|
||||
|
||||
/* Say dollar amount */
|
||||
ja_say_general_count(session, dollars, say_args, args);
|
||||
say_file("currency/dollar.wav");
|
||||
|
||||
/* Say cents */
|
||||
if (cents) {
|
||||
ja_say_general_count(session, cents, say_args, args);
|
||||
} else {
|
||||
say_file("digits/0.wav");
|
||||
}
|
||||
say_file("currency/cent.wav");
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t ja_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
|
||||
{
|
||||
switch_say_callback_t say_cb = NULL;
|
||||
|
||||
switch (say_args->type) {
|
||||
case SST_NUMBER:
|
||||
case SST_ITEMS:
|
||||
case SST_PERSONS:
|
||||
case SST_MESSAGES:
|
||||
say_cb = ja_say_general_count;
|
||||
break;
|
||||
case SST_TIME_MEASUREMENT:
|
||||
case SST_CURRENT_DATE:
|
||||
case SST_CURRENT_TIME:
|
||||
case SST_CURRENT_DATE_TIME:
|
||||
say_cb = ja_say_time;
|
||||
break;
|
||||
case SST_IP_ADDRESS:
|
||||
return switch_ivr_say_ip(session, tosay, ja_say_general_count, say_args, args);
|
||||
break;
|
||||
case SST_NAME_SPELLED:
|
||||
case SST_NAME_PHONETIC:
|
||||
return switch_ivr_say_spell(session, tosay, say_args, args);
|
||||
break;
|
||||
case SST_CURRENCY:
|
||||
say_cb = ja_say_money;
|
||||
break;
|
||||
default:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unknown Say type=[%d]\n", say_args->type);
|
||||
break;
|
||||
}
|
||||
|
||||
if (say_cb) {
|
||||
return say_cb(session, tosay, say_args, args);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_say_ja_load)
|
||||
{
|
||||
switch_say_interface_t *say_interface;
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
say_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_SAY_INTERFACE);
|
||||
say_interface->interface_name = "ja";
|
||||
say_interface->say_function = ja_say;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
|
||||
*/
|
||||
Reference in new issue
Block a user