Allover
Allover

Reputation: 127

Asterisk playback sound file into ConfBridge?

I'm trying to make a conference and play a sound file in the background of the conference. How can I make this possible?

this obviously wouldn't work because the sound file will be played before entering the conference.

exten => s,1,playback(some/soundfile)
same => n,confbridge(1)

Thanks in advance!

Upvotes: 3

Views: 6771

Answers (4)

F. Hauri  - Give Up GitHub
F. Hauri - Give Up GitHub

Reputation: 70822

Same answers, but for many confBridge:

In extension.conf:

[autobridge]
exten => _X.,1,ConfBridge(${EXTEN})
  • Then, like tgwaste's answer, you could initiate message into conference room 1234, by using originate:

    originate local/1234@autobridge application Playback en_US/tt-monkeys
    

    from console or a manager connection,

  • Or as arheops's answer suggest, by adding a file in outgoing spool dir:

    printf "Channel: Local/%d@autobridge\nApplication: %s\nData: %s\n" \
        1234 Playback sound/file >/var/spool/asterisk/outgoing/f-$RANDOM
    

    from anything at filesystem level ( with correct permissions, could be shared! :-).

Upvotes: 0

tgwaste
tgwaste

Reputation: 439

Wanted to add my solution here in case anyone ever needs it.

first make a context for the conf bridge in extensions.conf:

[conf-msg]
exten => s,1,ConfBridge(01)

where 01 is the bridge number

Then via the command line you can do:

asterisk -x 'channel originate local/s@conf-msg application Playback file'

Its really as simple as that.

Upvotes: 3

arheops
arheops

Reputation: 15259

You have create new call,simple method using call files.

http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out

After that you have place one of call legs to your conference like this

Channel: Local/1111@conference
Application: Playback
Data: some/soundfile

Where conference is context to get to ur conference room. No need do spy or somethign like that,that is wast of time/cpu

Upvotes: 2

Mbrevda
Mbrevda

Reputation: 3080

See here for a similar question: Asterisk- How to 'whisper' music using ChanSpy(), or any alternative?

Basically, you want to add a participant that points to a local channel (as above, only enter the channel instead of spying), play your sounds, then hangup.

Upvotes: 0

Related Questions