<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Ryzhik,<br>
<br>
Without a t_relay() it makes not much sense to have an dialog
structure at all - the dialog module in opensips is actually
design for proxied calls, not for UAC calls.<br>
<br>
IMO, you should keep it a transaction level, by sending replies
back only. When getting the INVITE, put its call-id into a DB
table (to keep only the "active" session) together with a lifetime
/ expiration time. When getting a CANCEL, update the table (set
lifetime to 0), to know it is terminated. And use an simple
external script that keeps scanning the DB for (1) sending 487
Terminated via MI if the record has 0 lifetime or (2) send a 408
Timeout via MI if the lifetime exceeded.<br>
In a similar way you can handle the BYE - send back 200OK for the
BYE and set 0 in lifetime, to send a 487 canceled back <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 Summit 27-30 Sept 2022, Athens
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2022Athens/">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div class="moz-cite-prefix">On 10/10/22 4:33 PM, Ryzhik Ivan wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAG9R00rqH85iKAT-vzaLPOXETzsJndzQCdUn87oJkCpQvjqNtA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello!
<div>My opensips version is 3.1 with tm,dialog and rtpengine
modules.</div>
<div>On incoming INVITE i'm creating an early dialog with 183
replies and i'm playing audio to caller with rtpengine, no
t_relay() on this step, OS is acting as UAS endpoint.<br>
If the caller cancels the invite with a CANCEL message - all
works great.<br>
But some users terminate dialog with BYE message.<br>
1) on BYE with to-tag OS can't find dialog with
match_dialog(), because to-tag presents.<br>
2) if i use load_dialog_ctx($ci) - it is possible to handle
BYE.<br>
3) in early dialog termination with BYE we also need to send
final response to the INVITE transaction. <br>
<br>
Maybe I did something wrong, but I can't handle the final
response to INVITE in this case.<br>
</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>