is there a simple way to play a sound file in a conference room via the Manager API? I don’t mean background music but a short message on a certain (external) event.
I haven’t found anything suitable in the documentation/forum.
Asterisk verion is 1.2.5.
while my problem was different in nature (transferring the call to a conference room first so that sound could be played), the essential step was having the sound system originate a call to the conference room. This could be achieved via manager call or via placing a .call file - in my case the source is outside asterisk (a button on a web page) so the manager functions were more appropriate
I don’t get this working. With
Channel: local/MEETME@default
how can MEETME be the actual conference room? I think it needs to be an extension.
So what I have is an extensions.conf like
[local]
include => soundtest
[soundtest]
exten => 25,1,meetme(1)
and a Manager Originate Action with
channel=“Local/25@soundtest/n"
application=“MP3Player"
data=”/directory/mysound.mp3”
For testing I call the 25 and get into conference room 1. Then I fire the Manager Originate Action (via Asterisk-Java).
As a result I hear that somebody enters the conference room but I do not hear the sound file. Meanwhile I see at the console output that totally different extensions are searched. I guess this has got something to do with the OriginateAction having both a caller and a callee but I don’t really understand it. Adding context=demo, extension=25 and priority=1 to the Originate Action does not help.
Musicman, did you use Asterisk-Java too?
Console output:
== Manager 'dialer' logged on from 212.202.157.193
-- Executing MeetMe("Local/25@soundtest-5ea4,2", "1") in new stack
> Channel Local/25@soundtest-5ea4,1 was answered.
> Launching MP3Player(/root/asterisk/asterisk-1.2.1/sounds/fpm-sunshine.mp3) on Local/25@soundtest-5ea4,1
== Starting Local/25@soundtest-5ea4,1 at soundtest,555,1 failed so falling back to exten 's'
-- Executing MeetMe("Local/25@soundtest-5ea4,1", "1") in new stack
== Spawn extension (soundtest, 444, 0) exited non-zero on 'Local/25@soundtest-5ea4,2'
Oct 5 14:18:00 WARNING[1034]: pbx.c:2347 __ast_pbx_run: Channel 'Local/25@soundtest-5ea4,2' sent into invalid extension '444' in context 'soundtest', but no invalid handler
== Spawn extension (soundtest, 444, 0) exited non-zero on 'Local/25@soundtest-5ea4,1'
Oct 5 14:18:00 WARNING[1039]: pbx.c:2347 __ast_pbx_run: Channel 'Local/25@soundtest-5ea4,1' sent into invalid extension '444' in context 'soundtest', but no invalid handler
I was using the perl stuff instead.
Basic flow of actions:
login to manager, request status
loop through results and find an external call to your extension (i.e technology of the other leg is zap, isdn or whatever you are using)
Next, find a free meetme room from the status data and issue a redirect, channel and extrachannel are the two legs of the call, and exten is the new meetme room
final step is originating a call to mp3 player
I finally got it going.
The configuration given above is fine, the Manager Originate Action does the trick. The problems were due to application specific errors.