> On Tue, 30 Mar 2010, Pham Quy wrote: > >> Is there anyway to catch DTMF keypress while a music file is playing >> without stop the music?
On Mon, 29 Mar 2010, Steve Edwards wrote: > Have you tried externivr(). I've never used it, but it looks > interesting. I hate it when people post about things they know nothing about... So I wrote My First ExternalIVR (mfe.c). I'm a 1.2 Luddite, so things may be a bit different for the Asterisk version you are using. Comparing the documentation, it looks like a lot of useful commands have been added. The first question I had was "Where do you put the executable?" The documentation is silent on this point. ASTAGIDIR seemed a likely guess. Guess not. It looks like it has to be an absolute path. Inconvenient, but it works. The actual protocol is trivial, way "simpler" and limited than AGI. Here's a snippet that shows how to play a file and then "handle" the key press events. // play a file printf("S,demo-congrats\n"); fflush(stdout); // read events while (NULL != fgets(event, sizeof(event), stdin)) { syslog(LOG_ERR, event); if ('#' == *event) { break; } } (The full source is at http://www.sedwards.com/mfe.c) -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users