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:[EMAIL PROTECTED]
Sent: Sunday, September 12, 2004 6:38 PM
To: [EMAIL PROTECTED]
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/[EMAIL PROTECTED],2",
"CALLFILENAME=--spa2002--5551212--20040912-173057") in new stack
    -- Called 85551212/
    -- Executing Monitor("Local/[EMAIL PROTECTED],2",
"wav|--spa2002--5551212--20040912-173057|m") in new stack
    -- Executing Dial("Local/[EMAIL PROTECTED],2", "Zap/g3/5551212") in
new stack
    -- Called g3/5551212
    -- Zap/4-1 answered Local/[EMAIL PROTECTED],2
    -- Local/[EMAIL PROTECTED],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/[EMAIL PROTECTED],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
 
 
 
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to