aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authormatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-02-23 06:00:11 +0000
committermatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-02-23 06:00:11 +0000
commitb6be24372a79c5fe8568a831bab188db9ea98e8c (patch)
treee05618b650b51c146c697c794e3e510343de7230 /app.c
parentacda464eb483efb6dd4a07ab867ae3eb30699d33 (diff)
Sun Feb 23 07:00:00 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@621 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rwxr-xr-xapp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/app.c b/app.c
index 482c2ee3a..2a8c12ef9 100755
--- a/app.c
+++ b/app.c
@@ -34,6 +34,7 @@
int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout)
{
int res,to,fto;
+ /* XXX Merge with full version? XXX */
if (prompt) {
res = ast_streamfile(c, prompt, c->language);
if (res < 0)
@@ -47,6 +48,23 @@ int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, in
return res;
}
+
+int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd)
+{
+ int res,to,fto;
+ if (prompt) {
+ res = ast_streamfile(c, prompt, c->language);
+ if (res < 0)
+ return res;
+ }
+ fto = 6000;
+ to = 2000;
+ if (timeout > 0) fto = to = timeout;
+ if (timeout < 0) fto = to = 1000000000;
+ res = ast_readstring_full(c, s, maxlen, to, fto, "#", audiofd, ctrlfd);
+ return res;
+}
+
int ast_app_getvoice(struct ast_channel *c, char *dest, char *dstfmt, char *prompt, int silence, int maxsec)
{
int res;