[Freeswitch-svn] [commit] r2596 - freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php
Freeswitch SVN
docelmo at freeswitch.org
Sat Sep 9 03:40:03 EDT 2006
Author: docelmo
Date: Sat Sep 9 03:40:02 2006
New Revision: 2596
Modified:
freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/apptest.php
freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php
freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/php_freeswitch.h
freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig.c
freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig_wrap.c
Log:
New stuff classed all works now\!
Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/apptest.php
==============================================================================
--- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/apptest.php (original)
+++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/apptest.php Sat Sep 9 03:40:02 2006
@@ -1,7 +1,17 @@
<?
-include("freeswitch.php");
-$session = fs_core_session_locate($uuid);
-fs_channel_answer($session);
-fs_ivr_play_file2($session, "/ram/sr8k.wav");
+/*
+
+ This application does not fall under the MPL. Its 100% freeware
+ no code needs to be submitted back to us for this.
+ (c)2006 Brian Fertig
+
+*/
+require("classFreeswitch.php");
+
+$fs = new fs_class_api;
+
+$fs->fs_answer($session);
+
+$fs->fs_play_file($session, "/ram/sr8k.wav");
?>
Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php
==============================================================================
--- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php (original)
+++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php Sat Sep 9 03:40:02 2006
@@ -31,12 +31,12 @@
*
*/
require("freeswitch.php"); // Required for freeswitch driver to be loaded
-global $session;
+global $sessn;
class fs_class_api {
function fs_class_api() {
- /* if($session = $this->fs_getSession($uuid)){}
+ /* if($sessn = $this->fs_getsessn($uuid)){}
else{
- echo "Couldnt get session!\n";
+ echo "Couldnt get sessn!\n";
}
*/
}
@@ -62,99 +62,99 @@
}
- function fs_getSession($uuid){
+ function fs_getsessn($uuid){
- return fs_core_session_locate($uuid);
+ return fs_core_sessn_locate($uuid);
}
function fs_answer(){
- fs_channel_answer($session);
+ fs_channel_answer($sessn);
}
- function fs_early_media($session){
+ function fs_early_media($sessn){
- fs_channel_pre_answer($session);
+ fs_channel_pre_answer($sessn);
}
function fs_hangup($cause){
- fs_channel_hangup($session, $cause);
+ fs_channel_hangup($sessn, $cause);
}
function fs_set_variable($var, $val){
- fs_channel_set_variable($session, $var, $val);
+ fs_channel_set_variable($sessn, $var, $val);
}
function fs_get_variable($var){
- return fs_channel_get_var($session, $var);
+ return fs_channel_get_var($sessn, $var);
}
function fs_set_channel_state($state){
- fs_channel_set_state($session, $state);
+ fs_channel_set_state($sessn, $state);
}
function fs_play_file($file){
- return fs_ivr_play_file($session, $file, NULL, NULL, NULL, 0);
+ return fs_ivr_play_file($sessn, $file, NULL, NULL, NULL, 0);
}
function record_file($file){
- return fs_switch_ivr_record_file($session, NULL, $file, NULL, NULL, 0);
+ return fs_switch_ivr_record_file($sessn, NULL, $file, NULL, NULL, 0);
}
function fs_wait($ms){
- return fs_switch_ivr_sleep($session, $ms);
+ return fs_switch_ivr_sleep($sessn, $ms);
}
function fs_get_dtmf_callback($len){
- return fs_switch_ivr_collect_digits_callback($session, NULL, NULL, $len);
+ return fs_switch_ivr_collect_digits_callback($sessn, NULL, NULL, $len);
}
function fs_get_digit_count ($maxdigits, $terminator, $timeout){
- return fs_switch_ivr_collect_digits_count($session, NULL, NULL, $maxdigits, NULL, $terminator, $timeout);
+ return fs_switch_ivr_collect_digits_count($sessn, NULL, NULL, $maxdigits, NULL, $terminator, $timeout);
}
- function fs_x_way($peer_session, $dtmf, $session_data, $peer_data){
+ function fs_x_way($peer_sessn, $dtmf, $sessn_data, $peer_data){
- return fs_switch_ivr_multi_threaded_bridge ($session, $peer_session, $dtmf, $session_data, $peer_data);
+ return fs_switch_ivr_multi_threaded_bridge ($sessn, $peer_sessn, $dtmf, $sessn_data, $peer_data);
}
function fs_dial($data, $timelimit){
- return fs_switch_ivr_originate(session, NULL, $data, $timelimit, NULL, NULL, NULL, NULL);
+ return fs_switch_ivr_originate(sessn, NULL, $data, $timelimit, NULL, NULL, NULL, NULL);
}
function fs_transfer($exten, $dialplan, $context){
- return fs_switch_ivr_session_transfer($session, $exten, $dialplan, $context);
+ return fs_switch_ivr_sessn_transfer($sessn, $exten, $dialplan, $context);
}
function fs_speak($ttsName, $voice, $text, $dtmf=NULL){
- return fs_switch_ivr_speak_text($session, $ttsName, NULL, NULL, $dtmf, $text, NULL, 0);
+ return fs_switch_ivr_speak_text($sessn, $ttsName, NULL, NULL, $dtmf, $text, NULL, 0);
}
Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/php_freeswitch.h
==============================================================================
--- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/php_freeswitch.h (original)
+++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/php_freeswitch.h Sat Sep 9 03:40:02 2006
@@ -56,8 +56,8 @@
ZEND_NAMED_FUNCTION(_wrap_fs_loadable_module_init);
ZEND_NAMED_FUNCTION(_wrap_fs_loadable_module_shutdown);
ZEND_NAMED_FUNCTION(_wrap_fs_console_loop);
-ZEND_NAMED_FUNCTION(_wrap_fs_console_log);
ZEND_NAMED_FUNCTION(_wrap_fs_console_clean);
+ZEND_NAMED_FUNCTION(_wrap_fs_console_log);
ZEND_NAMED_FUNCTION(_wrap_fs_core_session_locate);
ZEND_NAMED_FUNCTION(_wrap_fs_channel_answer);
ZEND_NAMED_FUNCTION(_wrap_fs_channel_pre_answer);
@@ -71,7 +71,6 @@
ZEND_NAMED_FUNCTION(_wrap_fs_ivr_play_file2);
ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_collect_digits_callback);
ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_collect_digits_count);
-ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_multi_threaded_bridge);
ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_originate);
ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_session_transfer);
ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_speak_text);
Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig.c
==============================================================================
--- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig.c (original)
+++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig.c Sat Sep 9 03:40:02 2006
@@ -240,7 +240,7 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-int fs_switch_ivr_multi_threaded_bridge (switch_core_session_t *session,
+/*int fs_switch_ivr_multi_threaded_bridge (switch_core_session_t *session,
switch_core_session_t *peer_session,
switch_input_callback_function_t dtmf_callback,
void *session_data,
@@ -251,20 +251,39 @@
status = switch_ivr_multi_threaded_bridge(session, peer_session, dtmf_callback, session_data, peer_session_data);
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
+*/
int fs_switch_ivr_originate (switch_core_session_t *session,
switch_core_session_t **bleg,
char * bridgeto,
- uint32_t timelimit_sec,
- const switch_state_handler_table_t *table,
+ uint32_t timelimit_sec)
+ /*const switch_state_handler_table_t *table,
char * cid_name_override,
char * cid_num_override,
- switch_caller_profile_t *caller_profile_override)
+ switch_caller_profile_t *caller_profile_override) */
{
- switch_status_t status;
- status = switch_ivr_originate(session, bleg, bridgeto, timelimit_sec, table, cid_name_override, cid_num_override, caller_profile_override);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ switch_channel_t *caller_channel;
+ switch_core_session_t *peer_session;
+ unsigned int timelimit = 60;
+ char *var;
+
+ caller_channel = switch_core_session_get_channel(session);
+ assert(caller_channel != NULL);
+
+ if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
+ timelimit = atoi(var);
+ }
+ switch_ivr_originate(session, &peer_session, data, timelimit, NULL, NULL, NULL, NULL)
+ if (switch_ivr_originate(session, &peer_session, data, timelimit, NULL, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
+ switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
+ return;
+ } else {
+ switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
+ }
+
+
}
int fs_switch_ivr_session_transfer(switch_core_session_t *session,
Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig_wrap.c
==============================================================================
--- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig_wrap.c (original)
+++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/switch_swig_wrap.c Sat Sep 9 03:40:02 2006
@@ -885,15 +885,13 @@
#define SWIGTYPE_p_p_switch_core_session_t swig_types[0]
#define SWIGTYPE_p_p_void swig_types[1]
-#define SWIGTYPE_p_switch_caller_profile_t swig_types[2]
-#define SWIGTYPE_p_switch_channel_t swig_types[3]
-#define SWIGTYPE_p_switch_core_session_t swig_types[4]
-#define SWIGTYPE_p_switch_file_handle_t swig_types[5]
-#define SWIGTYPE_p_switch_input_callback_function_t swig_types[6]
-#define SWIGTYPE_p_switch_state_handler_table_t swig_types[7]
-#define SWIGTYPE_p_uint32_t swig_types[8]
-static swig_type_info *swig_types[10];
-static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
+#define SWIGTYPE_p_switch_channel_t swig_types[2]
+#define SWIGTYPE_p_switch_core_session_t swig_types[3]
+#define SWIGTYPE_p_switch_file_handle_t swig_types[4]
+#define SWIGTYPE_p_switch_input_callback_function_t swig_types[5]
+#define SWIGTYPE_p_uint32_t swig_types[6]
+static swig_type_info *swig_types[8];
+static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
@@ -969,8 +967,8 @@
ZEND_NAMED_FE(fs_loadable_module_init,_wrap_fs_loadable_module_init, NULL)
ZEND_NAMED_FE(fs_loadable_module_shutdown,_wrap_fs_loadable_module_shutdown, NULL)
ZEND_NAMED_FE(fs_console_loop,_wrap_fs_console_loop, NULL)
- ZEND_NAMED_FE(fs_console_log,_wrap_fs_console_log, NULL)
ZEND_NAMED_FE(fs_console_clean,_wrap_fs_console_clean, NULL)
+ ZEND_NAMED_FE(fs_console_log,_wrap_fs_console_log, NULL)
ZEND_NAMED_FE(fs_core_session_locate,_wrap_fs_core_session_locate, NULL)
ZEND_NAMED_FE(fs_channel_answer,_wrap_fs_channel_answer, NULL)
ZEND_NAMED_FE(fs_channel_pre_answer,_wrap_fs_channel_pre_answer, NULL)
@@ -984,7 +982,6 @@
ZEND_NAMED_FE(fs_ivr_play_file2,_wrap_fs_ivr_play_file2, NULL)
ZEND_NAMED_FE(fs_switch_ivr_collect_digits_callback,_wrap_fs_switch_ivr_collect_digits_callback, NULL)
ZEND_NAMED_FE(fs_switch_ivr_collect_digits_count,_wrap_fs_switch_ivr_collect_digits_count, NULL)
- ZEND_NAMED_FE(fs_switch_ivr_multi_threaded_bridge,_wrap_fs_switch_ivr_multi_threaded_bridge, NULL)
ZEND_NAMED_FE(fs_switch_ivr_originate,_wrap_fs_switch_ivr_originate, NULL)
ZEND_NAMED_FE(fs_switch_ivr_session_transfer,_wrap_fs_switch_ivr_session_transfer, NULL)
ZEND_NAMED_FE(fs_switch_ivr_speak_text,_wrap_fs_switch_ivr_speak_text, NULL)
@@ -1016,45 +1013,37 @@
static swig_type_info _swigt__p_p_switch_core_session_t = {"_p_p_switch_core_session_t", "switch_core_session_t **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_switch_caller_profile_t = {"_p_switch_caller_profile_t", "switch_caller_profile_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_channel_t = {"_p_switch_channel_t", "switch_channel_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_core_session_t = {"_p_switch_core_session_t", "switch_core_session_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_file_handle_t = {"_p_switch_file_handle_t", "switch_file_handle_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_input_callback_function_t = {"_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_switch_state_handler_table_t = {"_p_switch_state_handler_table_t", "switch_state_handler_table_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
&_swigt__p_p_switch_core_session_t,
&_swigt__p_p_void,
- &_swigt__p_switch_caller_profile_t,
&_swigt__p_switch_channel_t,
&_swigt__p_switch_core_session_t,
&_swigt__p_switch_file_handle_t,
&_swigt__p_switch_input_callback_function_t,
- &_swigt__p_switch_state_handler_table_t,
&_swigt__p_uint32_t,
};
static swig_cast_info _swigc__p_p_switch_core_session_t[] = { {&_swigt__p_p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_switch_caller_profile_t[] = { {&_swigt__p_switch_caller_profile_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_channel_t[] = { {&_swigt__p_switch_channel_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_core_session_t[] = { {&_swigt__p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_file_handle_t[] = { {&_swigt__p_switch_file_handle_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_input_callback_function_t[] = { {&_swigt__p_switch_input_callback_function_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_switch_state_handler_table_t[] = { {&_swigt__p_switch_state_handler_table_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_p_switch_core_session_t,
_swigc__p_p_void,
- _swigc__p_switch_caller_profile_t,
_swigc__p_switch_channel_t,
_swigc__p_switch_core_session_t,
_swigc__p_switch_file_handle_t,
_swigc__p_switch_input_callback_function_t,
- _swigc__p_switch_state_handler_table_t,
_swigc__p_uint32_t,
};
@@ -1067,11 +1056,9 @@
static int le_swig__p_switch_file_handle_t=0; /* handle for */
static int le_swig__p_switch_core_session_t=0; /* handle for */
static int le_swig__p_p_switch_core_session_t=0; /* handle for */
-static int le_swig__p_switch_state_handler_table_t=0; /* handle for */
static int le_swig__p_p_void=0; /* handle for */
static int le_swig__p_uint32_t=0; /* handle for */
static int le_swig__p_switch_input_callback_function_t=0; /* handle for */
-static int le_swig__p_switch_caller_profile_t=0; /* handle for */
/* end vdecl subsection */
/* wrapper section */
ZEND_NAMED_FUNCTION(_wrap_fs_core_set_globals) {
@@ -1192,12 +1179,13 @@
}
-ZEND_NAMED_FUNCTION(_wrap_fs_console_log) {
+ZEND_NAMED_FUNCTION(_wrap_fs_console_log__SWIG_0) {
char *arg1 = (char *) 0 ;
- zval **args[1];
+ char *arg2 = (char *) 0 ;
+ zval **args[2];
SWIG_ResetError();
- if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
+ if(((ZEND_NUM_ARGS() )!= 2) || (zend_get_parameters_array_ex(2, args)!= SUCCESS)) {
WRONG_PARAM_COUNT;
}
@@ -1207,7 +1195,13 @@
arg1 = (char *) Z_STRVAL_PP(args[0]);
/*@SWIG@*/;
}
- fs_console_log(arg1);
+ {
+ /*@SWIG:CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[1]);
+ arg2 = (char *) Z_STRVAL_PP(args[1]);
+ /*@SWIG@*/;
+ }
+ fs_console_log(arg1,arg2);
return;
fail:
@@ -1238,6 +1232,66 @@
}
+ZEND_NAMED_FUNCTION(_wrap_fs_console_log__SWIG_1) {
+ char *arg1 = (char *) 0 ;
+ zval **args[1];
+
+ SWIG_ResetError();
+ if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
+ WRONG_PARAM_COUNT;
+ }
+
+ {
+ /*@SWIG:CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[0]);
+ arg1 = (char *) Z_STRVAL_PP(args[0]);
+ /*@SWIG@*/;
+ }
+ fs_console_log(arg1);
+
+ return;
+fail:
+ zend_error(ErrorCode(),ErrorMsg());
+}
+
+
+ZEND_NAMED_FUNCTION(_wrap_fs_console_log) {
+ int argc;
+ zval **argv[2];
+ int ii;
+
+ argc = ZEND_NUM_ARGS();
+ zend_get_parameters_array_ex(argc,argv);
+ if (argc == 1) {
+ int _v;
+ _v = (Z_TYPE_PP(argv[0]) == IS_LONG ||
+ Z_TYPE_PP(argv[0]) == IS_DOUBLE ||
+ Z_TYPE_PP(argv[0]) == IS_STRING) ? 1 : 0;
+ if (_v) {
+ return _wrap_fs_console_log__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ _v = (Z_TYPE_PP(argv[0]) == IS_LONG ||
+ Z_TYPE_PP(argv[0]) == IS_DOUBLE ||
+ Z_TYPE_PP(argv[0]) == IS_STRING) ? 1 : 0;
+ if (_v) {
+ _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
+ Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
+ Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0;
+ if (_v) {
+ return _wrap_fs_console_log__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ }
+ }
+ }
+
+ ErrorCode() = E_ERROR;
+ ErrorMsg() = "No matching function for overloaded 'fs_console_log'";
+ zend_error(ErrorCode(),ErrorMsg());
+}
+
+
ZEND_NAMED_FUNCTION(_wrap_fs_core_session_locate) {
char *arg1 = (char *) 0 ;
switch_core_session_t *result = 0 ;
@@ -1750,80 +1804,17 @@
}
-ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_multi_threaded_bridge) {
- switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
- switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
- switch_input_callback_function_t arg3 ;
- void *arg4 = (void *) 0 ;
- void *arg5 = (void *) 0 ;
- int result;
- switch_input_callback_function_t *tmp3 ;
- zval **args[5];
-
- SWIG_ResetError();
- if(((ZEND_NUM_ARGS() )!= 5) || (zend_get_parameters_array_ex(5, args)!= SUCCESS)) {
- WRONG_PARAM_COUNT;
- }
-
- {
- /* typemap(in) SWIGTYPE * */
- if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_switch_core_session_t, 0) < 0) {
- SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of fs_switch_ivr_multi_threaded_bridge. Expected SWIGTYPE_p_switch_core_session_t");
- }
- }
- {
- /* typemap(in) SWIGTYPE * */
- if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_switch_core_session_t, 0) < 0) {
- SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of fs_switch_ivr_multi_threaded_bridge. Expected SWIGTYPE_p_switch_core_session_t");
- }
- }
- {
- if(SWIG_ConvertPtr(*args[2], (void **) &tmp3, SWIGTYPE_p_switch_input_callback_function_t, 0) < 0) {
- SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of fs_switch_ivr_multi_threaded_bridge. Expected SWIGTYPE_p_switch_input_callback_function_t");
- }
- arg3 = *tmp3;
- }
- {
- if(SWIG_ConvertPtr(*args[3], (void **) &arg4, 0, 0) < 0) {
- /* Allow NULL from php for void* */
- if ((*args[3])->type==IS_NULL) arg4=0;
- else
- SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of fs_switch_ivr_multi_threaded_bridge. Expected SWIGTYPE_p_p_void");
- }
- }
- {
- if(SWIG_ConvertPtr(*args[4], (void **) &arg5, 0, 0) < 0) {
- /* Allow NULL from php for void* */
- if ((*args[4])->type==IS_NULL) arg5=0;
- else
- SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of fs_switch_ivr_multi_threaded_bridge. Expected SWIGTYPE_p_p_void");
- }
- }
- result = (int)fs_switch_ivr_multi_threaded_bridge(arg1,arg2,arg3,arg4,arg5);
- {
- ZVAL_LONG(return_value,result);
- }
- return;
-fail:
- zend_error(ErrorCode(),ErrorMsg());
-}
-
-
ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_originate) {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_session_t **arg2 = (switch_core_session_t **) 0 ;
char *arg3 = (char *) 0 ;
uint32_t arg4 ;
- switch_state_handler_table_t *arg5 = (switch_state_handler_table_t *) 0 ;
- char *arg6 = (char *) 0 ;
- char *arg7 = (char *) 0 ;
- switch_caller_profile_t *arg8 = (switch_caller_profile_t *) 0 ;
int result;
uint32_t *tmp4 ;
- zval **args[8];
+ zval **args[4];
SWIG_ResetError();
- if(((ZEND_NUM_ARGS() )!= 8) || (zend_get_parameters_array_ex(8, args)!= SUCCESS)) {
+ if(((ZEND_NUM_ARGS() )!= 4) || (zend_get_parameters_array_ex(4, args)!= SUCCESS)) {
WRONG_PARAM_COUNT;
}
@@ -1851,32 +1842,8 @@
}
arg4 = *tmp4;
}
+ result = (int)fs_switch_ivr_originate(arg1,arg2,arg3,arg4);
{
- /* typemap(in) SWIGTYPE * */
- if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_switch_state_handler_table_t, 0) < 0) {
- SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of fs_switch_ivr_originate. Expected SWIGTYPE_p_switch_state_handler_table_t");
- }
- }
- {
- /*@SWIG:CONVERT_STRING_IN@*/
- convert_to_string_ex(args[5]);
- arg6 = (char *) Z_STRVAL_PP(args[5]);
- /*@SWIG@*/;
- }
- {
- /*@SWIG:CONVERT_STRING_IN@*/
- convert_to_string_ex(args[6]);
- arg7 = (char *) Z_STRVAL_PP(args[6]);
- /*@SWIG@*/;
- }
- {
- /* typemap(in) SWIGTYPE * */
- if(SWIG_ConvertPtr(*args[7], (void **) &arg8, SWIGTYPE_p_switch_caller_profile_t, 0) < 0) {
- SWIG_PHP_Error(E_ERROR, "Type error in argument 8 of fs_switch_ivr_originate. Expected SWIGTYPE_p_switch_caller_profile_t");
- }
- }
- result = (int)fs_switch_ivr_originate(arg1,arg2,arg3,arg4,(switch_state_handler_table_t const *)arg5,arg6,arg7,arg8);
- {
ZVAL_LONG(return_value,result);
}
return;
@@ -2112,10 +2079,6 @@
/* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
-static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_switch_state_handler_table_t) {
- /* bah! No destructor for this simple type!! */
-}
-/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_void) {
/* bah! No destructor for this simple type!! */
}
@@ -2127,10 +2090,6 @@
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_switch_input_callback_function_t) {
/* bah! No destructor for this simple type!! */
}
-/* NEW Destructor style */
-static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_switch_caller_profile_t) {
- /* bah! No destructor for this simple type!! */
-}
/* end wrapper section */
/* init section */
#ifdef __cplusplus
@@ -2369,16 +2328,12 @@
SWIG_TypeClientData(SWIGTYPE_p_switch_core_session_t,&le_swig__p_switch_core_session_t);
le_swig__p_p_switch_core_session_t=zend_register_list_destructors_ex(_wrap_destroy_p_p_switch_core_session_t,NULL,(char *)(SWIGTYPE_p_p_switch_core_session_t->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_switch_core_session_t,&le_swig__p_p_switch_core_session_t);
-le_swig__p_switch_state_handler_table_t=zend_register_list_destructors_ex(_wrap_destroy_p_switch_state_handler_table_t,NULL,(char *)(SWIGTYPE_p_switch_state_handler_table_t->name),module_number);
-SWIG_TypeClientData(SWIGTYPE_p_switch_state_handler_table_t,&le_swig__p_switch_state_handler_table_t);
le_swig__p_p_void=zend_register_list_destructors_ex(_wrap_destroy_p_p_void,NULL,(char *)(SWIGTYPE_p_p_void->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_void,&le_swig__p_p_void);
le_swig__p_uint32_t=zend_register_list_destructors_ex(_wrap_destroy_p_uint32_t,NULL,(char *)(SWIGTYPE_p_uint32_t->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_uint32_t,&le_swig__p_uint32_t);
le_swig__p_switch_input_callback_function_t=zend_register_list_destructors_ex(_wrap_destroy_p_switch_input_callback_function_t,NULL,(char *)(SWIGTYPE_p_switch_input_callback_function_t->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_switch_input_callback_function_t,&le_swig__p_switch_input_callback_function_t);
-le_swig__p_switch_caller_profile_t=zend_register_list_destructors_ex(_wrap_destroy_p_switch_caller_profile_t,NULL,(char *)(SWIGTYPE_p_switch_caller_profile_t->name),module_number);
-SWIG_TypeClientData(SWIGTYPE_p_switch_caller_profile_t,&le_swig__p_switch_caller_profile_t);
CG(active_class_entry) = NULL;
/* end oinit subsection */
More information about the Freeswitch-svn
mailing list