Playing A Sound File During A Call

Home » Asterisk Users » Playing A Sound File During A Call
Asterisk Users 8 Comments

I have a customer who would like to play a series of sound files during a phone call on demand. There would be several played in order during a call. Any simple ideas on doing that without developing a whole web app to do it via AMI?

8 thoughts on - Playing A Sound File During A Call

  • I think features.conf has what you want under the [applicationmap]
    setting. They even have an example that would be almost exactly like what you want. From the example:

    ;testfeature => #9,peer,Playback,tt-monkeys ;Allow both the caller and callee to play
    ; ;tt-monkeys to the opposite channel

    Kevin Larsen – Systems Analyst – Pioneer Balloon – Ph: 316-688-8208

    From: Carlos Alvarez
    To: Asterisk Users Mailing List – Non-Commercial Discussion
    , Date: 05/02/2013 04:53 PM
    Subject: [asterisk-users] Playing a sound file during a call Sent by: asterisk-users-bounces@lists.digium.com

    I have a customer who would like to play a series of sound files during a phone call on demand. There would be several played in order during a call. Any simple ideas on doing that without developing a whole web app to do it via AMI?

  • Unfortunately that only plays the file to one side according to the examples, so there’s no way for the other person to know when it’s done. The caller on the Asterisk server would start the playback, and would need to know when it’s done.

  • Add MOH_Class onto the example and the idle channel will hear music on hold until the playback is complete on the other channel.

    Kevin Larsen – Systems Analyst – Pioneer Balloon – Ph: 316-688-8208

    From: Carlos Alvarez
    To: Asterisk Users Mailing List – Non-Commercial Discussion
    , Date: 05/02/2013 05:02 PM
    Subject: Re: [asterisk-users] Playing a sound file during a call Sent by: asterisk-users-bounces@lists.digium.com

    Unfortunately that only plays the file to one side according to the examples, so there’s no way for the other person to know when it’s done. The caller on the Asterisk server would start the playback, and would need to know when it’s done.

    setting. want.

  • Good point, and that should be usable for the customer.

    However I’m finding that I can only have about 25 files available to play, and they need 30. Still trying to figure out why that would be, seems like the set command can’t parse all 30 possible feature names.

  • In case anyone else sees this discussion in the future, the Set(__DYNAMIC_FEATURES) line can’t be over a certain length or it stops parsing anything after that.

    Thanks for the tips, Kevin.

  • You can also put dynamic feature group names into the DYNAMIC_FEATURES list.

    Richard

  • ——=_Part_842_20816624.1367541755443
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 7bit

    —– Original Message —

  • I expected that to have the same limitation, but it doesn’t. Works fine, thanks!