Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-19 Thread ISABEL ORDAS ARNAL
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],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 
Subject: Re: [asterisk-users] Play audio file for both Caller and
    Callee in   a call
To: Asterisk Users Mailing List - Non-Commercial Discussion

Message-ID: <92e76a79-3929-4978-82f2-ee8c1db50...@cfmc.com>
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:dicken...@cfmc.com

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

Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread Jim Dickenson
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:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Dec 15, 2011, at 10:27 PM, virendra bhati wrote:

> Hi,
> 
> Plese give a little example of script so that it will be clear.
> 
> On Thu, Dec 15, 2011 at 11:09 PM, Jim Dickenson  wrote:
> You also use AMI to inject audio into the conversation using the ChanSpy 
> application.
> -- 
> Jim Dickenson
> mailto:dicken...@cfmc.com
> 
> CfMC
> http://www.cfmc.com/
> 
> 
> 
> On Dec 15, 2011, at 9:23 AM, Danny Nicholas wrote:
> 
>> You can’t per se, but you can call an AGI using stream?
>>  
>> From: asterisk-users-boun...@lists.digium.com 
>> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of 
>> c.savinov...@itntelecom.com
>> Sent: Thursday, December 15, 2011 11:22 AM
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> Subject: Re: [asterisk-users] Play audio file for both Caller and Callee in 
>> a call
>>  
>> Dear Danny:
>>  
>>     How can you use Playback in the middle of 2 channels engaged in a 
>> conversation?
>>  
>> Thanks
>> C. Savinovich
>>  
>>  Original Message 
>> Subject: Re: [asterisk-users] Play audio file for both Caller and
>> Callee in a call
>> From: "Danny Nicholas" 
>> Date: Thu, December 15, 2011 9:31 am
>> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
>> 
>> 
>> Playback?  What flavor of Asterisk are you using?
>>  
>> From: asterisk-users-boun...@lists.digium.com 
>> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of ISABEL ORDAS 
>> ARNAL
>> Sent: Thursday, December 15, 2011 10:29 AM
>> To: asterisk-users@lists.digium.com
>> Subject: [asterisk-users] Play audio file for both Caller and Callee in a 
>> call
>>  
>> Dear all,
>> Anyone of you knows how to play an audio file at the beginning of a call for 
>> both Caller and Callee?
>> A(x) of Dial application only plays audio for callee. I don’t want to use 
>> MeetMe because I want to use Monitor and MixMonitor.
>>  
>> Thank you!
>>  
>> 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
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>   http://

Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread virendra bhati
Hi,

Plese give a little example of script so that it will be clear.

On Thu, Dec 15, 2011 at 11:09 PM, Jim Dickenson  wrote:

> You also use AMI to inject audio into the conversation using the ChanSpy
> application.
> --
> Jim Dickenson
> mailto:dicken...@cfmc.com 
>
> CfMC
> http://www.cfmc.com/
>
>
>
> On Dec 15, 2011, at 9:23 AM, Danny Nicholas wrote:
>
> You can’t per se, but you can call an AGI using stream?
> ** **
> *From:* asterisk-users-boun...@lists.digium.com [mailto:
> asterisk-users-boun...@lists.digium.com] *On Behalf Of *
> c.savinov...@itntelecom.com
> *Sent:* Thursday, December 15, 2011 11:22 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] Play audio file for both Caller and
> Callee in a call
> ** **
> Dear Danny:
> ** **
> How can you use Playback in the middle of 2 channels engaged in a
> conversation?
> ** **
> Thanks****
> C. Savinovich
> ** **
>
> -------- Original Message 
> Subject: Re: [asterisk-users] Play audio file for both Caller and
> Callee in a call
> From: "Danny Nicholas" 
> Date: Thu, December 15, 2011 9:31 am
> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
> 
> Playback?  What flavor of Asterisk are you using?
>  
> *From:* 
> *asterisk-users-boun...@lists.digium.com*
>  
> [*mailto:asterisk-users-boun...@lists.digium.com*
> ] *On Behalf Of *ISABEL ORDAS ARNAL
> *Sent:* Thursday, December 15, 2011 10:29 AM
> *To:* *asterisk-users@lists.digium.com* 
> *Subject:* [asterisk-users] Play audio file for both Caller and Callee in
> a call
>  
> Dear all,
> Anyone of you knows how to play an audio file at the beginning of a call
> for both Caller and Callee?
> A(x) of Dial application only plays audio for callee. I don’t want to use
> MeetMe because I want to use Monitor and MixMonitor.
>  
> Thank you!
>  
> --
> 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*<http://www.tid.es/ES/PAGINAS/disclaimer.aspx>
> 
> --
> --
> _
> -- Bandwidth and Colocation Provided by 
> *http://www.api-digital.com*<http://www.api-digital.com>
>  --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> *http://www.asterisk.org/hello* <http://www.asterisk.org/hello>
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> *http://lists.digium.com/mailman/listinfo/asterisk-users*<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
>
>
>
> --
> _
> -- 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
>



-- 

Thanks and regards

 Virendra Bhati
+91-8885268942
Software Engineer
--
_
-- 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

Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread Jim Dickenson
You also use AMI to inject audio into the conversation using the ChanSpy 
application.
-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Dec 15, 2011, at 9:23 AM, Danny Nicholas wrote:

> You can’t per se, but you can call an AGI using stream?
>  
> From: asterisk-users-boun...@lists.digium.com 
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of 
> c.savinov...@itntelecom.com
> Sent: Thursday, December 15, 2011 11:22 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Play audio file for both Caller and Callee in a 
> call
>  
> Dear Danny:
>  
> How can you use Playback in the middle of 2 channels engaged in a 
> conversation?
>  
> Thanks
> C. Savinovich
>  
> ---- Original Message ----
> Subject: Re: [asterisk-users] Play audio file for both Caller and
> Callee in a call
> From: "Danny Nicholas" 
> Date: Thu, December 15, 2011 9:31 am
> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
> 
> 
> Playback?  What flavor of Asterisk are you using?
>  
> From: asterisk-users-boun...@lists.digium.com 
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of ISABEL ORDAS 
> ARNAL
> Sent: Thursday, December 15, 2011 10:29 AM
> To: asterisk-users@lists.digium.com
> Subject: [asterisk-users] Play audio file for both Caller and Callee in a call
>  
> Dear all,
> Anyone of you knows how to play an audio file at the beginning of a call for 
> both Caller and Callee?
> A(x) of Dial application only plays audio for callee. I don’t want to use 
> MeetMe because I want to use Monitor and MixMonitor.
>  
> Thank you!
>  
> 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
> --
> _
> -- 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

Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread Danny Nicholas
You can’t per se, but you can call an AGI using stream?

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of 
c.savinov...@itntelecom.com
Sent: Thursday, December 15, 2011 11:22 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Play audio file for both Caller and Callee in a 
call

 

Dear Danny:

 

How can you use Playback in the middle of 2 channels engaged in a 
conversation?

 

Thanks

C. Savinovich

 

 Original Message 
Subject: Re: [asterisk-users] Play audio file for both Caller and
Callee in a call
From: "Danny Nicholas" < <mailto:da...@debsinc.com> da...@debsinc.com>
Date: Thu, December 15, 2011 9:31 am
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
< <mailto:asterisk-users@lists.digium.com> asterisk-users@lists.digium.com>

Playback?  What flavor of Asterisk are you using?

 

From:  <mailto:asterisk-users-boun...@lists.digium.com> 
asterisk-users-boun...@lists.digium.com [ 
<mailto:asterisk-users-boun...@lists.digium.com> 
mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of ISABEL ORDAS ARNAL
Sent: Thursday, December 15, 2011 10:29 AM
To:  <mailto:asterisk-users@lists.digium.com> asterisk-users@lists.digium.com
Subject: [asterisk-users] Play audio file for both Caller and Callee in a call

 

Dear all, 

Anyone of you knows how to play an audio file at the beginning of a call for 
both Caller and Callee?

A(x) of Dial application only plays audio for callee. I don’t want to use 
MeetMe because I want to use Monitor and MixMonitor. 

 

Thank you!

 


  _  


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> 
http://www.tid.es/ES/PAGINAS/disclaimer.aspx


  _  


--
_
-- Bandwidth and Colocation Provided by  <http://www.api-digital.com> 
http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
 <http://www.asterisk.org/hello> http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
 <http://lists.digium.com/mailman/listinfo/asterisk-users> 
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

Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread c.savinovich
Dear Danny:    How can you use Playback in the middle of 2 channels engaged in a conversation?ThanksC. Savinovich


 Original Message 
Subject: Re: [asterisk-users] Play audio file for both Caller and
Callee in a	call
From: "Danny Nicholas" <da...@debsinc.com>
Date: Thu, December 15, 2011 9:31 am
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
<asterisk-users@lists.digium.com>

 Playback?  What flavor of Asterisk are you using? From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of ISABEL ORDAS ARNALSent: Thursday, December 15, 2011 10:29 AMTo: asterisk-users@lists.digium.comSubject: [asterisk-users] Play audio file for both Caller and Callee in a call Dear all, Anyone of you knows how to play an audio file at the beginning of a call for both Caller and Callee?A(x) of Dial application only plays audio for callee. I don’t want to use MeetMe because I want to use Monitor and MixMonitor.  Thank you! 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



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

Re: [asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread Danny Nicholas
Playback?  What flavor of Asterisk are you using?

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of ISABEL ORDAS
ARNAL
Sent: Thursday, December 15, 2011 10:29 AM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] Play audio file for both Caller and Callee in a
call

 

Dear all, 

Anyone of you knows how to play an audio file at the beginning of a call for
both Caller and Callee?

A(x) of Dial application only plays audio for callee. I don’t want to use
MeetMe because I want to use Monitor and MixMonitor. 

 

Thank you!

 

  _  

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

[asterisk-users] Play audio file for both Caller and Callee in a call

2011-12-15 Thread ISABEL ORDAS ARNAL
Dear all,
Anyone of you knows how to play an audio file at the beginning of a call for 
both Caller and Callee?
A(x) of Dial application only plays audio for callee. I don't want to use 
MeetMe because I want to use Monitor and MixMonitor.

Thank you!


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