<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi,<br>
<br>
Indeed, a funny un-consistency that has to be fixed. For now you
can do $(T_id{re.subst,/\./:/g}) instead of simple $T_id<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>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 23.10.2024 02:24, M S wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEZrhoM_QHRX8jOAXNLXKc96Oytmwv+FbDx_8vvos8io9GQi9w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi Bogdan,
<div>I used T_id and it responds
with: "error":{"code":400,"message":"Invalid trans_id"}</div>
<div>Also the documentation says trans_id should be in
hash:label format but $T_id is like 38151c86.ed7b</div>
<div>Please advise.</div>
<div><br>
</div>
<div>Thank you</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Oct 21, 2024 at
2:23 PM Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org" moz-do-not-send="true"
class="moz-txt-link-freetext">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> <font face="monospace">Yes, correct!</font><br>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.opensips-solutions.com</a>
<a href="https://www.siphub.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.siphub.com</a></pre>
<div>On 21.10.2024 15:22, M S wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Thank you for your response, I will
definitely check that. quick question, is transaction id
in there same as $T_id?</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Oct 21, 2024
at 2:04 PM Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> <font face="monospace">Hi,<br>
<br>
The onreply route is not design to perform any
signaling within - its purpose is to give you
access to the incoming replies and to allow you to
eventually modify their headers. This is the
reason why you cannot send a reply from the route.<br>
<br>
As a simple workaround, you can use the mi
function `t_reply` [1] via the mi_script module.<br>
<br>
[1] <a
href="https://opensips.org/html/docs/modules/3.4.x/tm.html#mi_t_reply"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://opensips.org/html/docs/modules/3.4.x/tm.html#mi_t_reply</a><br>
<br>
Regards,<br>
</font>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.opensips-solutions.com</a>
<a href="https://www.siphub.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.siphub.com</a></pre>
<div>On 21.10.2024 00:35, M S wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Thank you for your ideas! I
considered doing the perl solution but I
wondered if there is a more "native" solution to
try first. the idea to patch t_reply seems
legitimate, but you are right about whether it
may need additional changes too, and which leg
the reply goes back to in a reply route, does it
go to the one who sent 200? I guess that needs
to be checked but since my system is under load
I am a little hesitant about making big changes,
maybe one of Opensips people can comment too....</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Oct
20, 2024 at 10:28 PM mayamatakeshi <<a
href="mailto:mayamatakeshi@gmail.com"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">mayamatakeshi@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun,
Oct 20, 2024 at 11:38 PM M S <<a
href="mailto:medeanwz@gmail.com"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">medeanwz@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi list,
<div>I am having a problem that my
upstream provider disconnects the
call if my client does not send
180/183 before 200 OK.</div>
<div>At the time of receiving 200 OK
(in reply_route) I can check to see
if previously a 180/183 was also
sent or not. </div>
<div>My solution is: as soon as I
receive a 200 OK from the client, if
180/183 was not received before, I
create a 180 ringing message and
send it to upstream, before passing
on 200. Now I realized that none of
the usual methods (send_reply,
sl_send_reply, t_send_reply) work
from reply_route, and I have no idea
how to use dlg_send_sequential to
send a "180 ringing".</div>
<div>Any ideas would be appreciated.</div>
<div><br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>dlg_send_sequential would not work as
it is used to generate a request.</div>
<div><br>
</div>
<div>I think opensips should allow t_reply
to work from within ONREPLY_ROUTE. </div>
<div>Currently it, doesn't:</div>
<div><br>
</div>
<div>opensips tm.c:<br>
{"t_reply",
(cmd_function)w_pv_t_reply, {<br>
{CMD_PARAM_INT,
fixup_reply_code, 0},<br>
{CMD_PARAM_STR, 0, 0}, {0,0,0}},<br>
REQUEST_ROUTE | FAILURE_ROUTE},<br>
</div>
<div><br>
</div>
<div>But kamailio which, as opensips,
inherited the tm foundation from openser
allows it:</div>
{"t_reply", w_t_reply, 2,
fixup_t_reply, 0,<br>
REQUEST_ROUTE | ONREPLY_ROUTE
| FAILURE_ROUTE},</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">So you could try
patching opensips t_reply by adding the
ONREPLY_ROUTE flag till this is allowed in
opensips (I'm not sure if it will work as
extra changes in code might be needed).</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Alternatively, you
could call a function in a perl/lua/python
module to change the "200 OK" with "180
Ringing", remove the top Via Header
(beware that the Via headers might be
coalesced into a single one), remove the
body and use a raw socket to send the
packet:</div>
<div class="gmail_quote">(ref: <a
href="https://opensips.org/html/docs/modules/3.5.x/perl.html#func_perl_exec"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://opensips.org/html/docs/modules/3.5.x/perl.html#func_perl_exec</a>)</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Obs: I assume the
language module inherits the limitations
from the route it is being executed on, so
I would not expect:</div>
<div class="gmail_quote">
$m->sl_send_reply("180", "Trying");</div>
<div class="gmail_quote">to work, but you
could try to see what happens.</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><br>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>