[asterisk-users] [asterisk-dev] How to play audio file in background in dialplan?

Danny Nicholas danny at debsinc.com
Fri Feb 3 10:35:39 CST 2012


Assuming your longtime task is in an AGI, you could do this:
<AGI>
Print STDOUT "SET MUSIC ON HOLD DEFAULT\n"
.. agi logic ..
.. end of agi logic ..
Print STDOUT "SET MUSIC ON HOLD OFF\n"


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Yaroslav
Panych
Sent: Friday, February 03, 2012 10:30 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] [asterisk-dev] How to play audio file in
background in dialplan?

Hi

I have a task. While serving incoming call I should do some longtime
task(consumes more than few tens of seconds). So I decided to turn on
background music in order to entertain caller. `core show applications`
showed me 3 potential candidates: Background, Playback and StartMusicOnHold.
Unfortunately, all of them does not meet my
requirements:
1. Background and Playback block execution of dialplan.
2. StartMusicOnHold I cannot say which file it should play. Only class,
which is inpossible for me because of file to play is of dynamically
generated content with runtime obtained name, and I cannot predict and
configure all possible pairs of file-name/class-name.(And don't want to use
realtime to link class-name and file-name on fly).
Any ideas?



regards, Yaroslav

--
_____________________________________________________________________
-- 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




More information about the asterisk-users mailing list