<div dir="ltr">Hello,<div>Is there a straight forward way of getting the duration of the call in cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog does not exist. I dont get the value of $DLG_lifetime even in dialog:end event when the call ends through cnxcc module. Even the cdr flag of acc module doesn't get the duration and it logs, invalid values !!</div>
<div>Currently, I am storing the timestamp in htable when the call is answered and then subtract it from the current timestamp in the cnxcc:shutdown event route to get the duration. Something like this:</div><div><br></div>
<div><div>onreply_route[MANAGE_REPLY] {</div><div>    xdbg("incoming reply\n");</div><div> </div><div>    if(status=="200") {</div><div>        $sht(ts=>$ci) = $Ts;</div><div>    }</div><div>}</div>
</div><div><br></div><div><div>event_route[cnxcc:call-shutdown] {</div><div>    </div><div>    $var(duration) = $TS-$sht(ts=>$ci);</div><div>    sht_rm_name_re("ts=>$ci");</div><div>    </div><div>    xlog("L_INFO", "Duration of call was $var(duration)");</div>
</div><div>}</div><div><br></div><div><br></div><div>Any more correct way of doing this would be very helpful.</div><div><br></div><div>Thanks,</div><div><br></div><div>--- Jayesh</div></div>