== Using SIP RTP CoS mark 5 -- Executing [1003@telefony:1] NoOp("SIP/1001-00000074", "") in new stack -- Executing [1003@telefony:2] Set("SIP/1001-00000074", "CALLERID(num)=0") in new stack -- Executing [1003@telefony:3] Verbose("SIP/1001-00000074", "0") in new stack 0 -- Executing [1003@telefony:4] Set("SIP/1001-00000074", "MONITOR_FILENAME=wewnetrzne/2013-01-09/2013-01-09_141024_1357737024.116") in new stack -- Executing [1003@telefony:5] Set("SIP/1001-00000074", "CDR(userfield)=") in new stack -- Executing [1003@telefony:6] Set("SIP/1001-00000074", "CDR(userfield)=|M:wewnetrzne/2013-01-09/2013-01-09_141024_1357737024.116.wav") in new stack [2013-01-09 14:10:24] WARNING[6512]: pbx.c:1442 pbx_exec: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (Set(CDR(userfield)=|M:wewnetrzne/2013-01-09/2013-01-09_141024_1357737024.116.wav)) -- Executing [1003@telefony:7] Monitor("SIP/1001-00000074", "alaw,/var/spool/asterisk/monitor/wewnetrzne/2013-01-09/2013-01-09_141024_1357737024.116,bm") in new stack -- Executing [1003@telefony:8] GotoIf("SIP/1001-00000074", "0?noredirect") in new stack -- Executing [1003@telefony:9] AGI("SIP/1001-00000074", "przekierowanie.php") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/przekierowanie.php przekierowanie.php: 1003 -- AGI Script przekierowanie.php completed, returning 0 -- Executing [1003@telefony:10] GotoIf("SIP/1001-00000074", "0?ivr,1003,1") in new stack -- Executing [1003@telefony:11] GotoIf("SIP/1001-00000074", "0?ivr,1003,queue_answer") in new stack -- Executing [1003@telefony:12] GotoIf("SIP/1001-00000074", "0?dialmany") in new stack -- Executing [1003@telefony:13] GotoIf("SIP/1001-00000074", "0?:noredirect") in new stack -- Goto (telefony,1003,21) -- Executing [1003@telefony:21] NoOp("SIP/1001-00000074", "") in new stack -- Executing [1003@telefony:22] ExecIf("SIP/1001-00000074", "0?Dial(sip/siptrunk/1003)") in new stack -- Executing [1003@telefony:23] Dial("SIP/1001-00000074", "SIP/1003") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1003 -- SIP/1003-00000075 is ringing -- SIP/1003-00000075 answered SIP/1001-00000074 Chanel SIP/1001-00000074 calls to number 1003, and acording to diaplan logic this call is monitored to file /var/spool/asterisk/monitor/wewnetrzne/2013-01-09/2013-01-09_141024_1357737024.116 ater number 1003 answers the call. and ls confirms that: ls -lah -rw-r--r-- 1 root root 128K 01-09 14:10 2013-01-09_141024_1357737024.116-in.alaw -rw-r--r-- 1 root root 128K 01-09 14:10 2013-01-09_141024_1357737024.116-out.alaw Now number 1003 puts 1001 on hold and starts new call SIP/1003-00000076 to number 1002 it goes throught this same dialplan logic: -- Started music on hold, class 'default', on SIP/1001-00000074 == Using SIP RTP CoS mark 5 -- Executing [1002@telefony:1] NoOp("SIP/1003-00000076", "") in new stack -- Executing [1002@telefony:2] Set("SIP/1003-00000076", "CALLERID(num)=0") in new stack -- Executing [1002@telefony:3] Verbose("SIP/1003-00000076", "0") in new stack 0 -- Executing [1002@telefony:4] Set("SIP/1003-00000076", "MONITOR_FILENAME=wewnetrzne/2013-01-09/2013-01-09_141039_1357737039.118") in new stack -- Executing [1002@telefony:5] Set("SIP/1003-00000076", "CDR(userfield)=") in new stack -- Executing [1002@telefony:6] Set("SIP/1003-00000076", "CDR(userfield)=|M:wewnetrzne/2013-01-09/2013-01-09_141039_1357737039.118.wav") in new stack [2013-01-09 14:10:39] WARNING[6530]: pbx.c:1442 pbx_exec: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (Set(CDR(userfield)=|M:wewnetrzne/2013-01-09/2013-01-09_141039_1357737039.118.wav)) -- Executing [1002@telefony:7] Monitor("SIP/1003-00000076", "alaw,/var/spool/asterisk/monitor/wewnetrzne/2013-01-09/2013-01-09_141039_1357737039.118,bm") in new stack -- Executing [1002@telefony:8] GotoIf("SIP/1003-00000076", "0?noredirect") in new stack -- Executing [1002@telefony:9] AGI("SIP/1003-00000076", "przekierowanie.php") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/przekierowanie.php przekierowanie.php: 1002 -- AGI Script przekierowanie.php completed, returning 0 -- Executing [1002@telefony:10] GotoIf("SIP/1003-00000076", "0?ivr,1002,1") in new stack -- Executing [1002@telefony:11] GotoIf("SIP/1003-00000076", "0?ivr,1002,queue_answer") in new stack -- Executing [1002@telefony:12] GotoIf("SIP/1003-00000076", "0?dialmany") in new stack -- Executing [1002@telefony:13] GotoIf("SIP/1003-00000076", "0?:noredirect") in new stack -- Goto (telefony,1002,21) -- Executing [1002@telefony:21] NoOp("SIP/1003-00000076", "") in new stack -- Executing [1002@telefony:22] ExecIf("SIP/1003-00000076", "0?Dial(sip/siptrunk/1002)") in new stack -- Executing [1002@telefony:23] Dial("SIP/1003-00000076", "SIP/1002") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1002 -- SIP/1002-00000077 is ringing -- Stopped music on hold on SIP/1001-00000074 == Spawn extension (telefony, 1003, 23) exited non-zero on 'SIP/1003-00000076' -- SIP/1002-00000077 answered SIP/1001-00000074 == Spawn extension (telefony, 1002, 23) exited non-zero on 'SIP/1001-00000074' 1002 starts ringing and 1003 transfers 1001 to 1002 before 1002 answers. At this point monitor command that should monitor to file /var/spool/asterisk/monitor/wewnetrzne/2013-01-09/2013-01-09_141039_1357737039.118 is not monitoring because of the b option used, but when 1002 finally answers the call it is still monitored by the first monitor application to file /var/spool/asterisk/monitor/wewnetrzne/2013-01-09/2013-01-09_141024_1357737024.116 and ls command confirms that: ls -lah -rw-r--r-- 1 root root 160K 01-09 14:10 2013-01-09_141024_1357737024.116-in.alaw -rw-r--r-- 1 root root 156K 01-09 14:10 2013-01-09_141024_1357737024.116-out.alaw Now problem accouures when call ends, monitor stops and before it calls the MONITOR_EXEC file names get changed to /var/spool/asterisk/monitor/wewnetrzne/2013-01-09/2013-01-09_141039_1357737039.118 MONITOR_EXEC gets called with new filenames. ls -lah -rw-r--r-- 1 samba nogroup 471K 01-09 14:10 2013-01-09_141039_1357737039.118.wav