문제

i am setting up a DISA in asterisk . what i would like to do is play a music to the caller while asterisk is receiving the DTMF. the DTMF would stop playing when it receives DTMF for "#"

i have tried using background() and playback() command , but they do not serve the purpose!

any ideas?

khan

도움이 되었습니까?

해결책

You can try using phpagi. There is a function called fastpass_get_data, where you can get dtmf input while playing a sound.

http://phpagi.sourceforge.net/phpagi22/api-docs/phpAGI/AGI.html#fastpass_get_data

다른 팁

I'm assuming just using the builtin DISA application doesn't meet your needs. If it does, just use that.

There are different ways to program asterisk. You can use normal dialplan, ael dialplan, AGI, AMI, even write your own modules in C.

You can do more things in dialplan, but often using a real language through AGI results in more readable code.

Using the dialplan applications StartMusicOnHold, StopMusicOnHold, and either Read or WaitExten, you should be able to do what you want. Run asterisk -rx 'core show application StartMusicOnHold', etc, to read about each of those.

You basically want to run StartMusicOnHold, then gather digits using Read or WaitExten until you're done (perhaps collecting them into a channel variable), then run StopMusicOnHold.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top