Index: app.c =================================================================== RCS file: /usr/cvsroot/asterisk/app.c,v retrieving revision 1.3 diff -u -r1.3 app.c --- app.c 26 Mar 2003 00:16:00 -0000 1.3 +++ app.c 4 Jun 2003 18:42:45 -0000 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -40,8 +41,9 @@ if (res < 0) return res; } - fto = 6000; - to = 2000; + fto = c->pbx->rtimeout * 1000; + to = c->pbx->dtimeout * 1000; + if (timeout > 0) fto = to = timeout; if (timeout < 0) fto = to = 1000000000; res = ast_readstring(c, s, maxlen, to, fto, "#"); Index: pbx.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx.c,v retrieving revision 1.16 diff -u -r1.16 pbx.c --- pbx.c 23 Apr 2003 19:13:35 -0000 1.16 +++ pbx.c 4 Jun 2003 18:42:46 -0000 @@ -50,11 +50,6 @@ struct ast_context; -struct ast_pbx { - int dtimeout; /* Timeout between digits (seconds) */ - int rtimeout; /* Timeout for response (seconds) */ -}; - /* An extension */ struct ast_exten { char exten[AST_MAX_EXTENSION]; Index: include/asterisk/pbx.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/pbx.h,v retrieving revision 1.3 diff -u -r1.3 pbx.h --- include/asterisk/pbx.h 6 Apr 2003 18:19:51 -0000 1.3 +++ include/asterisk/pbx.h 4 Jun 2003 18:42:49 -0000 @@ -68,6 +68,13 @@ int (*matchmore)(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data); }; +struct ast_pbx { + int dtimeout; /* Timeout between digits (seconds) */ + int rtimeout; /* Timeout for response + (seconds) */ +}; + + //! Register an alternative switch /*! * \param sw switch to register