Merge branch 'master' of git@git.freeswitch.org:freeswitch

This commit is contained in:
David Yat Sin 2010-04-23 17:35:21 -04:00
commit 3b0024c392
14 changed files with 577 additions and 31 deletions

View File

@ -613,6 +613,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_valet_parking", "src\mo
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download JSON", "libs\win32\Download JSON.2008.vcproj", "{B808178B-82F0-4CF4-A2B1-921939FA24D0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "libs\win32\json\libjson.2008.vcproj", "{9778F1C0-09BC-4698-8EBC-BD982247209A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_curl", "src\mod\applications\mod_curl\mod_curl.2008.vcproj", "{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
{9778F1C0-09BC-4698-8EBC-BD982247209A} = {9778F1C0-09BC-4698-8EBC-BD982247209A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_json_cdr", "src\mod\event_handlers\mod_json_cdr\mod_json_cdr.2008.vcproj", "{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
{9778F1C0-09BC-4698-8EBC-BD982247209A} = {9778F1C0-09BC-4698-8EBC-BD982247209A}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -1602,7 +1620,6 @@ Global
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.All|Win32.Build.0 = Release|Win32
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.All|x64.ActiveCfg = Release|Win32
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Debug|Win32.ActiveCfg = Debug|Win32
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Debug|Win32.Build.0 = Debug|Win32
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Debug|x64.ActiveCfg = Debug|Win32
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Debug|x64.Build.0 = Debug|Win32
{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Release|Win32.ActiveCfg = Release|Win32
@ -2002,6 +2019,31 @@ Global
{432DB165-1EB2-4781-A9C0-71E62610B20A}.Release|Win32.Build.0 = Release|Win32
{432DB165-1EB2-4781-A9C0-71E62610B20A}.Release|x64.ActiveCfg = Release|x64
{432DB165-1EB2-4781-A9C0-71E62610B20A}.Release|x64.Build.0 = Release|x64
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.All|Win32.ActiveCfg = Release|Win32
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.All|x64.ActiveCfg = Release|Win32
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.Debug|Win32.ActiveCfg = Debug|Win32
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.Debug|Win32.Build.0 = Debug|Win32
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.Debug|x64.ActiveCfg = Debug|Win32
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.Release|Win32.ActiveCfg = Release|Win32
{B808178B-82F0-4CF4-A2B1-921939FA24D0}.Release|x64.ActiveCfg = Release|Win32
{9778F1C0-09BC-4698-8EBC-BD982247209A}.All|Win32.ActiveCfg = Release|Win32
{9778F1C0-09BC-4698-8EBC-BD982247209A}.All|x64.ActiveCfg = Release|Win32
{9778F1C0-09BC-4698-8EBC-BD982247209A}.Debug|Win32.ActiveCfg = Debug|Win32
{9778F1C0-09BC-4698-8EBC-BD982247209A}.Debug|x64.ActiveCfg = Debug|Win32
{9778F1C0-09BC-4698-8EBC-BD982247209A}.Release|Win32.ActiveCfg = Release|Win32
{9778F1C0-09BC-4698-8EBC-BD982247209A}.Release|x64.ActiveCfg = Release|Win32
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}.All|Win32.ActiveCfg = Release|Win32
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}.All|x64.ActiveCfg = Release|Win32
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}.Debug|Win32.ActiveCfg = Debug|Win32
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}.Debug|x64.ActiveCfg = Debug|Win32
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}.Release|Win32.ActiveCfg = Release|Win32
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}.Release|x64.ActiveCfg = Release|Win32
{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}.All|Win32.ActiveCfg = Release|Win32
{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}.All|x64.ActiveCfg = Release|Win32
{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}.Debug|Win32.ActiveCfg = Debug|Win32
{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}.Debug|x64.ActiveCfg = Debug|Win32
{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}.Release|Win32.ActiveCfg = Release|Win32
{EBE7452D-B3F7-4798-8EED-A0DDE2D738F5}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -9,8 +9,8 @@ Name: freeswitch
Summary: FreeSWITCH open source telephony platform
License: MPL
Group: Productivity/Telephony/Servers
Version: 1.0.4
Release: 1
Version: 1.0.7
Release: trunk
URL: http://www.freeswitch.org/
Packager: Michal Bielicki
Vendor: http://www.freeswitch.org/
@ -355,6 +355,7 @@ fi
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/autoload_configs
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/dialplan
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/dialplan/skinny-patterns
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/directory
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/directory/default
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang
@ -430,6 +431,7 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/dialplan/*.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/dialplan/default/*.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/dialplan/public/*.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/dialplan/skinny-patterns
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/directory/*.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/directory/default/*
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/ivr_menus/*.xml
@ -614,6 +616,9 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/dir/*.xml
%changelog
* Fr Apr 23 2010 - michal.bielicki@seventhsignal.de
- bumped spec file vrersion up to 1.0.7-trunk for trunk
- added skinny dialplan stuff to specfile
* Sun Mar 28 2010 - michal.bielicki@seventhsignal.de
- added sangoma codec config file
* Wed Dec 02 2009 - michal.bielicki@seventhsignal.de

View File

@ -617,9 +617,6 @@ static void handle_call_start_ack(sangomabc_connection_t *mcon, sangomabc_short_
return;
}
OUTBOUND_REQUESTS[event->call_setup_id].event = *event;
SETUP_GRID[event->span][event->chan] = event->call_setup_id;
if (mcon->sigmod) {
ftdmchan = OUTBOUND_REQUESTS[event->call_setup_id].ftdmchan;
} else {
@ -1011,8 +1008,8 @@ static void handle_call_start(ftdm_span_t *span, sangomabc_connection_t *mcon, s
} else if (ftdmchan->state == FTDM_CHANNEL_STATE_HANGUP || ftdm_test_sflag(ftdmchan, SFLAG_HANGUP)) {
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:FTDMCHAN STATE HANGUP -> Changed to HANGUP COMPLETE\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE, 0, r);
} else if (ftdmchan->state == FTDM_CHANNEL_STATE_DIALING) {
ftdm_log(FTDM_LOG_WARNING, "s%dc%d:Collision, hanging up incoming call\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
} else if (ftdmchan->state == FTDM_CHANNEL_STATE_DIALING) {
ftdm_log(FTDM_LOG_WARNING, "s%dc%d:Collision, hanging up incoming call\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING, 0, r);
} else {
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:FTDMCHAN STATE INVALID %s on IN CALL\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event), ftdm_channel_state2str(ftdmchan->state));
@ -1312,6 +1309,8 @@ static int parse_sangoma_event(ftdm_span_t *span, sangomabc_connection_t *mcon,
if (event->call_setup_id) {
nack_map[event->call_setup_id] = 0;
release_request_id(event->call_setup_id);
} else {
handle_call_done(span, mcon, event);
}
break;
case SIGBOOST_EVENT_INSERT_CHECK_LOOP:
@ -1921,13 +1920,17 @@ static int sigmod_ss7box_isup_exec_cmd(ftdm_stream_handle_t *stream, char *cmd)
static void ftdm_cli_span_state_cmd(ftdm_span_t *span, char *state)
{
unsigned j;
unsigned int j;
int cnt=0;
ftdm_channel_state_t state_e = ftdm_str2ftdm_channel_state(state);
if (state_e == FTDM_CHANNEL_STATE_INVALID) {
ftdm_log(FTDM_LOG_CRIT, "Checking for channels not in the INVALID state is probably not waht you want\n");
}
for(j = 1; j <= span->chan_count; j++) {
if (span->channels[j]->state != FTDM_CHANNEL_STATE_DOWN) {
if (span->channels[j]->state != state_e) {
ftdm_channel_t *ftdmchan = span->channels[j];
ftdm_log(FTDM_LOG_CRIT, "Channel %i s%dc%d State=%s\n",
j,ftdmchan->physical_span_id-1,ftdmchan->physical_chan_id-1,ftdm_channel_state2str(ftdmchan->state));
j, ftdmchan->physical_span_id-1, ftdmchan->physical_chan_id-1, ftdm_channel_state2str(ftdmchan->state));
cnt++;
}
}

View File

@ -383,7 +383,8 @@ typedef enum {
} ftdm_channel_state_t;
#define CHANNEL_STATE_STRINGS "DOWN", "HOLD", "SUSPENDED", "DIALTONE", "COLLECT", \
"RING", "BUSY", "ATTN", "GENRING", "DIALING", "GET_CALLERID", "CALLWAITING", \
"RESTART", "PROGRESS", "PROGRESS_MEDIA", "UP", "IDLE", "TERMINATING", "CANCEL", "HANGUP", "HANGUP_COMPLETE", "INVALID"
"RESTART", "PROGRESS", "PROGRESS_MEDIA", "UP", "IDLE", "TERMINATING", "CANCEL", \
"HANGUP", "HANGUP_COMPLETE", "IN_LOOP", "INVALID"
FTDM_STR2ENUM_P(ftdm_str2ftdm_channel_state, ftdm_channel_state2str, ftdm_channel_state_t)
typedef enum {

View File

@ -0,0 +1,2 @@
BASE=../../../..
include $(BASE)/build/modmake.rules

View File

@ -0,0 +1,102 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2010, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* 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>
*
*
* mod_mp4v.c -- MP4V Signed Linear Codec
*
*/
#include <switch.h>
SWITCH_MODULE_LOAD_FUNCTION(mod_mp4v_load);
SWITCH_MODULE_DEFINITION(mod_mp4v, mod_mp4v_load, NULL, NULL);
static switch_status_t switch_mp4v_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
if (!(encoding || decoding)) {
return SWITCH_STATUS_FALSE;
} else {
if (codec->fmtp_in) {
codec->fmtp_out = switch_core_strdup(codec->memory_pool, codec->fmtp_in);
}
return SWITCH_STATUS_SUCCESS;
}
}
static switch_status_t switch_mp4v_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
uint32_t decoded_rate, void *encoded_data, uint32_t *encoded_data_len, uint32_t *encoded_rate,
unsigned int *flag)
{
return SWITCH_STATUS_FALSE;
}
static switch_status_t switch_mp4v_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
uint32_t encoded_rate, void *decoded_data, uint32_t *decoded_data_len, uint32_t *decoded_rate,
unsigned int *flag)
{
return SWITCH_STATUS_FALSE;
}
static switch_status_t switch_mp4v_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MODULE_LOAD_FUNCTION(mod_mp4v_load)
{
switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
SWITCH_ADD_CODEC(codec_interface, "H.264 Video (passthru)");
switch_core_codec_add_implementation(pool, codec_interface,
SWITCH_CODEC_TYPE_VIDEO, 99, "MP4V-ES", NULL, 90000, 90000, 0,
0, 0, 0, 0, 1, 1, switch_mp4v_init, switch_mp4v_encode, switch_mp4v_decode, switch_mp4v_destroy);
/* 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:
*/

View File

@ -160,22 +160,29 @@ static switch_status_t sofia_on_reset(switch_core_session_t *session)
if (sofia_test_flag(tech_pvt, TFLAG_RECOVERING_BRIDGE)) {
switch_core_session_t *other_session;
switch_core_session_t *other_session = NULL;
const char *uuid = switch_core_session_get_uuid(session);
if (switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
const char *other_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
int x = 0;
if (other_uuid && (other_session = switch_core_session_locate(other_uuid))) {
if (other_uuid) {
for(x = 0; other_session == NULL && x < 5; x++) {
other_session = switch_core_session_locate(other_uuid);
switch_yield(100000);
}
}
if (other_session) {
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
switch_channel_clear_flag(channel, CF_BRIDGE_ORIGINATOR);
switch_channel_wait_for_state_timeout(other_channel, CS_RESET, 5000);
switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 10000, NULL);
switch_channel_wait_for_flag(channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
switch_channel_wait_for_flag(other_channel, CF_REQ_MEDIA, SWITCH_FALSE, 10000, NULL);
switch_channel_wait_for_flag(other_channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
if (switch_channel_test_flag(channel, CF_PROXY_MODE) && switch_channel_test_flag(other_channel, CF_PROXY_MODE)) {
switch_ivr_signal_bridge(session, other_session);
} else {

View File

@ -3571,6 +3571,18 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
match = 0;
got_audio = 0;
}
for (map = m->m_rtpmaps; map; map = map->rm_next) {
if ((zstr(map->rm_encoding) || (tech_pvt->profile->ndlb & PFLAG_NDLB_ALLOW_BAD_IANANAME)) && map->rm_pt < 96) {
match = (map->rm_pt == tech_pvt->agreed_pt) ? 1 : 0;
} else {
match = strcasecmp(map->rm_encoding, tech_pvt->rm_encoding) ? 0 : 1;
}
}
if (match) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Existing codec is already acceptable, using that.\n");
}
}
for (map = m->m_rtpmaps; map; map = map->rm_next) {
@ -4247,7 +4259,7 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
}
if ((tmp = switch_channel_get_variable(channel, "sip_use_pt"))) {
tech_pvt->agreed_pt = atoi(tmp);
tech_pvt->pt = tech_pvt->agreed_pt = atoi(tmp);
}
sofia_glue_tech_set_codec(tech_pvt, 1);

View File

@ -104,7 +104,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\..\libs\json-c-0.9&quot;"
UsePrecompiledHeader="0"
/>
<Tool

View File

@ -178,7 +178,7 @@ static switch_status_t set_json_cdr_log_dirs()
}
#define JSON_ENSURE_SUCCESS(obj) if (is_error(obj)) { return; }
SWITCH_DECLARE(void) set_json_profile_data(struct json_object *json, switch_caller_profile_t *caller_profile)
static void set_json_profile_data(struct json_object *json, switch_caller_profile_t *caller_profile)
{
struct json_object *param = NULL;
@ -236,7 +236,7 @@ SWITCH_DECLARE(void) set_json_profile_data(struct json_object *json, switch_call
}
SWITCH_DECLARE(void) set_json_chan_vars(struct json_object *json, switch_channel_t *channel)
static void set_json_chan_vars(struct json_object *json, switch_channel_t *channel)
{
struct json_object *variable = NULL;
switch_event_header_t *hi = switch_channel_variable_first(channel);
@ -268,7 +268,7 @@ SWITCH_DECLARE(void) set_json_chan_vars(struct json_object *json, switch_channel
SWITCH_DECLARE(switch_status_t) generate_json_cdr(switch_core_session_t *session, struct json_object **json_cdr)
static switch_status_t generate_json_cdr(switch_core_session_t *session, struct json_object **json_cdr)
{
struct json_object *cdr = json_object_new_object();

View File

@ -3244,6 +3244,140 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_rtp_hdr_t(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtcp_hdr_t_version_set(void * jarg1, unsigned int jarg2) {
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int arg2 ;
arg1 = (switch_rtcp_hdr_t *)jarg1;
arg2 = (unsigned int)jarg2;
if (arg1) (arg1)->version = arg2;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_switch_rtcp_hdr_t_version_get(void * jarg1) {
unsigned int jresult ;
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int result;
arg1 = (switch_rtcp_hdr_t *)jarg1;
result = (unsigned int) ((arg1)->version);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtcp_hdr_t_p_set(void * jarg1, unsigned int jarg2) {
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int arg2 ;
arg1 = (switch_rtcp_hdr_t *)jarg1;
arg2 = (unsigned int)jarg2;
if (arg1) (arg1)->p = arg2;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_switch_rtcp_hdr_t_p_get(void * jarg1) {
unsigned int jresult ;
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int result;
arg1 = (switch_rtcp_hdr_t *)jarg1;
result = (unsigned int) ((arg1)->p);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtcp_hdr_t_count_set(void * jarg1, unsigned int jarg2) {
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int arg2 ;
arg1 = (switch_rtcp_hdr_t *)jarg1;
arg2 = (unsigned int)jarg2;
if (arg1) (arg1)->count = arg2;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_switch_rtcp_hdr_t_count_get(void * jarg1) {
unsigned int jresult ;
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int result;
arg1 = (switch_rtcp_hdr_t *)jarg1;
result = (unsigned int) ((arg1)->count);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtcp_hdr_t_type_set(void * jarg1, unsigned int jarg2) {
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int arg2 ;
arg1 = (switch_rtcp_hdr_t *)jarg1;
arg2 = (unsigned int)jarg2;
if (arg1) (arg1)->type = arg2;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_switch_rtcp_hdr_t_type_get(void * jarg1) {
unsigned int jresult ;
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int result;
arg1 = (switch_rtcp_hdr_t *)jarg1;
result = (unsigned int) ((arg1)->type);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtcp_hdr_t_length_set(void * jarg1, unsigned int jarg2) {
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int arg2 ;
arg1 = (switch_rtcp_hdr_t *)jarg1;
arg2 = (unsigned int)jarg2;
if (arg1) (arg1)->length = arg2;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_switch_rtcp_hdr_t_length_get(void * jarg1) {
unsigned int jresult ;
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
unsigned int result;
arg1 = (switch_rtcp_hdr_t *)jarg1;
result = (unsigned int) ((arg1)->length);
jresult = result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_rtcp_hdr_t() {
void * jresult ;
switch_rtcp_hdr_t *result = 0 ;
result = (switch_rtcp_hdr_t *)new switch_rtcp_hdr_t();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_rtcp_hdr_t(void * jarg1) {
switch_rtcp_hdr_t *arg1 = (switch_rtcp_hdr_t *) 0 ;
arg1 = (switch_rtcp_hdr_t *)jarg1;
delete arg1;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_T38MaxBitRate_set(void * jarg1, unsigned long jarg2) {
switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;
uint32_t arg2 ;
@ -25900,6 +26034,17 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
}
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTCP_MAX_BUF_LEN_get() {
int jresult ;
int result;
result = (int) 16384;
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_CRYPTO_LEN_get() {
int jresult ;
int result;
@ -26288,21 +26433,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_rtp_new(char * jarg1, unsigned short
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_set_remote_address(void * jarg1, char * jarg2, unsigned short jarg3, int jarg4, void * jarg5) {
SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_set_remote_address(void * jarg1, char * jarg2, unsigned short jarg3, unsigned short jarg4, int jarg5, void * jarg6) {
int jresult ;
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
char *arg2 = (char *) 0 ;
switch_port_t arg3 ;
switch_bool_t arg4 ;
char **arg5 = (char **) 0 ;
switch_port_t arg4 ;
switch_bool_t arg5 ;
char **arg6 = (char **) 0 ;
switch_status_t result;
arg1 = (switch_rtp_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_port_t)jarg3;
arg4 = (switch_bool_t)jarg4;
arg5 = (char **)jarg5;
result = (switch_status_t)switch_rtp_set_remote_address(arg1,(char const *)arg2,arg3,arg4,(char const **)arg5);
arg4 = (switch_port_t)jarg4;
arg5 = (switch_bool_t)jarg5;
arg6 = (char **)jarg6;
result = (switch_status_t)switch_rtp_set_remote_address(arg1,(char const *)arg2,arg3,arg4,arg5,(char const **)arg6);
jresult = result;
return jresult;
}
@ -26420,6 +26567,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_activate_ice(void * jarg1, char * j
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_activate_rtcp(void * jarg1, int jarg2, unsigned short jarg3) {
int jresult ;
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
int arg2 ;
switch_port_t arg3 ;
switch_status_t result;
arg1 = (switch_rtp_t *)jarg1;
arg2 = (int)jarg2;
arg3 = (switch_port_t)jarg3;
result = (switch_status_t)switch_rtp_activate_rtcp(arg1,arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_activate_jitter_buffer(void * jarg1, unsigned long jarg2) {
int jresult ;
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
@ -26638,6 +26801,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_zerocopy_read_frame(void * jarg1, v
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtcp_zerocopy_read_frame(void * jarg1, void * jarg2) {
int jresult ;
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
switch_rtcp_frame_t *arg2 = (switch_rtcp_frame_t *) 0 ;
switch_status_t result;
arg1 = (switch_rtp_t *)jarg1;
arg2 = (switch_rtcp_frame_t *)jarg2;
result = (switch_status_t)switch_rtcp_zerocopy_read_frame(arg1,arg2);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_rtp_flush_read_buffer(void * jarg1, int jarg2) {
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
switch_rtp_flush_t arg2 ;

View File

@ -4056,8 +4056,8 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_rtp_set_remote_address(SWIGTYPE_p_switch_rtp rtp_session, string host, ushort port, switch_bool_t change_adv_addr, ref string err) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_set_remote_address(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), host, port, (int)change_adv_addr, ref err);
public static switch_status_t switch_rtp_set_remote_address(SWIGTYPE_p_switch_rtp rtp_session, string host, ushort port, ushort remote_rtcp_port, switch_bool_t change_adv_addr, ref string err) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_set_remote_address(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), host, port, remote_rtcp_port, (int)change_adv_addr, ref err);
return ret;
}
@ -4106,6 +4106,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_rtp_activate_rtcp(SWIGTYPE_p_switch_rtp rtp_session, int send_rate, ushort remote_port) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_activate_rtcp(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), send_rate, remote_port);
return ret;
}
public static switch_status_t switch_rtp_activate_jitter_buffer(SWIGTYPE_p_switch_rtp rtp_session, uint queue_frames) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_activate_jitter_buffer(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), queue_frames);
return ret;
@ -4183,6 +4188,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_rtcp_zerocopy_read_frame(SWIGTYPE_p_switch_rtp rtp_session, SWIGTYPE_p_switch_rtcp_frame frame) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtcp_zerocopy_read_frame(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), SWIGTYPE_p_switch_rtcp_frame.getCPtr(frame));
return ret;
}
public static void rtp_flush_read_buffer(SWIGTYPE_p_switch_rtp rtp_session, switch_rtp_flush_t flush) {
freeswitchPINVOKE.rtp_flush_read_buffer(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), (int)flush);
}
@ -4914,6 +4924,7 @@ public class freeswitch {
public static readonly int SWITCH_SMIN = freeswitchPINVOKE.SWITCH_SMIN_get();
public static readonly int SWITCH_RESAMPLE_QUALITY = freeswitchPINVOKE.SWITCH_RESAMPLE_QUALITY_get();
public static readonly int SWITCH_RTP_MAX_BUF_LEN = freeswitchPINVOKE.SWITCH_RTP_MAX_BUF_LEN_get();
public static readonly int SWITCH_RTCP_MAX_BUF_LEN = freeswitchPINVOKE.SWITCH_RTCP_MAX_BUF_LEN_get();
public static readonly int SWITCH_RTP_MAX_CRYPTO_LEN = freeswitchPINVOKE.SWITCH_RTP_MAX_CRYPTO_LEN_get();
public static readonly int SWITCH_RTP_KEY_LEN = freeswitchPINVOKE.SWITCH_RTP_KEY_LEN_get();
public static readonly string SWITCH_RTP_CRYPTO_KEY_32 = freeswitchPINVOKE.SWITCH_RTP_CRYPTO_KEY_32_get();
@ -5866,6 +5877,42 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_rtp_hdr_t")]
public static extern void delete_switch_rtp_hdr_t(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_version_set")]
public static extern void switch_rtcp_hdr_t_version_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_version_get")]
public static extern uint switch_rtcp_hdr_t_version_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_p_set")]
public static extern void switch_rtcp_hdr_t_p_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_p_get")]
public static extern uint switch_rtcp_hdr_t_p_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_count_set")]
public static extern void switch_rtcp_hdr_t_count_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_count_get")]
public static extern uint switch_rtcp_hdr_t_count_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_type_set")]
public static extern void switch_rtcp_hdr_t_type_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_type_get")]
public static extern uint switch_rtcp_hdr_t_type_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_length_set")]
public static extern void switch_rtcp_hdr_t_length_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_hdr_t_length_get")]
public static extern uint switch_rtcp_hdr_t_length_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_rtcp_hdr_t")]
public static extern IntPtr new_switch_rtcp_hdr_t();
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_rtcp_hdr_t")]
public static extern void delete_switch_rtcp_hdr_t(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_T38MaxBitRate_set")]
public static extern void switch_t38_options_t_T38MaxBitRate_set(HandleRef jarg1, uint jarg2);
@ -11152,6 +11199,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTCP_MAX_BUF_LEN_get")]
public static extern int SWITCH_RTCP_MAX_BUF_LEN_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_CRYPTO_LEN_get")]
public static extern int SWITCH_RTP_MAX_CRYPTO_LEN_get();
@ -11240,7 +11290,7 @@ class freeswitchPINVOKE {
public static extern IntPtr switch_rtp_new(string jarg1, ushort jarg2, string jarg3, ushort jarg4, byte jarg5, uint jarg6, uint jarg7, uint jarg8, string jarg9, ref string jarg10, HandleRef jarg11);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_remote_address")]
public static extern int switch_rtp_set_remote_address(HandleRef jarg1, string jarg2, ushort jarg3, int jarg4, ref string jarg5);
public static extern int switch_rtp_set_remote_address(HandleRef jarg1, string jarg2, ushort jarg3, ushort jarg4, int jarg5, ref string jarg6);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_get_remote_host")]
public static extern string switch_rtp_get_remote_host(HandleRef jarg1);
@ -11272,6 +11322,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_activate_ice")]
public static extern int switch_rtp_activate_ice(HandleRef jarg1, string jarg2, string jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_activate_rtcp")]
public static extern int switch_rtp_activate_rtcp(HandleRef jarg1, int jarg2, ushort jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_activate_jitter_buffer")]
public static extern int switch_rtp_activate_jitter_buffer(HandleRef jarg1, uint jarg2);
@ -11320,6 +11373,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_zerocopy_read_frame")]
public static extern int switch_rtp_zerocopy_read_frame(HandleRef jarg1, HandleRef jarg2, uint jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtcp_zerocopy_read_frame")]
public static extern int switch_rtcp_zerocopy_read_frame(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_rtp_flush_read_buffer")]
public static extern void rtp_flush_read_buffer(HandleRef jarg1, int jarg2);
@ -16855,6 +16911,36 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_switch_rtcp_frame {
private HandleRef swigCPtr;
internal SWIGTYPE_p_switch_rtcp_frame(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_switch_rtcp_frame() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_switch_rtcp_frame 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_rtp {
private HandleRef swigCPtr;
@ -21473,6 +21559,7 @@ public enum switch_core_session_message_types_t {
SWITCH_MESSAGE_INDICATE_PROXY_MEDIA,
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC,
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC_COMPLETE,
SWITCH_MESSAGE_INDICATE_PHONE_EVENT,
SWITCH_MESSAGE_INVALID
}
@ -22861,6 +22948,7 @@ public enum switch_event_types_t {
SWITCH_EVENT_SERVER_DISCONNECTED,
SWITCH_EVENT_SEND_INFO,
SWITCH_EVENT_RECV_INFO,
SWITCH_EVENT_RECV_RTCP_MESSAGE,
SWITCH_EVENT_CALL_SECURE,
SWITCH_EVENT_NAT,
SWITCH_EVENT_RECORD_START,
@ -25770,6 +25858,103 @@ public enum switch_priority_t {
namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class switch_rtcp_hdr_t : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal switch_rtcp_hdr_t(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(switch_rtcp_hdr_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~switch_rtcp_hdr_t() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
swigCMemOwn = false;
freeswitchPINVOKE.delete_switch_rtcp_hdr_t(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
GC.SuppressFinalize(this);
}
}
public uint version {
set {
freeswitchPINVOKE.switch_rtcp_hdr_t_version_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_rtcp_hdr_t_version_get(swigCPtr);
return ret;
}
}
public uint p {
set {
freeswitchPINVOKE.switch_rtcp_hdr_t_p_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_rtcp_hdr_t_p_get(swigCPtr);
return ret;
}
}
public uint count {
set {
freeswitchPINVOKE.switch_rtcp_hdr_t_count_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_rtcp_hdr_t_count_get(swigCPtr);
return ret;
}
}
public uint type {
set {
freeswitchPINVOKE.switch_rtcp_hdr_t_type_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_rtcp_hdr_t_type_get(swigCPtr);
return ret;
}
}
public uint length {
set {
freeswitchPINVOKE.switch_rtcp_hdr_t_length_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_rtcp_hdr_t_length_get(swigCPtr);
return ret;
}
}
public switch_rtcp_hdr_t() : this(freeswitchPINVOKE.new_switch_rtcp_hdr_t(), 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_rtp_bug_flag_t {
RTP_BUG_NONE = 0,
RTP_BUG_CISCO_SKIP_MARK_BIT_2833 = (1 << 0),
@ -25953,7 +26138,9 @@ namespace FreeSWITCH.Native {
SWITCH_ZRTP_FLAG_SECURE_MITM_RECV = (1 << 26),
SWITCH_RTP_FLAG_DEBUG_RTP_READ = (1 << 27),
SWITCH_RTP_FLAG_DEBUG_RTP_WRITE = (1 << 28),
SWITCH_RTP_FLAG_VIDEO = (1 << 29)
SWITCH_RTP_FLAG_VIDEO = (1 << 29),
SWITCH_RTP_FLAG_ENABLE_RTCP = (1 << 30),
SWITCH_RTP_FLAG_RTCP_PASSTHRU = (1 << 31)
}
}

View File

@ -2108,6 +2108,11 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_channel_get_uuid(channel), SWITCH_LOG_NOTICE, "Hangup %s [%s] [%s]\n",
channel->name, state_names[last_state], switch_channel_cause2str(channel->hangup_cause));
if (!switch_core_session_running(channel->session)) {
switch_core_session_thread_launch(channel->session);
}
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_HANGUP) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Hangup-Cause", switch_channel_cause2str(hangup_cause));
switch_channel_event_set_data(channel, event);

View File

@ -1366,6 +1366,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
int argc;
char *argv[256];
switch_event_del_header(var_event, SWITCH_EXPORT_VARS_VARIABLE);
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, SWITCH_EXPORT_VARS_VARIABLE, export_vars);
if ((argc = switch_separate_string(cptmp, ',', argv, (sizeof(argv) / sizeof(argv[0]))))) {
int x;