[Asterisk-Users] Monitor and AGI - doesn't record much!
mattf
mattf at vicimarketing.com
Mon Sep 13 05:03:40 MST 2004
Have you tried initiating a monitor command from within the AGI after the
DIAL action?
When you place a call from AGI to connect a SIP phone to a local extension
like that, it DOES treat it as a separate call until the Zap channel is
connected. You are basically recording the dialing and when Asterisk detects
a pickup on the Zap channel it 'officially' bridges the Sip and the Zap
together and stops the recording that was going on on that channel before.
I've run into this several times on the astGUIclient project.
MATT---
-----Original Message-----
From: Stuart Hart [mailto:stuart at vo.net]
Sent: Sunday, September 12, 2004 6:38 PM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] Monitor and AGI - doesn't record much!
I have setup as per the monitor example configuration on the wiki site and
all works well for an extension dialing 8 then the number. However, if I
dial from an AGI script the recording stops after a few seconds. I see an
extra answer in the console and suspect that is the reason. Could any kind
soul help me to get around this?
Extensions.conf....
exten =>
_8.,1,SetVar(CALLFILENAME=${UNIQUEID}--${CALLERIDNUM}--${EXTEN:1}--${TIMESTA
MP})
exten => _8.,2,Monitor(wav,${CALLFILENAME},m)
exten => _8.,3,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) ;
Console log.....
-- AGI Script Executing Application: (DIAL) Options:
(Local/85551212/|30|HS(60605520))
-- Setting call duration limit to 60605520 seconds.
-- Executing SetVar("Local/85551212 at default-72ef,2",
"CALLFILENAME=--spa2002--5551212--20040912-173057") in new stack
-- Called 85551212/
-- Executing Monitor("Local/85551212 at default-72ef,2",
"wav|--spa2002--5551212--20040912-173057|m") in new stack
-- Executing Dial("Local/85551212 at default-72ef,2", "Zap/g3/5551212") in
new stack
-- Called g3/5551212
-- Zap/4-1 answered Local/85551212 at default-72ef,2
-- Local/85551212 at default-72ef,1 answered SIP/spa2002-b7f0
**** when this message is displayed the Monitor stops although the call is
still in progress ****
== Spawn extension (default, 85551212, 3) exited non-zero on
'Local/85551212 at default-72ef,2'
monitor executing ( nice -n 19 soxmix
/var/spool/asterisk/monitor/--spa2002--5551212--20040912-173057-in.wav
/var/spool/asterisk/monitor/--spa2002--5551212--20040912-173057-out.wav
/var/spool/asterisk/monitor/--spa2002--5551212--20040912-173057.wav && rm -f
/var/spool/asterisk/monitor/--spa2002--5551212--20040912-173057-* ) &
**** Finally the call is hung up but only the first 4 seconds are recorded L
*****
-- Hungup 'Zap/4-1'
new UID is
-- AGI Script astcc.agi completed, returning 0
More information about the asterisk-users
mailing list