Hello, Asterisk party, If block the call before dialing (Hangup()), CDR's don't write to MySQL or CSV. Otherwise, if Hangup() is after Dial(), CDRs write normally. Here is the dialplan:
; we skipped dial, because the number is "blocked" exten => _X.,n(Finish),Hangup() exten => h,1,NoOP("hangup") exten => h,2,ResetCDR(w) exten => h,n,NoCDR() exten => h,n,GotoIf($["${BLOCKED}"="1"]?Bl) And asterisk verbose log -- Executing [370xxxxx...@npdb2:78] Hangup("SIP/1002-00000201", "") in new stack == Spawn extension (NPDB2, 370xxxxxxxx, 78) exited non-zero on 'SIP/1002-00000201' -- Executing [...@npdb2:1] NoOp("SIP/1002-00000201", ""hangup"") in new stack -- Executing [...@npdb2:2] ResetCDR("SIP/1002-00000201", "w") in new stack -- Executing [...@npdb2:3] NoCDR("SIP/1002-00000201", "") in new stack -- Executing [...@npdb2:4] GotoIf("SIP/1002-00000201", "1?Bl") in new stack This case there is no cdr. If I do dial() before ResetCDR(), it's fine. With asterisk 1.2 this worked fine. Any clue what's wrong? Asterisk 1.6.2.7 self-compiled, Debian 5.0.5 Regards Motiejus -- _____________________________________________________________________ -- 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