Hi all,
I made it easier, AMI was not required, it can be solved directly in the
dialplan:
same => n,Dial(SIP/${TRUNK}/${ARG2}${NUM},60,M(inject^${CALLERNUMBER}))
[macro-inject]
same => s,1,Originate(Local/trunk@injectWarning,app,Playback,Message-Callee)
same => n,Originate(Local/${ARG1}@injectWarning,app,Playback,Message-Caller)
[injectWarning]
exten => _+34[69]XXXXXXXX,1,Answer()
same => n, ChanSpy(SIP/${EXTEN},qw)
same => n, Hangup()
exten =>trunk,1,Answer()
same => n, ChanSpy(SIP/${TRUNK},qw)
same => n, Hangup()
Thank you all!
====================================================================
Date: Thu, 15 Dec 2011 23:56:15 -0800
From: Jim Dickenson <[email protected]>
Subject: Re: [asterisk-users] Play audio file for both Caller and
Callee in a call
To: Asterisk Users Mailing List - Non-Commercial Discussion
<[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"
Use an AMI packet like this:
Action: Originate
Channel: Local/do_playback@cfmc_cdi_private
Exten: do_chanspy
Context: cfmc_cdi_private
Priority: 1
Variable: CfMC_ActionID=PlayBack
Variable: CfMC_WhatToPlay=lyrics-louie-louie
Variable: CfMC_WhoHear=SIP/GXP280
ActionID: PlayBack
Async: true
With dialplan like this:
exten => do_playback,1,Answer()
exten => do_playback,n,UserEvent(BeforePlayBack,ActionID:${CfMC_ActionID} &
${UNIQUEID} & ${CHANNEL} & ${CfMC_WhatToPlay} & ${CfMC_WhoHear}) exten =>
do_playback,n,Wait(0.3) exten => do_playback,n,Playback(${CfMC_WhatToPlay})
; PLAYBACKSTATUS - SUCCESS FAILED
exten => do_playback,n,UserEvent(AfterPlayBack,ActionID:${CfMC_ActionID} &
${UNIQUEID} & ${CHANNEL} & ${CfMC_WhatToPlay} & ${CfMC_WhoHear} &
${PLAYBACKSTATUS}) exten => do_playback,n,Hangup()
exten => do_chanspy,1,Answer()
exten => do_chanspy,n,UserEvent(BeforeChanSpy,ActionID:${CfMC_ActionID} &
${UNIQUEID} & ${CHANNEL} & ${CfMC_WhatToPlay} & ${CfMC_WhoHear}) exten =>
do_chanspy,n,ChanSpy(${CfMC_WhoHear},qW)
exten => do_chanspy,n,UserEvent(AfterChanSpy,ActionID:${CfMC_ActionID} &
${UNIQUEID} & ${CHANNEL} & ${CfMC_WhatToPlay} & ${CfMC_WhoHear}) exten =>
do_chanspy,n,Hangup()
You need to issue an AMI packet for each leg of the call. Each leg will hear
the same audio feed offset by however long it takes the packets to be
processed. In general this is a few milliseconds and should not be a big deal.
--
Jim Dickenson
mailto:[email protected]
CfMC
http://www.cfmc.com/
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
nuestra política de envío y recepción de correo electrónico en el enlace
situado más abajo.
This message is intended exclusively for its addressee. We only send and
receive email on the basis of the terms set out at.
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
--
_____________________________________________________________________
-- 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