Problem with CDR and duration - (resolved)

Hi,

I configured cdr_custom.conf and time of CDR(start) and time of CDR(answer) are identical.
So, duration and billsec are identical…

What is the specific configuration?

Sorry for my poor English…

Why do you think that cdr_custom.conf is relevant?

What is your custom format?

What is the dialplan for the call?

Not in this file that I set up custom ?

Master.csv => "Context:${CDR(dcontext)}","Caller:${CDR(channel)}/${CDR(src):0:6}xxxx","Called:${CDR(dstchannel)}/${CDR(dst):0:6}xxxx","Rule:${CDR(lastapp)}","Start:${CDR(start)}","Answer:${CDR(answer)}","End:${CDR(end)}","Duration:${CDR(billsec)}/${CDR(duration)}","${CDR(disposition)}","${CDR(amaflags)}"

[code][macro-numerotation]
exten => s,1,GotoIf($[${LEN(${CALLERID(num)})} = 4]?numeroCI:numeroNA)
exten => s,n(numeroNA),GotoIf($[${LEN(${CALLERID(num)})} = 9]?callerNA:numeroIN)
exten => s,n(numeroIN),GotoIf($[${LEN(${CALLERID(num)})} > 9]?callerIN:numeroCI)
exten => s,n(callerIN),Set(CALLERID(num)=0${CALLERID(num)})
exten => s,n(callerNA),Set(CALLERID(num)=0${CALLERID(num)})
exten => s,n(numeroCI),NoOP(CALLERID->${CALLERID(num)})
exten => s,n,Set(CALLERID(ani)=${CALLERID(num)})

[macro-appel_entrant]
exten => s,1,Macro(numerotation)
exten => s,n,Answer()
exten => s,n,NoOP(${MACRO_EXTEN}<==${CALLERID(num)})
exten => s,n,Dial(SIP/${MACRO_EXTEN},${ARG1},t)
exten => s,n,Macro(messagerie,${MACRO_EXTEN}@${ARG2},${DIALSTATUS})
exten => s,n,Hangup()

exten => a,1,VoiceMailMain(${MACRO_EXTEN}@${ARG2})

exten => h,1,Hangup()

[context-in]
exten => _X.,1,Macro(appel_entrant,25,company)[/code]

Thanks for your help !

You are calling Answer, for no obvious reason, before you are calling Dial. There are no time consuming steps before the Answer. I would expect billing seconds to equal total seconds!

Of course !!! I’m so s*****… :unamused:

Here is my dialplan corrected :

[macro-appel_entrant] exten => s,1,Macro(numerotation) exten => s,n,NoOP(${MACRO_EXTEN}<==${CALLERID(num)}) exten => s,n,Dial(SIP/${MACRO_EXTEN},${ARG1},t) exten => s,n,Answer() exten => s,n,Macro(messagerie,${MACRO_EXTEN}@${ARG2},${DIALSTATUS}) exten => s,n,Hangup()

Thank you !!!

It’s wonderfull !!! :mrgreen: