0

OpenSips provides various timeout for configuration: http://www.opensips.org/html/docs/modules/1.8.x/tm.html

How to measure the time (ring duration) between receiving an INVITE and 200 OK? Is there a special function?

ssk
  • 9,045
  • 26
  • 96
  • 169

1 Answers1

0

I was able to solve this using the $Ts core variable.

i) Record the initial timestamp:

$dlg_val(inviteStartTimestamp) = $Ts;

ii) When 200 OK is received in the reply route, find the time difference in seconds:

$var(ringDurationSec) = $Ts - $dlg_val(inviteStartTimestamp{s.int});
ssk
  • 9,045
  • 26
  • 96
  • 169