Michael Collins
2006-Nov-08 13:35 UTC
[asterisk-users] Warning: "Channel does not have a CDR" when doing ForkCDR
Gang, I'm having this error pop up when I do a ForkCDR, and I'm not sure how to get around it. Here are a few log lines: Nov 8 10:37:08 VERBOSE[28079] logger.c: -- Executing ForkCDR("Zap/49-1", "") in new stack Nov 8 10:37:08 WARNING[28079] app_forkcdr.c: Channel does not have a CDR The scenario occurs like this: I use a .call file to generate a call on Zap/1-1 The called party is then bridged to Zap/49-1 After the bridge occurs, I would like a separate CDR to reflect a successful bridge (or "transfer" or whatever we call it when two Zap channels are connected)>From the error message it sounds like Zap/49-1 doesn't have a CDR tobegin with - is it possible to force the second leg, i.e. the call on Zap/49-1, to generate a CDR? Any help would be appreciated. Dial plan info is at the end of this transmission. Thanks, MC Dial plan info: This is what I affectionately call "blasterisk" - I'm using Asterisk to make lots of automated calls. I'm not really blasting away, but it sounded cool. Anyway, here's how it works- I start with a .call file that generates a phone call in blasterisk_dialout,s,1 If the called party presses the correct digits, in this case 1, then the call goes to blasterisk_english_right_party,s,1. If the called party then dials 9, he is transferred to an agent, which is where the macro Connect_to_agent comes in to play. The agent is called on a separate zap channel and then presses 1 to accept the call. Upon a successful connection to an agent I'd like to generate a new CDR entry, which is why I'm doing the ForkCDR... [blasterisk_dialout] exten => s,1,DigitTimeout,1 exten => s,n,ResponseTimeout,10 exten => s,n,Answer exten => s,n,AMD exten => s,n,Noop(AMDSTATUS is '${AMDSTATUS"') exten => s,n,GotoIf($[${AMDSTATUS} = AMD_MACHINE]?lmtc,s,1:human) exten => s,n(human),Set(NUMTRIES=1) exten => s,n,SetCDRUserField(${dnum}) exten => s,n,AppendCDRUserField(:${cdn}) exten => s,n,AppendCDRUserField(:${dialednum}) exten => s,n(repeat),Background(Initial-greeting) exten => s,n,Wait(.1) exten => s,n,Flite(${fname}) exten => s,n,Flite(${lname}) exten => s,n,Background(If-this-person-press-1-else-press-2) exten => s,n,Set(NUMTRIES=$[${NUMTRIES}+1]) exten => s,n,GotoIf($[${NUMTRIES} < 2]?repeat) exten => s,n,Goto(t,1) exten => 1,1,Goto(blasterisk_english_right_party,s,1) exten => 2,1,Goto(blasterisk_english_message,s,1) exten => 5,1,Goto(blasterisk_spanish_main_greeting,s,1) exten => t,1,Playback(vm-goodbye) exten => t,2,Hangup [blasterisk_english_right_party] exten => s,1,Answer exten => s,n,Background(this-is-a-call-from-fcn-regarding-ref-num) exten => s,n,WaitExten(.1) exten => s,n,SayDigits(${dnum}) exten => s,n,WaitExten(.1) exten => s,n,Background(to-speak-to-csr-press-9) exten => s,n,Background(silence/1) exten => s,n,Background(this-is-a-call-from-fcn-regarding-ref-num) exten => s,n,WaitExten(.1) exten => s,n,SayDigits(${dnum}) exten => s,n,WaitExten(.1) exten => s,n,Background(to-speak-to-csr-press-9) exten => s,n,Background(silence/5) exten => s,n,Background(Not-right-party-live-Eng) exten => s,n,SayDigits(${dnum}) exten => s,n,WaitExten(5) exten => s,n,Playback(vm-goodbye) exten => s,n,Hangup exten => t,1,ForkCDR exten => t,n,Playback(vm-goodbye) exten => t,n,Hangup exten => 9,1,Playback(pls-hold-while-try) exten => 9,n,Noop(Attempting to bridge to ${agentext}) exten => 9,n,Dial(Zap/g9/${agentext}|60|M(Connect_to_agent^${dnum})) exten => 9,n,Noop(Done w/ x-fer to agent!) exten => 9,n,Hangup ;exten => 9,n,Noop(Done with dialing, now hoping for the best) exten => 9,h,ForkCDR exten => 9,h,Hangup exten => 9,103,Playback(im-sorry-unable-to-connect-to-eng) exten => 9,104,Playback(vm-goodbye) exten => 9,105,Hangup [macro-Connect_to_agent] exten => s,1,DigitTimeout(180) exten => s,n,Noop(Inside macro, ARG1 is '${ARG1}') ;ARG1 = dnum exten => s,n,Set(AGENT_TRIES=1) exten => s,n,Noop(Agent tries = ${AGENT_TRIES}) exten => s,n(repeat),Wait(.1) exten => s,n,Playback(your-account) exten => s,n,Playback(number) exten => s,n,Wait(.4) exten => s,n,SayDigits(${ARG1}) exten => s,n,Read(ACCEPT|silence/5|1|noanswer|1|5) exten => s,n,Noop(ACCEPT is ${ACCEPT}) exten => s,n,Set(AGENT_TRIES=$[${AGENT_TRIES} + 1]) exten => s,n,GotoIf($[${ACCEPT} < 8]?agent:check) exten => s,n(check),GotoIf($[${AGENT_TRIES} > 40]?10:repeat) exten => s,n,Noop(How did I get here?!) exten => s,n(agent),Noop(Agent pressed ${ACCEPT} - call being transferred) exten => s,n,Set(ACCTDATA=${CDR(userfield)}) exten => s,n,ForkCDR() ; start new CDR if call actually got xfer'd exten => s,n,SetCDRUserField(${ACCTDATA}) exten => s,n,AppendCDRUserField(:XFER_TO_AGENT) exten => s,n,Noop(All done here!) exten => t,1,Noop(Agent timeout, dropping call to queue) exten => h,1,Hangup exten => i,1,Noop(Invalid entry, dropping call to queue) exten => 10,1,Playback(vm-goodbye) exten => 10,n,Noop(Agent did not pickup call...) exten => 10,n,Hangup