Your ami packet is not setting the w option for chanspy, nor I am sure you can 
do this.

You might want to create an additional exten that takes a variable from your 
ami packet and does the chanspy that way.

I use an ami packet like this with extension that do the work.

Action: Originate
Channel: Local/do_playb...@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_18-00000002
ActionID: PlayBack
Async: true


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()


-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Aug 9, 2010, at 5:19 PM, Gabriel Ortiz Lour wrote:

> Hi all,
> 
>   How can I playback a file within an active call?
> 
> I've tried with ChanSpy whisper mode like this (using AMI):
> 
> Action: Originate
> Channel: Local/9...@default
> Priority: 0
> Variable: MSG=test
> Application: ChanSpy
> Data: SIP/1234-123
> Async: 1
> 
> and  in the dialplan:
> 
> [default]
> exten => 9999,1,Answer()
> exten => 9999,n,Wait(2)
> exten => 9999,n,Playback(${MSG})
> 
>   Where SIP/1234-123 is the up bridged channel.
> 
> But this is not working (it seams that will work on the rolling CLI, but no 
> sound at all)
> 
> Is there a better way to do it?
> -- 
> _____________________________________________________________________
> -- 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

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

Reply via email to