问题
I want to get the duration of the call but confused which variable to use
${CDR(duration)} or
${CDR(billsec)}
Here it is not clear from when ${CDR(duration)} records the time
So which should i use ${CDR(duration)} or ${CDR(billsec)} ?
回答1:
Call come in, after that not answer X second, after that answered, after that Y sec speak/play something and hangup.
So duration will be X+Y, while billsec(time to be billed) will be Y.
回答2:
BillSec is "how long was the call off hook" ... a common metric for things like LD billing or "usage minutes".
Duration is "how long from start to finish, including switching delays and redirections" ... note that technically Duration can be >0
while BillSec == 0,
if the call was routed but not answered.
Since you don't say what you need to know the value for, it's hard to tell you which version you need.
来源:https://stackoverflow.com/questions/24860456/difference-between-cdrduration-and-cdrbillsec-in-asterisk-dialplan