mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-30 22:13:03 +00:00
FS-9851: [freeswitch-core] Add abstimeout to CoreSession:getDigits in switch_cpp #resolve
This commit is contained in:
parent
78a5660127
commit
48fab6f6db
@ -309,6 +309,7 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod
|
|||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout);
|
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout);
|
||||||
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout, int interdigit);
|
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout, int interdigit);
|
||||||
|
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout, int interdigit, int abstimeout);
|
||||||
SWITCH_DECLARE(int) transfer(char *extension, char *dialplan = NULL, char *context = NULL);
|
SWITCH_DECLARE(int) transfer(char *extension, char *dialplan = NULL, char *context = NULL);
|
||||||
|
|
||||||
|
|
||||||
|
@ -5745,10 +5745,49 @@ fail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int _wrap_CoreSession_getDigits__SWIG_2(lua_State* L) {
|
||||||
|
int SWIG_arg = 0;
|
||||||
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||||
|
int arg2 ;
|
||||||
|
char *arg3 = (char *) 0 ;
|
||||||
|
int arg4 ;
|
||||||
|
int arg5 ;
|
||||||
|
int arg6 ;
|
||||||
|
char *result = 0 ;
|
||||||
|
|
||||||
|
SWIG_check_num_args("CoreSession::getDigits",6,6)
|
||||||
|
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CoreSession::getDigits",1,"CoreSession *");
|
||||||
|
if(!lua_isnumber(L,2)) SWIG_fail_arg("CoreSession::getDigits",2,"int");
|
||||||
|
if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("CoreSession::getDigits",3,"char *");
|
||||||
|
if(!lua_isnumber(L,4)) SWIG_fail_arg("CoreSession::getDigits",4,"int");
|
||||||
|
if(!lua_isnumber(L,5)) SWIG_fail_arg("CoreSession::getDigits",5,"int");
|
||||||
|
if(!lua_isnumber(L,6)) SWIG_fail_arg("CoreSession::getDigits",6,"int");
|
||||||
|
|
||||||
|
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
|
||||||
|
SWIG_fail_ptr("CoreSession_getDigits",1,SWIGTYPE_p_CoreSession);
|
||||||
|
}
|
||||||
|
|
||||||
|
arg2 = (int)lua_tonumber(L, 2);
|
||||||
|
arg3 = (char *)lua_tostring(L, 3);
|
||||||
|
arg4 = (int)lua_tonumber(L, 4);
|
||||||
|
arg5 = (int)lua_tonumber(L, 5);
|
||||||
|
arg6 = (int)lua_tonumber(L, 6);
|
||||||
|
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5,arg6);
|
||||||
|
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_getDigits(lua_State* L) {
|
static int _wrap_CoreSession_getDigits(lua_State* L) {
|
||||||
int argc;
|
int argc;
|
||||||
int argv[6]={
|
int argv[7]={
|
||||||
1,2,3,4,5,6
|
1,2,3,4,5,6,7
|
||||||
};
|
};
|
||||||
|
|
||||||
argc = lua_gettop(L);
|
argc = lua_gettop(L);
|
||||||
@ -5815,11 +5854,51 @@ static int _wrap_CoreSession_getDigits(lua_State* L) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (argc == 6) {
|
||||||
|
int _v;
|
||||||
|
{
|
||||||
|
void *ptr;
|
||||||
|
if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
|
||||||
|
_v = 0;
|
||||||
|
} else {
|
||||||
|
_v = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_v) {
|
||||||
|
{
|
||||||
|
_v = lua_isnumber(L,argv[1]);
|
||||||
|
}
|
||||||
|
if (_v) {
|
||||||
|
{
|
||||||
|
_v = SWIG_lua_isnilstring(L,argv[2]);
|
||||||
|
}
|
||||||
|
if (_v) {
|
||||||
|
{
|
||||||
|
_v = lua_isnumber(L,argv[3]);
|
||||||
|
}
|
||||||
|
if (_v) {
|
||||||
|
{
|
||||||
|
_v = lua_isnumber(L,argv[4]);
|
||||||
|
}
|
||||||
|
if (_v) {
|
||||||
|
{
|
||||||
|
_v = lua_isnumber(L,argv[5]);
|
||||||
|
}
|
||||||
|
if (_v) {
|
||||||
|
return _wrap_CoreSession_getDigits__SWIG_2(L);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'CoreSession_getDigits'\n"
|
SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'CoreSession_getDigits'\n"
|
||||||
" Possible C/C++ prototypes are:\n"
|
" Possible C/C++ prototypes are:\n"
|
||||||
" CoreSession::getDigits(int,char *,int)\n"
|
" CoreSession::getDigits(int,char *,int)\n"
|
||||||
" CoreSession::getDigits(int,char *,int,int)\n");
|
" CoreSession::getDigits(int,char *,int,int)\n"
|
||||||
|
" CoreSession::getDigits(int,char *,int,int,int)\n");
|
||||||
lua_error(L);return 0;
|
lua_error(L);return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,10 +878,16 @@ SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits, char *terminators,
|
|||||||
return getDigits(maxdigits, terminators, timeout, 0);
|
return getDigits(maxdigits, terminators, timeout, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits, char *terminators, int timeout, int interdigit)
|
||||||
|
{
|
||||||
|
return getDigits(maxdigits, terminators, timeout, interdigit, 0);
|
||||||
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
|
SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
|
||||||
char *terminators,
|
char *terminators,
|
||||||
int timeout,
|
int timeout,
|
||||||
int interdigit)
|
int interdigit,
|
||||||
|
int abstimeout)
|
||||||
{
|
{
|
||||||
this_check((char *)"");
|
this_check((char *)"");
|
||||||
sanity_check((char *)"");
|
sanity_check((char *)"");
|
||||||
@ -895,7 +901,7 @@ SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
|
|||||||
maxdigits,
|
maxdigits,
|
||||||
terminators,
|
terminators,
|
||||||
&terminator,
|
&terminator,
|
||||||
(uint32_t) timeout, (uint32_t)interdigit, 0);
|
(uint32_t) timeout, (uint32_t)interdigit, (uint32_t)abstimeout);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "getDigits dtmf_buf: %s\n", dtmf_buf);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "getDigits dtmf_buf: %s\n", dtmf_buf);
|
||||||
end_allow_threads();
|
end_allow_threads();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user