[asterisk-dev] Simplify ast_stream_and_wait call

Andrey S. Pankov casper at casper.org.ua
Sun May 7 12:22:49 MST 2006


Hi,

Currently ast_stream_and_wait takes four args. Can it be
simplified to take only three of them?

-ast_stream_and_wait(chan, "beep", chan->language, "")
+ast_stream_and_wait(chan, "beep", "")

The only question why we use another language in the line below:

res/res_features.c:603: if (ast_stream_and_wait(transferer, xferfailsound, transferee->language, AST_DIGIT_ANY) < 0 ) {
res/res_features.c:1648:                                error = ast_stream_and_wait(peer, courtesytone, chan->language, "");

The same applies to ast_streamfile as well:

app_playback.c new say module
apps/app_meetme.c:1097:                 if (!ast_streamfile(conf->chan, user->namerecloc, chan->language))
apps/app_meetme.c:1099:                 if (!ast_streamfile(conf->chan, "conf-hasjoin", chan->language))
apps/app_meetme.c:1656:                         if (!ast_streamfile(conf->chan, user->namerecloc, chan->language))
apps/app_meetme.c:1658:                         if (!ast_streamfile(conf->chan, "conf-hasleft", chan->language)
res/res_features.c:1651:                                                !ast_streamfile(peer, courtesytone, chan->language))
say.c old module
pbx.c:5218:                     if ( (res = ast_streamfile(chan, front, args.lang)) ) {
      pbx_builtin_background()

For the old/new say modules and pbx_builtin_background() there may be a full version, e.g.
ast_streamfile_full.

Any ideas?

Regards,
casper.



More information about the asterisk-dev mailing list