Greetings, 

I would like to know if it is possible to get the value of $DLG_lifetime before the BYE hits loose_route(). 

opensips provides a similar function which lets you get dialog life. 

https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_load_dialog_ctx

But i could not get the same from kamailio or maybe kamailio has a better way for this?

Thanks for any pointer. 

Ryan