mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Sun Feb 23 07:00:00 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
18
app.c
18
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;
|
||||
|
Reference in New Issue
Block a user