[asterisk-users] Playfile to both legs of call

Jim Dickenson dickenson at cfmc.com
Wed Jan 21 12:29:12 CST 2009


Is there any way that I can use AMI to play a sound file to both legs of a
call without either issuing two commands, one per leg, or setting up meeting
rooms?

I would like to be able to play a sound file that can be heard by the caller
and the person called using AMI.

The only way so far I have been able to do this is the following. One
problem with this is that people will hear sound out of sync from each other
as there is going to be some delay in getting each of these actions going.
Another problem is this seems like a hard way to solve the problem.

exten => 1321,1,Answer()
exten => 1321,n,NoOp(Just got '${ActionID}')
exten => 1321,n,Wait(3)
exten => 1321,n,Background(${WhatToPlay)
exten => 1321,n,Hangup()

exten => 1324,1,Answer()
exten => 1324,n,NoOp(Just got '${ActionID}')
exten => 1324,n,ChanSpy(${WhoHear},qW)
exten => 1324,n,Hangup()


And this action:

Action: Originate
Channel: Local/1321
Exten: 1324
Context: some-context
Priority: 1
Variable: ActionID=callE1324
Variable: WhoHear=Agent/1001
Variable: WhatToPlay=dont-know-who-sent
ActionID: callE1324
Async: true

Action: Originate
Channel: Local/1321
Exten: 1324
Context: some-context
Priority: 1
Variable: ActionID=callE1324
Variable: WhoHear=Other-channel
Variable: WhatToPlay=dont-know-who-sent
ActionID: callE1324
Async: true

-- 
Jim Dickenson
mailto:dickenson at cfmc.com

CfMC
http://www.cfmc.com/






More information about the asterisk-users mailing list