[asterisk-users] play a sound file directly to a caller channel

Daniel Knoll daniel at danielknoll.de
Mon May 17 09:38:44 CDT 2010


Hi Jim,
First i'm a little bit confused, because your code was a little bit difficult to read, but now i understand.
it works fine in my Setup, Big Thanks for your help.

bye 
Daniel


Am 16.05.2010 um 16:11 schrieb Jim Dickenson:

> We do the following:
> 
> Action: Originate
> Channel: Local/do_playback at 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:dickenson at cfmc.com
> 
> CfMC
> http://www.cfmc.com/
> 
> 
> 
> On May 16, 2010, at 4:16 AM, Daniel Knoll wrote:
> 
>> Hello User-List,
>> is it possible to play a sound file directly to a caller channel? 
>> 
>> Like this AMI command
>> 
>> Action: Originate
>> Channel: SIP/20-00001d41
>> Application: Playback
>> Data: /path/to/audio/file
>> 
>> I get an Error Message. My intension is to play a sound file to a caller and the other callers don't hear this.
>> Can someone help me ?
>> 
>> Thanks a lot 
>> Bye Daniel
>> 
>> 
>> 
>> 
>> -- 
>> _____________________________________________________________________
>> -- 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

Daniel Knoll

Liberdastr. 9 
12047 Berlin

fon +49 (0)179 20 16 50 8
mail daniel at danielknoll.de
web www.danielknoll.de





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100517/a3f24d3e/attachment.htm 


More information about the asterisk-users mailing list