Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
May 2008
- 10 participants
- 495 discussions
Author: anthm
Date: Mon May 12 11:21:29 2008
New Revision: 8361
Modified:
freeswitch/trunk/src/mod/formats/mod_shout/layer3.c
Log:
fix FSCORE-124
Modified: freeswitch/trunk/src/mod/formats/mod_shout/layer3.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_shout/layer3.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_shout/layer3.c Mon May 12 11:21:29 2008
@@ -609,6 +609,7 @@
{
int shift = 1 + gr_info->scalefac_scale;
real *xrpnt = (real *) xr;
+ real *toomuch = (real *) xr + (SBLIMIT * SBLIMIT * sizeof(real));
int l[3], l3;
int part2remain = gr_info->part2_3_length - part2bits;
int *me;
@@ -668,7 +669,9 @@
register int x, y;
if ((!mc)) {
mc = *m++;
- xrpnt = ((real *) xr) + (*m++);
+ if ((xrpnt = ((real *) xr) + (*m++)) > toomuch) {
+ return 1;
+ }
lwin = *m++;
cb = *m++;
if (lwin == 3) {
@@ -707,7 +710,9 @@
part2remain--;
} else
*xrpnt = 0.0;
- xrpnt += step;
+ if ((xrpnt += step) > toomuch) {
+ return 1;
+ }
if (y == 15) {
max[lwin] = cb;
part2remain -= h->linbits + 1;
@@ -725,7 +730,9 @@
part2remain--;
} else
*xrpnt = 0.0;
- xrpnt += step;
+ if ((xrpnt += step) > toomuch) {
+ return 1;
+ }
}
}
for (; l3 && (part2remain > 0); l3--) {
@@ -747,7 +754,9 @@
if (!(i & 1)) {
if (!mc) {
mc = *m++;
- xrpnt = ((real *) xr) + (*m++);
+ if ((xrpnt = ((real *) xr) + (*m++)) > toomuch) {
+ return 1;
+ }
lwin = *m++;
cb = *m++;
if (lwin == 3) {
@@ -773,14 +782,18 @@
*xrpnt = v;
} else
*xrpnt = 0.0;
- xrpnt += step;
+ if ((xrpnt += step) > toomuch) {
+ return 1;
+ }
}
}
while (m < me) {
if (!mc) {
mc = *m++;
- xrpnt = ((real *) xr) + *m++;
+ if ((xrpnt = ((real *) xr) + *m++) > toomuch) {
+ return 1;
+ }
if ((*m++) == 3)
step = 1;
else
@@ -789,9 +802,13 @@
}
mc--;
*xrpnt = 0.0;
- xrpnt += step;
+ if ((xrpnt += step) > toomuch) {
+ return 1;
+ }
*xrpnt = 0.0;
- xrpnt += step;
+ if ((xrpnt += step) > toomuch) {
+ return 1;
+ }
/* we could add a little opt. here:
* if we finished a band for window 3 or a long band
* further bands could copied in a simple loop without a
@@ -863,6 +880,11 @@
x = y >> 4;
y &= 0xf;
}
+
+ if (xrpnt >= toomuch) {
+ return 1;
+ }
+
if (x == 15) {
max = cb;
part2remain -= h->linbits + 1;
@@ -971,7 +993,7 @@
#if 0
static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, struct gr_info_s *gr_info, int sfreq, int part2bits)
-{
+{ma
int shift = 1 + gr_info->scalefac_scale;
real *xrpnt = (real *) xr[1];
real *xr0pnt = (real *) xr[0];
1
0
12 May '08
Author: anthm
Date: Mon May 12 10:19:48 2008
New Revision: 8360
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Mon May 12 10:19:48 2008
@@ -345,6 +345,10 @@
default:
if (nh && ((sofia_private && sofia_private->destroy_nh) || !nua_handle_magic(nh))) {
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Destroy handle [%s]\n", nua_event_name(event));
+ if (sofia_private) {
+ nua_handle_bind(nh, NULL);
+ sofia_private->destroy_me = 1;
+ }
nua_handle_destroy(nh);
}
break;
@@ -1532,8 +1536,6 @@
}
gateway->ping = switch_timestamp(NULL) + gateway->ping_freq;
sofia_reg_release_gateway(gateway);
- nua_handle_bind(nh, NULL);
- free(sofia_private);
gateway->pinging = 0;
} else if ((profile->pflags & PFLAG_UNREG_OPTIONS_FAIL) && status != 200 && sip && sip->sip_to) {
char *sql;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Mon May 12 10:19:48 2008
@@ -88,6 +88,7 @@
switch_assert(pvt);
memset(pvt, 0, sizeof(*pvt));
pvt->destroy_nh = 1;
+ pvt->destroy_me = 1;
switch_copy_string(pvt->gateway_name, gateway_ptr->name, sizeof(pvt->gateway_name));
nua_handle_bind(nh, pvt);
1
0
12 May '08
Author: anthm
Date: Mon May 12 09:46:07 2008
New Revision: 8359
Modified:
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
freeswitch/trunk/src/switch_core_state_machine.c
freeswitch/trunk/src/switch_ivr_bridge.c
Log:
more name changes
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Mon May 12 09:46:07 2008
@@ -3733,7 +3733,7 @@
channel = switch_core_session_get_channel(session);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CUSTOM RING\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CUSTOM ROUTING\n");
/* put the channel in a passive state so we can loop audio to it */
switch_channel_set_state(channel, CS_SOFT_EXECUTE);
Modified: freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c Mon May 12 09:46:07 2008
@@ -311,7 +311,7 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(channel));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Mon May 12 09:46:07 2008
@@ -1180,7 +1180,7 @@
tech_pvt = switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(channel));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Mon May 12 09:46:07 2008
@@ -478,7 +478,7 @@
static switch_status_t channel_on_routing(switch_core_session_t *session)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Mon May 12 09:46:07 2008
@@ -291,7 +291,7 @@
static switch_status_t channel_on_routing(switch_core_session_t *session)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c Mon May 12 09:46:07 2008
@@ -162,7 +162,7 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(channel));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon May 12 09:46:07 2008
@@ -116,7 +116,7 @@
switch_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s SOFIA RING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s SOFIA ROUTING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c Mon May 12 09:46:07 2008
@@ -826,7 +826,7 @@
break;
case WP_TDM_EVENT_RING_TRIP:
- printf("%d: GOT RING TRIP EVENT\n",(int)fd);
+ printf("%d: GOT ROUTING TRIP EVENT\n",(int)fd);
if (tdm_api->wp_tdm_event.wp_ringtrip_event) {
tdm_api->wp_tdm_event.wp_ringtrip_event(fd,
rx_event->wp_tdm_api_event_ring_state);
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Mon May 12 09:46:07 2008
@@ -629,7 +629,7 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WANPIPE RING\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WANPIPE ROUTING\n");
Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Mon May 12 09:46:07 2008
@@ -240,7 +240,7 @@
static switch_status_t woomera_on_routing(switch_core_session_t *session)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s WOOMERA RING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s WOOMERA ROUTING\n", switch_channel_get_name(switch_core_session_get_channel(session)));
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Mon May 12 09:46:07 2008
@@ -62,7 +62,7 @@
char *expanded = NULL;
char *dpstr = NULL;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard RING %s\n", switch_channel_get_name(session->channel));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard ROUTING %s\n", switch_channel_get_name(session->channel));
if ((caller_profile = switch_channel_get_caller_profile(session->channel)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't get profile!\n");
@@ -369,7 +369,7 @@
break;
case CS_DONE:
goto done;
- /* HANGUP INIT RING and RESET are all short term so we signal lock during their callbacks */
+ /* HANGUP INIT ROUTING and RESET are all short term so we signal lock during their callbacks */
case CS_HANGUP: /* Deactivate and end the thread */
{
const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Mon May 12 09:46:07 2008
@@ -381,7 +381,7 @@
{
switch_channel_t *channel = switch_core_session_get_channel(session);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CUSTOM RING\n", switch_channel_get_name(channel));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CUSTOM ROUTING\n", switch_channel_get_name(channel));
/* put the channel in a passive state so we can loop audio to it */
switch_channel_set_state(channel, CS_CONSUME_MEDIA);
1
0
12 May '08
Author: anthm
Date: Mon May 12 09:37:36 2008
New Revision: 8358
Modified:
freeswitch/trunk/src/mod/languages/mod_perl/Makefile
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.cpp
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.h
freeswitch/trunk/src/mod/languages/mod_perl/hack.diff
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
Log:
add namespace to perl
Modified: freeswitch/trunk/src/mod/languages/mod_perl/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/Makefile (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/Makefile Mon May 12 09:37:36 2008
@@ -16,7 +16,7 @@
mod_perl_wrap.cpp:
swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
- patch -s -p0 -i hack.diff
+ # patch -s -p0 -i hack.diff
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm Mon May 12 09:37:36 2008
@@ -307,6 +307,7 @@
*setPrivate = *freeswitchc::CoreSession_setPrivate;
*getPrivate = *freeswitchc::CoreSession_getPrivate;
*getVariable = *freeswitchc::CoreSession_getVariable;
+*process_callback_result = *freeswitchc::CoreSession_process_callback_result;
*recordFile = *freeswitchc::CoreSession_recordFile;
*setCallerData = *freeswitchc::CoreSession_setCallerData;
*originate = *freeswitchc::CoreSession_originate;
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.cpp Mon May 12 09:37:36 2008
@@ -6,6 +6,8 @@
#define init_me() cb_function = hangup_func_str = NULL; hangup_func_arg = NULL; hh = mark = 0; my_perl = NULL; cb_arg = NULL
+using namespace PERL;
+
Session::Session() : CoreSession()
{
init_me();
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.h (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch_perl.h Mon May 12 09:37:36 2008
@@ -17,6 +17,7 @@
#include <switch_cpp.h>
+namespace PERL {
class Session : public CoreSession {
private:
virtual void do_hangup_hook();
@@ -45,5 +46,5 @@
char *hangup_func_arg;
void setPERL(PerlInterpreter *pi);
};
-
+}
#endif
Modified: freeswitch/trunk/src/mod/languages/mod_perl/hack.diff
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/hack.diff (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/hack.diff Mon May 12 09:37:36 2008
@@ -1,30 +1,29 @@
---- mod_perl_wrap.cpp 2008-05-01 18:05:28.000000000 -0400
-+++ old.cpp 2008-05-01 18:05:51.000000000 -0400
-
-@@ -6293,7 +6293,7 @@
+--- mod_perl_wrap2.cpp 2008-05-11 20:28:24.000000000 -0400
++++ mod_perl_wrap.cpp 2008-05-11 20:26:06.000000000 -0400
+@@ -6754,7 +6754,7 @@
if ((items < 0) || (items > 0)) {
SWIG_croak("Usage: new_Session();");
}
-- result = (Session *)new Session();
-+ result = (Session *)new Session(); result->setPERL(my_perl);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+- result = (PERL::Session *)new PERL::Session(); result->setPERL(my_perl);
++ result = (PERL::Session *)new PERL::Session();
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
fail:
-@@ -6320,7 +6320,7 @@
+@@ -6781,7 +6781,7 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
-- result = (Session *)new Session(arg1);
-+ result = (Session *)new Session(arg1); result->setPERL(my_perl);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+- result = (PERL::Session *)new PERL::Session(arg1); result->setPERL(my_perl);
++ result = (PERL::Session *)new PERL::Session(arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
XSRETURN(argvi);
-@@ -6348,7 +6348,7 @@
+@@ -6809,7 +6809,7 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "switch_core_session_t *""'");
}
arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
-- result = (Session *)new Session(arg1);
-+ result = (Session *)new Session(arg1); result->setPERL(my_perl);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+- result = (PERL::Session *)new PERL::Session(arg1); result->setPERL(my_perl);
++ result = (PERL::Session *)new PERL::Session(arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp Mon May 12 09:37:36 2008
@@ -1450,8 +1450,8 @@
#define SWIGTYPE_p_CoreSession swig_types[1]
#define SWIGTYPE_p_Event swig_types[2]
#define SWIGTYPE_p_IVRMenu swig_types[3]
-#define SWIGTYPE_p_PerlInterpreter swig_types[4]
-#define SWIGTYPE_p_Session swig_types[5]
+#define SWIGTYPE_p_PERL__Session swig_types[4]
+#define SWIGTYPE_p_PerlInterpreter swig_types[5]
#define SWIGTYPE_p_Stream swig_types[6]
#define SWIGTYPE_p_char swig_types[7]
#define SWIGTYPE_p_input_callback_state swig_types[8]
@@ -4661,6 +4661,45 @@
}
+XS(_wrap_CoreSession_process_callback_result) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ switch_status_t result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: CoreSession_process_callback_result(self,ret);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_process_callback_result" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_process_callback_result" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (arg1)->process_callback_result(arg2);
+ ST(argvi) = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_CoreSession_recordFile__SWIG_0) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -6708,15 +6747,15 @@
XS(_wrap_new_Session__SWIG_0) {
{
- Session *result = 0 ;
+ PERL::Session *result = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 0) || (items > 0)) {
SWIG_croak("Usage: new_Session();");
}
- result = (Session *)new Session(); result->setPERL(my_perl);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ result = (PERL::Session *)new PERL::Session();
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
@@ -6727,7 +6766,7 @@
XS(_wrap_new_Session__SWIG_1) {
{
char *arg1 = (char *) 0 ;
- Session *result = 0 ;
+ PERL::Session *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
@@ -6742,8 +6781,8 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
- result = (Session *)new Session(arg1); result->setPERL(my_perl);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ result = (PERL::Session *)new PERL::Session(arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
XSRETURN(argvi);
fail:
@@ -6756,7 +6795,7 @@
XS(_wrap_new_Session__SWIG_2) {
{
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
- Session *result = 0 ;
+ PERL::Session *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
@@ -6770,8 +6809,8 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "switch_core_session_t *""'");
}
arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
- result = (Session *)new Session(arg1); result->setPERL(my_perl);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ result = (PERL::Session *)new PERL::Session(arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
fail:
@@ -6854,7 +6893,7 @@
XS(_wrap_delete_Session) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
@@ -6863,11 +6902,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: delete_Session(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, SWIG_POINTER_DISOWN | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Session" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Session" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
delete arg1;
@@ -6882,7 +6921,7 @@
XS(_wrap_Session_begin_allow_threads) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -6892,11 +6931,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_begin_allow_threads(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_begin_allow_threads" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_begin_allow_threads" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (bool)(arg1)->begin_allow_threads();
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
@@ -6910,7 +6949,7 @@
XS(_wrap_Session_end_allow_threads) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -6920,11 +6959,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_end_allow_threads(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_end_allow_threads" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_end_allow_threads" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (bool)(arg1)->end_allow_threads();
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
@@ -6938,7 +6977,7 @@
XS(_wrap_Session_check_hangup_hook) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
@@ -6947,11 +6986,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_check_hangup_hook(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_check_hangup_hook" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_check_hangup_hook" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
(arg1)->check_hangup_hook();
@@ -6965,7 +7004,7 @@
XS(_wrap_Session_run_dtmf_callback) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
void *arg2 = (void *) 0 ;
switch_input_type_t arg3 ;
switch_status_t result;
@@ -6980,11 +7019,11 @@
if ((items < 3) || (items > 3)) {
SWIG_croak("Usage: Session_run_dtmf_callback(self,input,itype);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_run_dtmf_callback" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_run_dtmf_callback" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_run_dtmf_callback" "', argument " "2"" of type '" "void *""'");
@@ -7015,7 +7054,7 @@
XS(_wrap_Session_setInputCallback) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
void *argp1 = 0 ;
@@ -7032,11 +7071,11 @@
if ((items < 3) || (items > 3)) {
SWIG_croak("Usage: Session_setInputCallback(self,cbfunc,funcargs);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setInputCallback" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setInputCallback" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setInputCallback" "', argument " "2"" of type '" "char *""'");
@@ -7064,7 +7103,7 @@
XS(_wrap_Session_setHangupHook__SWIG_0) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
void *argp1 = 0 ;
@@ -7081,11 +7120,11 @@
if ((items < 3) || (items > 3)) {
SWIG_croak("Usage: Session_setHangupHook(self,func,arg);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setHangupHook" "', argument " "2"" of type '" "char *""'");
@@ -7113,7 +7152,7 @@
XS(_wrap_Session_setHangupHook__SWIG_1) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7126,11 +7165,11 @@
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Session_setHangupHook(self,func);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setHangupHook" "', argument " "2"" of type '" "char *""'");
@@ -7162,7 +7201,7 @@
int _v = 0;
{
void *vptr = 0;
- int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Session, 0);
+ int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PERL__Session, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
@@ -7191,7 +7230,7 @@
int _v = 0;
{
void *vptr = 0;
- int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Session, 0);
+ int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PERL__Session, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
@@ -7237,7 +7276,7 @@
XS(_wrap_Session_ready) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7247,11 +7286,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_ready(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_ready" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_ready" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (bool)(arg1)->ready();
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
@@ -7265,7 +7304,7 @@
XS(_wrap_Session_cb_function_set) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7278,11 +7317,11 @@
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Session_cb_function_set(self,cb_function);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_set" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_set" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_cb_function_set" "', argument " "2"" of type '" "char *""'");
@@ -7309,7 +7348,7 @@
XS(_wrap_Session_cb_function_get) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7319,11 +7358,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_cb_function_get(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_get" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_get" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (char *) ((arg1)->cb_function);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
@@ -7337,7 +7376,7 @@
XS(_wrap_Session_cb_arg_set) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7350,11 +7389,11 @@
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Session_cb_arg_set(self,cb_arg);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_set" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_set" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_cb_arg_set" "', argument " "2"" of type '" "char *""'");
@@ -7381,7 +7420,7 @@
XS(_wrap_Session_cb_arg_get) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7391,11 +7430,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_cb_arg_get(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_get" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_get" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (char *) ((arg1)->cb_arg);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
@@ -7409,7 +7448,7 @@
XS(_wrap_Session_hangup_func_str_set) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7422,11 +7461,11 @@
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Session_hangup_func_str_set(self,hangup_func_str);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_str_set" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_str_set" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_hangup_func_str_set" "', argument " "2"" of type '" "char *""'");
@@ -7453,7 +7492,7 @@
XS(_wrap_Session_hangup_func_str_get) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7463,11 +7502,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_hangup_func_str_get(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_str_get" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_str_get" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (char *) ((arg1)->hangup_func_str);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
@@ -7481,7 +7520,7 @@
XS(_wrap_Session_hangup_func_arg_set) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7494,11 +7533,11 @@
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Session_hangup_func_arg_set(self,hangup_func_arg);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_arg_set" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_arg_set" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_hangup_func_arg_set" "', argument " "2"" of type '" "char *""'");
@@ -7525,7 +7564,7 @@
XS(_wrap_Session_hangup_func_arg_get) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7535,11 +7574,11 @@
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: Session_hangup_func_arg_get(self);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_arg_get" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_arg_get" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
result = (char *) ((arg1)->hangup_func_arg);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
@@ -7553,7 +7592,7 @@
XS(_wrap_Session_setPERL) {
{
- Session *arg1 = (Session *) 0 ;
+ PERL::Session *arg1 = (PERL::Session *) 0 ;
PerlInterpreter *arg2 = (PerlInterpreter *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -7565,11 +7604,11 @@
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Session_setPERL(self,pi);");
}
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Session, 0 | 0 );
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setPERL" "', argument " "1"" of type '" "Session *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setPERL" "', argument " "1"" of type '" "PERL::Session *""'");
}
- arg1 = reinterpret_cast< Session * >(argp1);
+ arg1 = reinterpret_cast< PERL::Session * >(argp1);
res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_PerlInterpreter, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setPERL" "', argument " "2"" of type '" "PerlInterpreter *""'");
@@ -7591,15 +7630,15 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-static void *_p_SessionTo_p_CoreSession(void *x, int *newmemory) {
- return (void *)((CoreSession *) ((Session *) x));
+static void *_p_PERL__SessionTo_p_CoreSession(void *x, int *newmemory) {
+ return (void *)((CoreSession *) ((PERL::Session *) x));
}
static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)"freeswitch::API", 0};
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)"freeswitch::CoreSession", 0};
static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)"freeswitch::Event", 0};
static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)"freeswitch::IVRMenu", 0};
+static swig_type_info _swigt__p_PERL__Session = {"_p_PERL__Session", "PERL::Session *", 0, 0, (void*)"freeswitch::Session", 0};
static swig_type_info _swigt__p_PerlInterpreter = {"_p_PerlInterpreter", "PerlInterpreter *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_Session = {"_p_Session", "Session *", 0, 0, (void*)"freeswitch::Session", 0};
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)"freeswitch::Stream", 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)"freeswitch::input_callback_state_t", 0};
@@ -7620,8 +7659,8 @@
&_swigt__p_CoreSession,
&_swigt__p_Event,
&_swigt__p_IVRMenu,
+ &_swigt__p_PERL__Session,
&_swigt__p_PerlInterpreter,
- &_swigt__p_Session,
&_swigt__p_Stream,
&_swigt__p_char,
&_swigt__p_input_callback_state,
@@ -7639,11 +7678,11 @@
};
static swig_cast_info _swigc__p_API[] = { {&_swigt__p_API, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_Session, _p_SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_PERL__Session, _p_PERL__SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_PERL__Session[] = { {&_swigt__p_PERL__Session, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PerlInterpreter[] = { {&_swigt__p_PerlInterpreter, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_Session[] = { {&_swigt__p_Session, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
@@ -7664,8 +7703,8 @@
_swigc__p_CoreSession,
_swigc__p_Event,
_swigc__p_IVRMenu,
+ _swigc__p_PERL__Session,
_swigc__p_PerlInterpreter,
- _swigc__p_Session,
_swigc__p_Stream,
_swigc__p_char,
_swigc__p_input_callback_state,
@@ -7756,6 +7795,7 @@
{"freeswitchc::CoreSession_setPrivate", _wrap_CoreSession_setPrivate},
{"freeswitchc::CoreSession_getPrivate", _wrap_CoreSession_getPrivate},
{"freeswitchc::CoreSession_getVariable", _wrap_CoreSession_getVariable},
+{"freeswitchc::CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result},
{"freeswitchc::CoreSession_recordFile", _wrap_CoreSession_recordFile},
{"freeswitchc::CoreSession_setCallerData", _wrap_CoreSession_setCallerData},
{"freeswitchc::CoreSession_originate", _wrap_CoreSession_originate},
@@ -8121,7 +8161,7 @@
SWIG_TypeClientData(SWIGTYPE_p_Stream, (void*) "freeswitch::Stream");
SWIG_TypeClientData(SWIGTYPE_p_Event, (void*) "freeswitch::Event");
SWIG_TypeClientData(SWIGTYPE_p_CoreSession, (void*) "freeswitch::CoreSession");
- SWIG_TypeClientData(SWIGTYPE_p_Session, (void*) "freeswitch::Session");
+ SWIG_TypeClientData(SWIGTYPE_p_PERL__Session, (void*) "freeswitch::Session");
ST(0) = &PL_sv_yes;
XSRETURN(1);
}
1
0
Author: anthm
Date: Sun May 11 20:29:57 2008
New Revision: 8357
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/switch_cpp.cpp
Log:
up
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Sun May 11 20:29:57 2008
@@ -14,7 +14,7 @@
#define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
#define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
-#define init_vars() do { session = NULL; channel = NULL; uuid = NULL; tts_name = NULL; voice_name = NULL; memset(&args, 0, sizeof(args)); ap = NULL; caller_profile.source = "mod_unknown"; caller_profile.dialplan = ""; caller_profile.context = ""; caller_profile.caller_id_name = ""; caller_profile.caller_id_number = ""; caller_profile.network_addr = ""; caller_profile.ani = ""; caller_profile.aniii = ""; caller_profile.rdnis = ""; caller_profile.username = ""; on_hangup = NULL; memset(&cb_state, 0, sizeof(cb_state)); hook_state = CS_NEW; } while(0)
+#define init_vars() do { session = NULL; channel = NULL; uuid = NULL; tts_name = NULL; voice_name = NULL; xml_cdr_text = NULL; memset(&args, 0, sizeof(args)); ap = NULL; caller_profile.source = "mod_unknown"; caller_profile.dialplan = ""; caller_profile.context = ""; caller_profile.caller_id_name = ""; caller_profile.caller_id_number = ""; caller_profile.network_addr = ""; caller_profile.ani = ""; caller_profile.aniii = ""; caller_profile.rdnis = ""; caller_profile.username = ""; on_hangup = NULL; memset(&cb_state, 0, sizeof(cb_state)); hook_state = CS_NEW; } while(0)
//
@@ -169,12 +169,12 @@
switch_file_handle_t local_fh;
switch_file_handle_t *fhp;
char dtmf_buf[512];
- SWITCH_DECLARE(switch_status_t) process_callback_result(char *ret);
+
public:
SWITCH_DECLARE_CONSTRUCTOR CoreSession();
SWITCH_DECLARE_CONSTRUCTOR CoreSession(char *uuid);
SWITCH_DECLARE_CONSTRUCTOR CoreSession(switch_core_session_t *new_session);
- virtual SWITCH_DECLARE_CONSTRUCTOR ~CoreSession();
+ SWITCH_DECLARE_CONSTRUCTOR ~CoreSession();
switch_core_session_t *session;
switch_channel_t *channel;
unsigned int flags;
@@ -185,12 +185,12 @@
SWITCH_DECLARE(int) answer();
SWITCH_DECLARE(int) preAnswer();
- virtual SWITCH_DECLARE(void) hangup(char *cause = "normal_clearing");
+ SWITCH_DECLARE(void) hangup(char *cause = "normal_clearing");
SWITCH_DECLARE(void) setVariable(char *var, char *val);
SWITCH_DECLARE(void) setPrivate(char *var, void *val);
SWITCH_DECLARE(void *)getPrivate(char *var);
SWITCH_DECLARE(const char *)getVariable(char *var);
-
+ SWITCH_DECLARE(switch_status_t) process_callback_result(char *ret);
/** \brief Record to a file
* \param filename
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Sun May 11 20:29:57 2008
@@ -936,7 +936,6 @@
}
-
SWITCH_DECLARE(switch_status_t) CoreSession::process_callback_result(char *ret)
{
1
0
Author: anthm
Date: Sun May 11 20:24:38 2008
New Revision: 8356
Modified:
freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp
freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h
freeswitch/trunk/src/mod/languages/mod_lua/hack.diff
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
Log:
add namespace
Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp Sun May 11 20:24:38 2008
@@ -1,5 +1,7 @@
+
#include <switch.h>
#include "freeswitch_lua.h"
+using namespace LUA;
Session::Session() : CoreSession()
{
Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h Sun May 11 20:24:38 2008
@@ -10,6 +10,7 @@
#include <switch_cpp.h>
+namespace LUA {
class Session : public CoreSession {
private:
virtual void do_hangup_hook();
@@ -38,5 +39,5 @@
char *hangup_func_arg;
void setLUA(lua_State *state);
};
-
+}
#endif
Modified: freeswitch/trunk/src/mod/languages/mod_lua/hack.diff
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/hack.diff (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/hack.diff Sun May 11 20:24:38 2008
@@ -1,29 +1,29 @@
---- hack.cpp 2008-04-29 13:49:22.000000000 -0400
-+++ mod_lua_wrap.cpp 2008-04-29 13:49:10.000000000 -0400
-@@ -4028,7 +4028,7 @@
- SWIG_check_num_args("Session",0,0)
- result = (Session *)new Session();
+--- mod_lua_wrap.cpp 2008-05-11 20:03:58.000000000 -0400
++++ mod_lua_wrap2.cpp 2008-05-11 20:05:08.000000000 -0400
+@@ -5158,7 +5158,7 @@
+ SWIG_check_num_args("LUA::Session",0,0)
+ result = (LUA::Session *)new LUA::Session();
SWIG_arg=0;
-- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++;
-+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
+- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
++ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
-@@ -4049,7 +4049,7 @@
+@@ -5179,7 +5179,7 @@
arg1 = (char *)lua_tostring(L, 1);
- result = (Session *)new Session(arg1);
+ result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0;
-- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++;
-+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
+- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
++ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
-@@ -4074,7 +4074,7 @@
+@@ -5204,7 +5204,7 @@
- result = (Session *)new Session(arg1);
+ result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0;
-- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++;
-+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
+- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
++ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp Sun May 11 20:24:38 2008
@@ -29,6 +29,8 @@
*
*/
+
+
#include <switch.h>
SWITCH_BEGIN_EXTERN_C
#include "lua.h"
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp Sun May 11 20:24:38 2008
@@ -1488,7 +1488,7 @@
#define SWIGTYPE_p_CoreSession swig_types[1]
#define SWIGTYPE_p_Event swig_types[2]
#define SWIGTYPE_p_IVRMenu swig_types[3]
-#define SWIGTYPE_p_Session swig_types[4]
+#define SWIGTYPE_p_LUA__Session swig_types[4]
#define SWIGTYPE_p_Stream swig_types[5]
#define SWIGTYPE_p_input_callback_state swig_types[6]
#define SWIGTYPE_p_lua_State swig_types[7]
@@ -3719,6 +3719,37 @@
}
+static int _wrap_CoreSession_process_callback_result(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ switch_status_t result;
+
+ SWIG_check_num_args("process_callback_result",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("process_callback_result",1,"CoreSession *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("process_callback_result",2,"char *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_process_callback_result",1,SWIGTYPE_p_CoreSession);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (arg1)->process_callback_result(arg2);
+ SWIG_arg=0;
+ {
+ switch_status_t * resultptr = new switch_status_t((switch_status_t &) result);
+ SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++;
+ }
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static int _wrap_CoreSession_recordFile__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -4961,6 +4992,7 @@
{"setPrivate", _wrap_CoreSession_setPrivate},
{"getPrivate", _wrap_CoreSession_getPrivate},
{"getVariable", _wrap_CoreSession_getVariable},
+ {"process_callback_result", _wrap_CoreSession_process_callback_result},
{"recordFile", _wrap_CoreSession_recordFile},
{"setCallerData", _wrap_CoreSession_setCallerData},
{"originate", _wrap_CoreSession_originate},
@@ -5153,12 +5185,12 @@
static int _wrap_new_Session__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
- Session *result = 0 ;
+ LUA::Session *result = 0 ;
- SWIG_check_num_args("Session",0,0)
- result = (Session *)new Session();
+ SWIG_check_num_args("LUA::Session",0,0)
+ result = (LUA::Session *)new LUA::Session();
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -5172,14 +5204,14 @@
static int _wrap_new_Session__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
char *arg1 = (char *) 0 ;
- Session *result = 0 ;
+ LUA::Session *result = 0 ;
- SWIG_check_num_args("Session",1,1)
- if(!lua_isstring(L,1)) SWIG_fail_arg("Session",1,"char *");
+ SWIG_check_num_args("LUA::Session",1,1)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("LUA::Session",1,"char *");
arg1 = (char *)lua_tostring(L, 1);
- result = (Session *)new Session(arg1);
+ result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -5193,18 +5225,18 @@
static int _wrap_new_Session__SWIG_2(lua_State* L) {
int SWIG_arg = -1;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
- Session *result = 0 ;
+ LUA::Session *result = 0 ;
- SWIG_check_num_args("Session",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Session",1,"switch_core_session_t *");
+ SWIG_check_num_args("LUA::Session",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LUA::Session",1,"switch_core_session_t *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_core_session_t,0))){
SWIG_fail_ptr("new_Session",1,SWIGTYPE_p_switch_core_session_t);
}
- result = (Session *)new Session(arg1);
+ result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -5256,13 +5288,13 @@
static int _wrap_delete_Session(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
- SWIG_check_num_args("Session",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Session",1,"Session *");
+ SWIG_check_num_args("LUA::~Session",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LUA::~Session",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,SWIG_POINTER_DISOWN))){
- SWIG_fail_ptr("delete_Session",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,SWIG_POINTER_DISOWN))){
+ SWIG_fail_ptr("delete_Session",1,SWIGTYPE_p_LUA__Session);
}
delete arg1;
@@ -5281,14 +5313,14 @@
static int _wrap_Session_begin_allow_threads(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
bool result;
SWIG_check_num_args("begin_allow_threads",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("begin_allow_threads",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("begin_allow_threads",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_begin_allow_threads",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_begin_allow_threads",1,SWIGTYPE_p_LUA__Session);
}
result = (bool)(arg1)->begin_allow_threads();
@@ -5306,14 +5338,14 @@
static int _wrap_Session_end_allow_threads(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
bool result;
SWIG_check_num_args("end_allow_threads",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("end_allow_threads",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("end_allow_threads",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_end_allow_threads",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_end_allow_threads",1,SWIGTYPE_p_LUA__Session);
}
result = (bool)(arg1)->end_allow_threads();
@@ -5331,13 +5363,13 @@
static int _wrap_Session_check_hangup_hook(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
SWIG_check_num_args("check_hangup_hook",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("check_hangup_hook",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("check_hangup_hook",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_check_hangup_hook",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_check_hangup_hook",1,SWIGTYPE_p_LUA__Session);
}
(arg1)->check_hangup_hook();
@@ -5355,19 +5387,19 @@
static int _wrap_Session_run_dtmf_callback(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
void *arg2 = (void *) 0 ;
switch_input_type_t arg3 ;
switch_status_t result;
switch_input_type_t *argp3 ;
SWIG_check_num_args("run_dtmf_callback",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("run_dtmf_callback",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("run_dtmf_callback",1,"LUA::Session *");
if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("run_dtmf_callback",2,"void *");
if(!lua_isuserdata(L,3)) SWIG_fail_arg("run_dtmf_callback",3,"switch_input_type_t");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_run_dtmf_callback",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_run_dtmf_callback",1,SWIGTYPE_p_LUA__Session);
}
arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"Session_run_dtmf_callback");
@@ -5395,17 +5427,17 @@
static int _wrap_Session_setInputCallback(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
SWIG_check_num_args("setInputCallback",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setInputCallback",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setInputCallback",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("setInputCallback",2,"char *");
if(!lua_isstring(L,3)) SWIG_fail_arg("setInputCallback",3,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_setInputCallback",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_setInputCallback",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5425,17 +5457,17 @@
static int _wrap_Session_setHangupHook__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
SWIG_check_num_args("setHangupHook",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("setHangupHook",2,"char *");
if(!lua_isstring(L,3)) SWIG_fail_arg("setHangupHook",3,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_setHangupHook",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_setHangupHook",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5455,15 +5487,15 @@
static int _wrap_Session_setHangupHook__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
SWIG_check_num_args("setHangupHook",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("setHangupHook",2,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_setHangupHook",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_setHangupHook",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5491,7 +5523,7 @@
int _v;
{
void *ptr;
- if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Session, 0)) {
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) {
_v = 0;
} else {
_v = 1;
@@ -5510,7 +5542,7 @@
int _v;
{
void *ptr;
- if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Session, 0)) {
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) {
_v = 0;
} else {
_v = 1;
@@ -5538,14 +5570,14 @@
static int _wrap_Session_ready(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
bool result;
SWIG_check_num_args("ready",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ready",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ready",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_ready",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_ready",1,SWIGTYPE_p_LUA__Session);
}
result = (bool)(arg1)->ready();
@@ -5563,15 +5595,15 @@
static int _wrap_Session_cb_function_set(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
SWIG_check_num_args("cb_function",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_function",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_function",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("cb_function",2,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_cb_function_set",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_cb_function_set",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5598,14 +5630,14 @@
static int _wrap_Session_cb_function_get(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *result = 0 ;
SWIG_check_num_args("cb_function",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_function",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_function",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_cb_function_get",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_cb_function_get",1,SWIGTYPE_p_LUA__Session);
}
result = (char *) ((arg1)->cb_function);
@@ -5623,15 +5655,15 @@
static int _wrap_Session_cb_arg_set(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
SWIG_check_num_args("cb_arg",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_arg",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_arg",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("cb_arg",2,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_cb_arg_set",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_cb_arg_set",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5658,14 +5690,14 @@
static int _wrap_Session_cb_arg_get(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *result = 0 ;
SWIG_check_num_args("cb_arg",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_arg",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_arg",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_cb_arg_get",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_cb_arg_get",1,SWIGTYPE_p_LUA__Session);
}
result = (char *) ((arg1)->cb_arg);
@@ -5683,15 +5715,15 @@
static int _wrap_Session_hangup_func_str_set(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
SWIG_check_num_args("hangup_func_str",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_str",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_str",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("hangup_func_str",2,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_hangup_func_str_set",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_hangup_func_str_set",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5718,14 +5750,14 @@
static int _wrap_Session_hangup_func_str_get(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *result = 0 ;
SWIG_check_num_args("hangup_func_str",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_str",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_str",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_hangup_func_str_get",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_hangup_func_str_get",1,SWIGTYPE_p_LUA__Session);
}
result = (char *) ((arg1)->hangup_func_str);
@@ -5743,15 +5775,15 @@
static int _wrap_Session_hangup_func_arg_set(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *arg2 = (char *) 0 ;
SWIG_check_num_args("hangup_func_arg",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_arg",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_arg",1,"LUA::Session *");
if(!lua_isstring(L,2)) SWIG_fail_arg("hangup_func_arg",2,"char *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_hangup_func_arg_set",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_hangup_func_arg_set",1,SWIGTYPE_p_LUA__Session);
}
arg2 = (char *)lua_tostring(L, 2);
@@ -5778,14 +5810,14 @@
static int _wrap_Session_hangup_func_arg_get(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
char *result = 0 ;
SWIG_check_num_args("hangup_func_arg",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_arg",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_arg",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_hangup_func_arg_get",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_hangup_func_arg_get",1,SWIGTYPE_p_LUA__Session);
}
result = (char *) ((arg1)->hangup_func_arg);
@@ -5803,15 +5835,15 @@
static int _wrap_Session_setLUA(lua_State* L) {
int SWIG_arg = -1;
- Session *arg1 = (Session *) 0 ;
+ LUA::Session *arg1 = (LUA::Session *) 0 ;
lua_State *arg2 = (lua_State *) 0 ;
arg2 = L;
SWIG_check_num_args("setLUA",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLUA",1,"Session *");
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLUA",1,"LUA::Session *");
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
- SWIG_fail_ptr("Session_setLUA",1,SWIGTYPE_p_Session);
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){
+ SWIG_fail_ptr("Session_setLUA",1,SWIGTYPE_p_LUA__Session);
}
(arg1)->setLUA(arg2);
@@ -5828,10 +5860,10 @@
static void swig_delete_Session(void *obj) {
-Session *arg1 = (Session *) obj;
+LUA::Session *arg1 = (LUA::Session *) obj;
delete arg1;
}
-static swig_lua_method swig_Session_methods[] = {
+static swig_lua_method swig_LUA_Session_methods[] = {
{"begin_allow_threads", _wrap_Session_begin_allow_threads},
{"end_allow_threads", _wrap_Session_end_allow_threads},
{"check_hangup_hook", _wrap_Session_check_hangup_hook},
@@ -5842,16 +5874,16 @@
{"setLUA", _wrap_Session_setLUA},
{0,0}
};
-static swig_lua_attribute swig_Session_attributes[] = {
+static swig_lua_attribute swig_LUA_Session_attributes[] = {
{ "cb_function", _wrap_Session_cb_function_get, _wrap_Session_cb_function_set},
{ "cb_arg", _wrap_Session_cb_arg_get, _wrap_Session_cb_arg_set},
{ "hangup_func_str", _wrap_Session_hangup_func_str_get, _wrap_Session_hangup_func_str_set},
{ "hangup_func_arg", _wrap_Session_hangup_func_arg_get, _wrap_Session_hangup_func_arg_set},
{0,0,0}
};
-static swig_lua_class *swig_Session_bases[] = {0,0};
-static const char *swig_Session_base_names[] = {"CoreSession *",0};
-static swig_lua_class _wrap_class_Session = { "Session", &SWIGTYPE_p_Session,_wrap_new_Session, swig_delete_Session, swig_Session_methods, swig_Session_attributes, swig_Session_bases, swig_Session_base_names };
+static swig_lua_class *swig_LUA_Session_bases[] = {0,0};
+static const char *swig_LUA_Session_base_names[] = {"CoreSession *",0};
+static swig_lua_class _wrap_class_LUA_Session = { "Session", &SWIGTYPE_p_LUA__Session,_wrap_new_Session, swig_delete_Session, swig_LUA_Session_methods, swig_LUA_Session_attributes, swig_LUA_Session_bases, swig_LUA_Session_base_names };
#ifdef __cplusplus
}
@@ -5881,14 +5913,14 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-static void *_p_SessionTo_p_CoreSession(void *x, int *newmemory) {
- return (void *)((CoreSession *) ((Session *) x));
+static void *_p_LUA__SessionTo_p_CoreSession(void *x, int *newmemory) {
+ return (void *)((CoreSession *) ((LUA::Session *) x));
}
static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)&_wrap_class_API, 0};
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)&_wrap_class_CoreSession, 0};
static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)&_wrap_class_Event, 0};
static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)&_wrap_class_IVRMenu, 0};
-static swig_type_info _swigt__p_Session = {"_p_Session", "Session *", 0, 0, (void*)&_wrap_class_Session, 0};
+static swig_type_info _swigt__p_LUA__Session = {"_p_LUA__Session", "LUA::Session *", 0, 0, (void*)&_wrap_class_LUA_Session, 0};
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)&_wrap_class_Stream, 0};
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0};
static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0};
@@ -5909,7 +5941,7 @@
&_swigt__p_CoreSession,
&_swigt__p_Event,
&_swigt__p_IVRMenu,
- &_swigt__p_Session,
+ &_swigt__p_LUA__Session,
&_swigt__p_Stream,
&_swigt__p_input_callback_state,
&_swigt__p_lua_State,
@@ -5927,10 +5959,10 @@
};
static swig_cast_info _swigc__p_API[] = { {&_swigt__p_API, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_Session, _p_SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_LUA__Session, _p_LUA__SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_Session[] = { {&_swigt__p_Session, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_LUA__Session[] = { {&_swigt__p_LUA__Session, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_lua_State[] = { {&_swigt__p_lua_State, 0, 0, 0},{0, 0, 0, 0}};
@@ -5951,7 +5983,7 @@
_swigc__p_CoreSession,
_swigc__p_Event,
_swigc__p_IVRMenu,
- _swigc__p_Session,
+ _swigc__p_LUA__Session,
_swigc__p_Stream,
_swigc__p_input_callback_state,
_swigc__p_lua_State,
1
0
Author: stkn
Date: Sat May 10 18:50:48 2008
New Revision: 8355
Modified:
freeswitch/trunk/configure.in
Log:
Fix AC_ARG_ENABLE value handling and rename --enable-resampler to --disable-resampler in help output since it is default enabled
Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in (original)
+++ freeswitch/trunk/configure.in Sat May 10 18:50:48 2008
@@ -67,7 +67,7 @@
# Optional Features
AC_ARG_ENABLE(resample,
-[AC_HELP_STRING([--enable-resample],[build with embedded resampler])],[enable_resample="$enable_resample"],[enable_resample="yes"])
+[AC_HELP_STRING([--disable-resample],[build without embedded resampler])],[enable_resample="$enableval"],[enable_resample="yes"])
# We should add checking for out of tree libresample here
RESAMPLE_LIB=
1
0
Author: mikej
Date: Sat May 10 17:10:44 2008
New Revision: 8354
Modified:
freeswitch/trunk/src/include/switch_stun.h
freeswitch/trunk/src/switch_rtp.c
freeswitch/trunk/src/switch_stun.c
Log:
catch buffer overflow from invalid stun packet.
Modified: freeswitch/trunk/src/include/switch_stun.h
==============================================================================
--- freeswitch/trunk/src/include/switch_stun.h (original)
+++ freeswitch/trunk/src/include/switch_stun.h Sat May 10 17:10:44 2008
@@ -221,7 +221,7 @@
\param attribute the pointer to increment
\return true or false depending on if there are any more attributes
*/
-#define switch_stun_packet_next_attribute(attribute) (attribute = (switch_stun_packet_attribute_t *) (attribute->value + attribute->length)) && attribute->length
+#define switch_stun_packet_next_attribute(attribute, end) (attribute && (attribute = (switch_stun_packet_attribute_t *) (attribute->value + attribute->length)) && ((void *)attribute < end) && attribute->length && ((void *)(attribute + attribute->length) < end))
/*!
\brief Obtain the correct length in bytes of a stun packet
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Sat May 10 17:10:44 2008
@@ -238,6 +238,7 @@
{
switch_stun_packet_t *packet;
switch_stun_packet_attribute_t *attr;
+ void *end_buf;
char username[33] = { 0 };
unsigned char buf[512] = { 0 };
switch_size_t cpylen = len;
@@ -260,6 +261,7 @@
memcpy(buf, data, cpylen);
packet = switch_stun_packet_parse(buf, sizeof(buf));
+ end_buf = buf + sizeof(buf);
rtp_session->last_stun = switch_time_now();
switch_stun_packet_first_attribute(packet, attr);
@@ -279,7 +281,7 @@
}
break;
}
- } while (switch_stun_packet_next_attribute(attr));
+ } while (switch_stun_packet_next_attribute(attr, end_buf));
if ((packet->header.type == SWITCH_STUN_BINDING_REQUEST) && !strcmp(rtp_session->user_ice, username)) {
uint8_t stunbuf[512];
Modified: freeswitch/trunk/src/switch_stun.c
==============================================================================
--- freeswitch/trunk/src/switch_stun.c (original)
+++ freeswitch/trunk/src/switch_stun.c Sat May 10 17:10:44 2008
@@ -117,6 +117,7 @@
{
switch_stun_packet_t *packet;
switch_stun_packet_attribute_t *attr;
+ void *end_buf = buf + len;
if (len < SWITCH_STUN_PACKET_MIN_LEN) {
return NULL;
@@ -141,7 +142,7 @@
}
break;
}
- } while (switch_stun_packet_next_attribute(attr));
+ } while (switch_stun_packet_next_attribute(attr, end_buf));
return packet;
}
@@ -273,6 +274,7 @@
switch_sockaddr_t *local_addr = NULL, *remote_addr = NULL, *from_addr = NULL;
switch_socket_t *sock = NULL;
uint8_t buf[256] = { 0 };
+ void *end_buf;
switch_stun_packet_t *packet;
switch_stun_packet_attribute_t *attr;
switch_size_t bytes = 0;
@@ -335,6 +337,7 @@
switch_socket_close(sock);
packet = switch_stun_packet_parse(buf, sizeof(buf));
+ end_buf = buf + sizeof(buf);
switch_stun_packet_first_attribute(packet, attr);
do {
@@ -350,7 +353,7 @@
}
break;
}
- } while (switch_stun_packet_next_attribute(attr));
+ } while (switch_stun_packet_next_attribute(attr, end_buf));
if (packet->header.type == SWITCH_STUN_BINDING_RESPONSE) {
*ip = switch_core_strdup(pool, rip);
1
0
[commit] r8353 - in freeswitch/trunk: libs/sofia-sip/libsofia-sip-ua/nta src/include src/mod/applications/mod_conference
by Freeswitch SVN 10 May '08
by Freeswitch SVN 10 May '08
10 May '08
Author: mikej
Date: Sat May 10 17:10:19 2008
New Revision: 8353
Modified:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
fix build
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c Sat May 10 17:10:19 2008
@@ -170,6 +170,10 @@
#define NTA_BRANCH_PRIME SU_U64_C(0xB9591D1C361C6521)
#define NTA_TAG_PRIME SU_U64_C(0xB9591D1C361C6521)
+#ifndef UINT32_MAX
+#define UINT32_MAX (0xffffffffU)
+#endif
+
HTABLE_PROTOS_WITH(leg_htable, lht, nta_leg_t, size_t, hash_value_t);
static nta_leg_t *leg_find(nta_agent_t const *sa,
char const *method_name,
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Sat May 10 17:10:19 2008
@@ -310,8 +310,8 @@
SWITCH_DECLARE(void) sendEvent(Event *sendME);
- SWITCH_DECLARE(void) CoreSession::setEventData(Event *e);
- SWITCH_DECLARE(char *) CoreSession::getXMLCDR();
+ SWITCH_DECLARE(void) setEventData(Event *e);
+ SWITCH_DECLARE(char *) getXMLCDR();
virtual bool begin_allow_threads() = 0;
virtual bool end_allow_threads() = 0;
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Sat May 10 17:10:19 2008
@@ -4196,11 +4196,13 @@
profile_name = "default";
}
+#if 0
if (0) {
member.dtmf_parser = conference->dtmf_parser;
} else {
}
+#endif
switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
switch_assert(params);
@@ -4521,7 +4523,7 @@
switch_buffer_destroy(&member.resample_buffer);
switch_buffer_destroy(&member.audio_buffer);
switch_buffer_destroy(&member.mux_buffer);
- if (member.dtmf_parser != conference->dtmf_parser) {
+ if (conference && member.dtmf_parser != conference->dtmf_parser) {
switch_ivr_digit_stream_parser_destroy(member.dtmf_parser);
}
1
0
[commit] r8352 - in freeswitch/trunk/src: . include mod/languages/mod_java mod/languages/mod_java/src/org/freeswitch/swig mod/languages/mod_lua mod/languages/mod_perl mod/languages/mod_python
by Freeswitch SVN 10 May '08
by Freeswitch SVN 10 May '08
10 May '08
Author: anthm
Date: Sat May 10 13:02:43 2008
New Revision: 8352
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
freeswitch/trunk/src/switch_cpp.cpp
Log:
add some methods to CoreSession
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Sat May 10 13:02:43 2008
@@ -160,6 +160,7 @@
switch_input_args_t *ap; // ptr to args .. (is this really needed?)
switch_caller_profile_t caller_profile; // avoid passing so many args to originate,
// instead set them here first
+ char *xml_cdr_text;
char *uuid;
char *tts_name;
char *voice_name;
@@ -309,6 +310,9 @@
SWITCH_DECLARE(void) sendEvent(Event *sendME);
+ SWITCH_DECLARE(void) CoreSession::setEventData(Event *e);
+ SWITCH_DECLARE(char *) CoreSession::getXMLCDR();
+
virtual bool begin_allow_threads() = 0;
virtual bool end_allow_threads() = 0;
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java Sat May 10 13:02:43 2008
@@ -213,6 +213,14 @@
freeswitchJNI.CoreSession_sendEvent(swigCPtr, this, Event.getCPtr(sendME), sendME);
}
+ public void setEventData(Event e) {
+ freeswitchJNI.CoreSession_setEventData(swigCPtr, this, Event.getCPtr(e), e);
+ }
+
+ public String getXMLCDR() {
+ return freeswitchJNI.CoreSession_getXMLCDR(swigCPtr, this);
+ }
+
public boolean begin_allow_threads() {
return freeswitchJNI.CoreSession_begin_allow_threads(swigCPtr, this);
}
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java Sat May 10 13:02:43 2008
@@ -104,6 +104,8 @@
public final static native boolean CoreSession_ready(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_execute(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native void CoreSession_sendEvent(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
+ public final static native void CoreSession_setEventData(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
+ public final static native String CoreSession_getXMLCDR(long jarg1, CoreSession jarg1_);
public final static native boolean CoreSession_begin_allow_threads(long jarg1, CoreSession jarg1_);
public final static native boolean CoreSession_end_allow_threads(long jarg1, CoreSession jarg1_);
public final static native String CoreSession_get_uuid(long jarg1, CoreSession jarg1_);
Modified: freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp Sat May 10 13:02:43 2008
@@ -2022,6 +2022,35 @@
}
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setEventData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ Event *arg2 = (Event *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = *(Event **)&jarg2;
+ (arg1)->setEventData(arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getXMLCDR(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (char *)(arg1)->getXMLCDR();
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ return jresult;
+}
+
+
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1begin_1allow_1threads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jboolean jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp Sat May 10 13:02:43 2008
@@ -4726,6 +4726,62 @@
}
+static int _wrap_CoreSession_setEventData(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ Event *arg2 = (Event *) 0 ;
+
+ SWIG_check_num_args("setEventData",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setEventData",1,"CoreSession *");
+ if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setEventData",2,"Event *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_setEventData",1,SWIGTYPE_p_CoreSession);
+ }
+
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Event,0))){
+ SWIG_fail_ptr("CoreSession_setEventData",2,SWIGTYPE_p_Event);
+ }
+
+ (arg1)->setEventData(arg2);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_getXMLCDR(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("getXMLCDR",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getXMLCDR",1,"CoreSession *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_getXMLCDR",1,SWIGTYPE_p_CoreSession);
+ }
+
+ result = (char *)(arg1)->getXMLCDR();
+ SWIG_arg=0;
+ lua_pushstring(L,(const char*)result); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static int _wrap_CoreSession_begin_allow_threads(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -4924,6 +4980,8 @@
{"ready", _wrap_CoreSession_ready},
{"execute", _wrap_CoreSession_execute},
{"sendEvent", _wrap_CoreSession_sendEvent},
+ {"setEventData", _wrap_CoreSession_setEventData},
+ {"getXMLCDR", _wrap_CoreSession_getXMLCDR},
{"begin_allow_threads", _wrap_CoreSession_begin_allow_threads},
{"end_allow_threads", _wrap_CoreSession_end_allow_threads},
{"get_uuid", _wrap_CoreSession_get_uuid},
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm Sat May 10 13:02:43 2008
@@ -326,6 +326,8 @@
*ready = *freeswitchc::CoreSession_ready;
*execute = *freeswitchc::CoreSession_execute;
*sendEvent = *freeswitchc::CoreSession_sendEvent;
+*setEventData = *freeswitchc::CoreSession_setEventData;
+*getXMLCDR = *freeswitchc::CoreSession_getXMLCDR;
*begin_allow_threads = *freeswitchc::CoreSession_begin_allow_threads;
*end_allow_threads = *freeswitchc::CoreSession_end_allow_threads;
*get_uuid = *freeswitchc::CoreSession_get_uuid;
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp Sat May 10 13:02:43 2008
@@ -6243,6 +6243,71 @@
}
+XS(_wrap_CoreSession_setEventData) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ Event *arg2 = (Event *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: CoreSession_setEventData(self,e);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setEventData" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setEventData" "', argument " "2"" of type '" "Event *""'");
+ }
+ arg2 = reinterpret_cast< Event * >(argp2);
+ (arg1)->setEventData(arg2);
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_getXMLCDR) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: CoreSession_getXMLCDR(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getXMLCDR" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ result = (char *)(arg1)->getXMLCDR();
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_CoreSession_begin_allow_threads) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -7710,6 +7775,8 @@
{"freeswitchc::CoreSession_ready", _wrap_CoreSession_ready},
{"freeswitchc::CoreSession_execute", _wrap_CoreSession_execute},
{"freeswitchc::CoreSession_sendEvent", _wrap_CoreSession_sendEvent},
+{"freeswitchc::CoreSession_setEventData", _wrap_CoreSession_setEventData},
+{"freeswitchc::CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR},
{"freeswitchc::CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads},
{"freeswitchc::CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads},
{"freeswitchc::CoreSession_get_uuid", _wrap_CoreSession_get_uuid},
Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py Sat May 10 13:02:43 2008
@@ -1,5 +1,5 @@
# This file was automatically generated by SWIG (http://www.swig.org)
-# Version 1.3.31
+# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
@@ -169,7 +169,7 @@
__setattr__ = lambda self, name, value: _swig_setattr(self, CoreSession, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, CoreSession, name)
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
__repr__ = _swig_repr
__swig_destroy__ = _freeswitch.delete_CoreSession
__del__ = lambda self : None;
@@ -217,6 +217,8 @@
def ready(*args): return _freeswitch.CoreSession_ready(*args)
def execute(*args): return _freeswitch.CoreSession_execute(*args)
def sendEvent(*args): return _freeswitch.CoreSession_sendEvent(*args)
+ def setEventData(*args): return _freeswitch.CoreSession_setEventData(*args)
+ def getXMLCDR(*args): return _freeswitch.CoreSession_getXMLCDR(*args)
def begin_allow_threads(*args): return _freeswitch.CoreSession_begin_allow_threads(*args)
def end_allow_threads(*args): return _freeswitch.CoreSession_end_allow_threads(*args)
def get_uuid(*args): return _freeswitch.CoreSession_get_uuid(*args)
Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp Sat May 10 13:02:43 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -12,7 +12,7 @@
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#ifdef __cplusplus
-template<class T> class SwigValueWrapper {
+template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
@@ -25,6 +25,10 @@
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
+
+template <typename T> T SwigValueInit() {
+ return T();
+}
#endif
/* -----------------------------------------------------------------------------
@@ -34,14 +38,14 @@
/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-# if (__SUNPRO_CC <= 0x560)
-# define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-# define SWIGTEMPLATEDISAMBIGUATOR
-# endif
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
# else
-# define SWIGTEMPLATEDISAMBIGUATOR
+# define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif
@@ -124,6 +128,12 @@
# define _CRT_SECURE_NO_DEPRECATE
#endif
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
/* Python.h has to appear first */
#include <Python.h>
@@ -137,7 +147,7 @@
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
@@ -172,6 +182,7 @@
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -312,10 +323,10 @@
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
@@ -360,7 +371,7 @@
while ((*f2 == ' ') && (f2 != l2)) ++f2;
if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
}
- return (l1 - f1) - (l2 - f2);
+ return (int)((l1 - f1) - (l2 - f2));
}
/*
@@ -442,8 +453,8 @@
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
@@ -867,7 +878,7 @@
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_SetString(PyExc_RuntimeError, mesg);
}
}
@@ -1107,14 +1118,14 @@
/* Unpack the argument tuple */
SWIGINTERN int
-SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
if (!min && !max) {
return 1;
} else {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
- name, (min == max ? "" : "at least "), min);
+ name, (min == max ? "" : "at least "), (int)min);
return 0;
}
}
@@ -1122,14 +1133,14 @@
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0;
} else {
- register int l = PyTuple_GET_SIZE(args);
+ register Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
- name, (min == max ? "" : "at least "), min, l);
+ name, (min == max ? "" : "at least "), (int)min, (int)l);
return 0;
} else if (l > max) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
- name, (min == max ? "" : "at most "), max, l);
+ name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
@@ -1427,7 +1438,7 @@
{
PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own) {
+ if (sobj->own == SWIG_POINTER_OWN) {
swig_type_info *ty = sobj->ty;
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
@@ -1445,12 +1456,13 @@
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- } else {
- const char *name = SWIG_TypePrettyName(ty);
+ }
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
}
+#endif
}
Py_XDECREF(next);
PyObject_DEL(v);
@@ -1608,9 +1620,11 @@
(unaryfunc)0, /*nb_float*/
(unaryfunc)PySwigObject_oct, /*nb_oct*/
(unaryfunc)PySwigObject_hex, /*nb_hex*/
-#if PY_VERSION_HEX >= 0x02020000
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
-#elif PY_VERSION_HEX >= 0x02000000
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
};
@@ -1953,7 +1967,7 @@
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own) {
+ if (own == SWIG_POINTER_OWN) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
@@ -1974,6 +1988,8 @@
return SWIG_OK;
} else {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
@@ -1987,7 +2003,15 @@
if (!tc) {
sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own);
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
break;
}
}
@@ -1997,7 +2021,8 @@
}
}
if (sobj) {
- if (own) *own = sobj->own;
+ if (own)
+ *own = *own | sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
@@ -2062,8 +2087,13 @@
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (!tc) return SWIG_ERROR;
- *ptr = SWIG_TypeCast(tc,vptr);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
} else {
*ptr = vptr;
}
@@ -2505,7 +2535,7 @@
#define SWIG_name "_freeswitch"
-#define SWIGVERSION 0x010331
+#define SWIGVERSION 0x010335
#define SWIG_VERSION SWIGVERSION
@@ -2533,7 +2563,9 @@
PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
{
- if (initial_ref) Py_XINCREF(_obj);
+ if (initial_ref) {
+ Py_XINCREF(_obj);
+ }
}
PyObject_ptr & operator=(const PyObject_ptr& item)
@@ -2649,14 +2681,12 @@
#include <limits.h>
-#ifndef LLONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
-#endif
-#ifndef LLONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
-#endif
-#ifndef ULLONG_MAX
-# define ULLONG_MAX ULONG_LONG_MAX
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+# define LLONG_MAX __LONG_LONG_MAX__
+# define LLONG_MIN (-LLONG_MAX - 1LL)
+# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
#endif
@@ -2914,18 +2944,11 @@
SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
- if (obj == Py_True) {
- if (val) *val = true;
- return SWIG_OK;
- } else if (obj == Py_False) {
- if (val) *val = false;
- return SWIG_OK;
- } else {
- long v = 0;
- int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0));
- if (SWIG_IsOK(res) && val) *val = v ? true : false;
- return res;
- }
+ int r = PyObject_IsTrue(obj);
+ if (r == -1)
+ return SWIG_ERROR;
+ if (val) *val = r ? true : false;
+ return SWIG_OK;
}
#ifdef __cplusplus
@@ -3265,7 +3288,7 @@
SWIGINTERN PyObject *IVRMenu_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_IVRMenu, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -3387,7 +3410,7 @@
SWIGINTERN PyObject *API_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_API, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -3643,7 +3666,7 @@
SWIGINTERN PyObject *input_callback_state_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_input_callback_state, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -3689,7 +3712,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 1); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -3707,7 +3730,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stream'.\n Possible C/C++ prototypes are:\n Stream()\n Stream(switch_stream_handle_t *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stream'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " Stream()\n"
+ " Stream(switch_stream_handle_t *)\n");
return NULL;
}
@@ -3791,7 +3817,7 @@
SWIGINTERN PyObject *Stream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_Stream, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -4084,7 +4110,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -4134,7 +4160,12 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Event'.\n Possible C/C++ prototypes are:\n Event(char const *,char const *)\n Event(char const *)\n Event(switch_event_t *,int)\n Event(switch_event_t *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Event'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " Event(char const *,char const *)\n"
+ " Event(char const *)\n"
+ " Event(switch_event_t *,int)\n"
+ " Event(switch_event_t *)\n");
return NULL;
}
@@ -4223,7 +4254,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -4251,7 +4282,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_serialize'.\n Possible C/C++ prototypes are:\n serialize(char const *)\n serialize()\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_serialize'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " serialize(Event *,char const *)\n"
+ " serialize(Event *)\n");
return NULL;
}
@@ -4323,7 +4357,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -4351,7 +4385,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_setPriority'.\n Possible C/C++ prototypes are:\n setPriority(switch_priority_t)\n setPriority()\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_setPriority'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " setPriority(Event *,switch_priority_t)\n"
+ " setPriority(Event *)\n");
return NULL;
}
@@ -4572,7 +4609,7 @@
SWIGINTERN PyObject *Event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_Event, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -5029,7 +5066,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -5057,7 +5094,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_hangup'.\n Possible C/C++ prototypes are:\n hangup(char *)\n hangup()\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_hangup'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " hangup(CoreSession *,char *)\n"
+ " hangup(CoreSession *)\n");
return NULL;
}
@@ -5411,7 +5451,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 5); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -5505,7 +5545,12 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_recordFile'.\n Possible C/C++ prototypes are:\n recordFile(char *,int,int,int)\n recordFile(char *,int,int)\n recordFile(char *,int)\n recordFile(char *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_recordFile'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " recordFile(CoreSession *,char *,int,int,int)\n"
+ " recordFile(CoreSession *,char *,int,int)\n"
+ " recordFile(CoreSession *,char *,int)\n"
+ " recordFile(CoreSession *,char *)\n");
return NULL;
}
@@ -5656,7 +5701,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 4); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -5704,7 +5749,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_originate'.\n Possible C/C++ prototypes are:\n originate(CoreSession *,char *,int)\n originate(CoreSession *,char *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_originate'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " originate(CoreSession *,CoreSession *,char *,int)\n"
+ " originate(CoreSession *,CoreSession *,char *)\n");
return NULL;
}
@@ -6231,7 +6279,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 3); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -6269,7 +6317,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_streamFile'.\n Possible C/C++ prototypes are:\n streamFile(char *,int)\n streamFile(char *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_streamFile'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " streamFile(CoreSession *,char *,int)\n"
+ " streamFile(CoreSession *,char *)\n");
return NULL;
}
@@ -6474,6 +6525,58 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_setEventData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ Event *arg2 = (Event *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_setEventData",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setEventData" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setEventData" "', argument " "2"" of type '" "Event *""'");
+ }
+ arg2 = reinterpret_cast< Event * >(argp2);
+ (arg1)->setEventData(arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_getXMLCDR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_getXMLCDR",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getXMLCDR" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ result = (char *)(arg1)->getXMLCDR();
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_begin_allow_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -6634,7 +6737,7 @@
SWIGINTERN PyObject *CoreSession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_CoreSession, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -6885,7 +6988,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 1); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -6911,7 +7014,11 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PySession'.\n Possible C/C++ prototypes are:\n PySession()\n PySession(char *)\n PySession(switch_core_session_t *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PySession'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " PySession()\n"
+ " PySession(char *)\n"
+ " PySession(switch_core_session_t *)\n");
return NULL;
}
@@ -7144,7 +7251,7 @@
SWIGINTERN PyObject *PySession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_PySession, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -7235,6 +7342,8 @@
{ (char *)"CoreSession_ready", _wrap_CoreSession_ready, METH_VARARGS, NULL},
{ (char *)"CoreSession_execute", _wrap_CoreSession_execute, METH_VARARGS, NULL},
{ (char *)"CoreSession_sendEvent", _wrap_CoreSession_sendEvent, METH_VARARGS, NULL},
+ { (char *)"CoreSession_setEventData", _wrap_CoreSession_setEventData, METH_VARARGS, NULL},
+ { (char *)"CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR, METH_VARARGS, NULL},
{ (char *)"CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads, METH_VARARGS, NULL},
{ (char *)"CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads, METH_VARARGS, NULL},
{ (char *)"CoreSession_get_uuid", _wrap_CoreSession_get_uuid, METH_VARARGS, NULL},
@@ -7263,7 +7372,7 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-static void *_p_PySessionTo_p_CoreSession(void *x) {
+static void *_p_PySessionTo_p_CoreSession(void *x, int *newmemory) {
return (void *)((CoreSession *) ((PySession *) x));
}
static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)0, 0};
@@ -7273,7 +7382,7 @@
static swig_type_info _swigt__p_PySession = {"_p_PySession", "PySession *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_swap_state_t = {"_p_swap_state_t", "enum swap_state_t *|swap_state_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
@@ -7420,7 +7529,7 @@
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -7430,6 +7539,9 @@
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -7458,6 +7570,12 @@
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Sat May 10 13:02:43 2008
@@ -382,11 +382,38 @@
switch_core_session_rwunlock(session);
}
+ switch_safe_free(xml_cdr_text);
switch_safe_free(uuid);
switch_safe_free(tts_name);
switch_safe_free(voice_name);
}
+SWITCH_DECLARE(char *) CoreSession::getXMLCDR()
+{
+
+ switch_xml_t cdr;
+
+ sanity_check("");
+
+ switch_safe_free(xml_cdr_text);
+
+ if (switch_ivr_generate_xml_cdr(session, &cdr) == SWITCH_STATUS_SUCCESS) {
+ xml_cdr_text = switch_xml_toxml(cdr, SWITCH_FALSE);
+ switch_xml_free(cdr);
+ }
+
+ return (char *) (xml_cdr_text ? xml_cdr_text : "");
+}
+
+SWITCH_DECLARE(void) CoreSession::setEventData(Event *e)
+{
+ sanity_check_noreturn;
+
+ if (channel && e->event) {
+ switch_channel_event_set_data(channel, e->event);
+ }
+}
+
SWITCH_DECLARE(int) CoreSession::answer()
{
switch_status_t status;
1
0