Hi Joshua, thanks, it work perfectly. One more question, what is the best method to play audio and get the DTMF?
I’m using dtmf[1] = '\0'; dtmf[0] = cmd = ast_play_and_wait(chan, audio); best regards > On 28 Jan 2020, at 09:49, Joshua C. Colp <[email protected]> wrote: > > On Tue, Jan 28, 2020 at 8:43 AM [email protected] > <mailto:[email protected]> <[email protected] > <mailto:[email protected]>> wrote: > Hello, > > I’m learning about Asterisk code, and to try developer a new application, in > this application I nee to execute sounds, I’m using > ast_play_and_wait(chan,audio), but this function, as the name suppose, play > the and wait to user press any digits. > > Have another function to only execute the audio? or set a timeout on > ast_play_and_wait()? > > You would use ast_streamfile, ast_waitstream, and ast_stopstream. If you need > an example of usage you can look at the implementation of the Playback > dialplan application[1]. > > [1] https://github.com/asterisk/asterisk/blob/master/apps/app_playback.c#L490 > <https://github.com/asterisk/asterisk/blob/master/apps/app_playback.c#L490> > > -- > Joshua C. Colp > Asterisk Technical Lead > Sangoma Technologies > Check us out at www.sangoma.com <http://www.sangoma.com/> and > www.asterisk.org <http://www.asterisk.org/> > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-dev mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-dev
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
