[Asterisk-Users] Record call from switch using service observe? (execute command after dial?)

Adam Goryachev mailinglists at websitemanagers.com.au
Thu Jun 24 16:50:38 MST 2004


Use the call file, and set the channel to something like:

Zap/1/160w<extension>

then set the extension/context/etc to point to something like this:
exten => 100,1,playback("Now call will be recorded")
exten => 100,2,Record("some file")
exten => 100,3,playback("beep")

Now, to stop recording you have two choices, either record to the end of
the call, or else use the manager interface to signal a soft hangup. 

Actually, better is to use the manager interface to transfer the x100P
to another extension like this:
exten => 101,1,playback("Call no longer being recorded")
exten => 101,2,StopRecord
exten => 101,3,playback("beep")
exten => 101,4,softhangup

Check the proper applications for stoprecording and softhangup....

Regards,
Adam

On Fri, 2004-06-25 at 04:54, Garry Adkins wrote:
> Hi,
>  
> I am working on a project to record agent calls when completing specific
> transactions with customers.
>  
> Since these calls do not go through the asterisk box (They go through a
> lucent G3), we're thinking that service observe would be the easiest way to
> accomplish our goal.
>  
> Here's what I need:
> On demand, I need to be able to attach to the switch, dial the service
> observe code, make an announcement, record.
> On the second event, I need to make an announcement, stop the recording, and
> hang-up the channel to the switch.
>  
> 
> Here's my plan:
>  
> 1)  Agent software calls a CGI on the asterisk box.  This passes extension
> the agent is talking on.
> 2)  CGI program somehow makes asterisk call to the switch, dials
> 160w<extension> which does a service observe (i.e. attaches the <extension>
> audio to our channel)
> 3)  Asterisk play recording about transaction being recorded
> 4)  Start recording
> 5)  Software calls CGI again to notify asterisk to stop the recording.
> 6)  Asterisk plays recording that the transaction is recorded
> 7)  Asterisk disconnects channel.
>  
> 
> Eventually I will have a T1 interface into the switch, but for testing I'm
> just using the X100P and an analog port on the switch.
>  
> The two communicate properly, I can call the asterisk box and have it
> answer, and I can generate a call to the switch from a different extension
> on the Asterisk box.
>  
> Here's my attempted solutions:
>  
> 1) When I try to generate the call from a SIP phone, it works fine.  The
> extensions.conf contains a dial(zap/1/160w<extension>)
>  
> 
> 2) When I try to generate the call from the manager interface, I cannot do
> it without having a different input.  
> action: originate
> channel: zap/1
> exten: 555
> context: default
> priority: 1
>  
> Extension 555 does a dial(zap/1/160w<extension>)
>  
> Three problems:
>    a) The problem is I have no other channels but the ZAP channel for the
> X100p.  I can't connect both ends to the same channel.
>    b) Also, I cannot send audio to this channel from the manager channel
> (for the announcement of the recording)
>    c)  Dial doesn't exit until hang-up, so I cannot background() the audio
> to the channel.
>  
> 
> 
> 
> 
> 3)  When I try to dial by generating a call file in the proper outbound call
> directory, I still get stuck on the dial command.
>  
> 
> Any ideas?  Am I just not understanding something critical?
>  
> 
> Thanks for any help!  I've search the archives and the WIKI for about 3
> days.  I'm stumped!
>  
> -G
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
 -- 
Adam Goryachev
Website Managers
Ph:  +61 2 9345 4395                        adam at websitemanagers.com.au
Fax: +61 2 9345 4396                        www.websitemanagers.com.au




More information about the asterisk-users mailing list