<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Alexander,<br>
<br>
You actually have 2 options here:<br>
<br>
1) if you want to do that for all the calls, you can use
E_DLG_STATE_CHANGED [1] event via the event route [2]. And check
when the new dialog state is TERMINATED<br>
<br>
2) if you want to do it only for some calls, use the dlg_on_hangup
hook [3] and have it set only for the calls you need.<br>
<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.2.x/dialog.html#event_E_DLG_STATE_CHANGED">https://opensips.org/html/docs/modules/3.2.x/dialog.html#event_E_DLG_STATE_CHANGED</a><br>
[2] <a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-Routes-3-2#toc9">https://www.opensips.org/Documentation/Script-Routes-3-2#toc9</a><br>
[3]
<a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.2.x/dialog.html#func_dlg_on_hangup">https://opensips.org/html/docs/modules/3.2.x/dialog.html#func_dlg_on_hangup</a><br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021
<a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
<div class="moz-cite-prefix">On 1/19/22 3:37 PM, Alexander Perkins
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALLkTp3C6Vck68puJkg15LWvdi51Dm4p+d6C3r9Oo9OYZO=b+g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi All. I would like to invoke a web service when
the call hangs up. I'd like to send over to the web service
items such as how long the calls lasted (milliseconds), etc. I
know how to invoke the web service, but where should I invoke it
so it can send over those variables?<br>
<div><br>
</div>
<div>Thank you!</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>