<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">Hello, Henning,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">No, I am not a member, and so every
time I sent a message I receive the email with :<br>
<br>
"Your message to sr-users awaits moderator approval"<br>
<br>
I didn't receive any confirmation email or anything at all related
to my subscription request.<br>
<br>
Best regards,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Luis<br>
<br>
On 4/8/20 4:20 PM, Henning Westerholt wrote:<br>
</div>
<blockquote type="cite" cite="mid:VI1PR05MB459023EF06F852CC53986A0FC5C00@VI1PR05MB4590.eurprd05.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI Emoji";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
tt
{mso-style-priority:99;
font-family:"Courier New";}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;}
span.E-MailFormatvorlage23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello
Luis,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">I checked in the mailman checked, you seemed to
be not subscribed to the list. Have you received the
confirmation e-mail and confirmed it?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">This is the date and time when you tried to
subscribe:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">Apr 07 23:08:35 2020 (15775) sr-users: pending
Luis Rojas <luis dot rojas at sixbell dot com>
181.73.XX.XX<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126725901&sdata=Zsg4%2FKQ1DwqSKDRtU0ZYA9Cl1wjyxGHtJJdLny5zJoU%3D&reserved=0" originalsrc="https://skalatan.de/blog/" shash="TE6pDFs+X2bdZMv4rSzSemSw2tdtOj11fS5jJ8S7HPMzcbrxKWzuUszMopHBXCrhZ3OrG26jHdG2ewrl2XfRG86qCZNZPIwjufbilC4/zxjmVA4JPictVjMh2O6+ZunmNzn/6LTkHr/7QQuPZ0l/ODmHe7S0heEYmxTRaQ+ZFfk=" moz-do-not-send="true"><span style="color:#0563C1" lang="EN-GB">https://skalatan.de/blog/</span></a></span><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126735897&sdata=bfk2qFE1tYrgrD5fSNaVctjlT88NyY8DbCcqkIJdEfM%3D&reserved=0" originalsrc="https://gilawa.com/" shash="DEb8Tp5QoFJNiWBI/GJQPeigrsT5xrTlHxWyMAuyp3bBuF/w9Y5r7484HZSfsE7BwmQt4yjhUeli5AiYT+DKDM3GNJO3e5uy7Zr/3PLYgow38OOroBmtQy55J5QOwnXiOz/GypGX0p23eTyOMgCujRYt/XkGA+B7tNrTxF2Thsg=" moz-do-not-send="true"><span style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a></span><span style="mso-fareast-language:EN-US">
<span lang="EN-GB"><o:p></o:p></span></span></p>
</div>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b>
Luis Rojas G. <a class="moz-txt-link-rfc2396E" href="mailto:luis.rojas@sixbell.com"><luis.rojas@sixbell.com></a>
<br>
<b>Sent:</b> Wednesday, April 8, 2020 10:04 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a>; Kamailio (SER) - Users
Mailing List <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a>; Henning
Westerholt <a class="moz-txt-link-rfc2396E" href="mailto:hw@skalatan.de"><hw@skalatan.de></a><br>
<b>Subject:</b> Re: [SR-Users] Kamailio propagates 180 and
200 OK OUT OF ORDER<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello, Daniel<br>
<br>
I will try this option.<br>
<br>
I tried the ASYNC, using async_ms_sleep, but it seems it's
not allowed in reply_route(). I wonder why. Documentation
only mentions request_route:<br>
<br>
<a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fkamailio.org%2Fdocs%2Fmodules%2F5.3.x%2Fmodules%2Fasync.html%23async.f.async_ms_sleep&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126735897&sdata=R8gNq1GqEJe75SCvTO%2FFCbPZKGxhIHX2sSgsheoaxcg%3D&reserved=0" originalsrc="https://kamailio.org/docs/modules/5.3.x/modules/async.html#async.f.async_ms_sleep" shash="YUoCN0vAVo8OXMaYETjLNbykJTRnlqw84Inkq2Sh68Y8D9Aim1xLjIzFwx21INMsSK07Sz5/i+Cnb4Etb/o8LBrxEPaRBlRok7JwSEc99pkxHqfXE04xgJQT94vb0pp+64qkwJCOTVIT19i3VBse2P8NtpIhH78IJiPeCffnXuI=" moz-do-not-send="true">https://kamailio.org/docs/modules/5.3.x/modules/async.html#async.f.async_ms_sleep</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">if I use it in
reply_route() kamailio does not even start.<br>
<span style="font-size:10.0pt;font-family:"Courier
New""><br>
<tt> 0(22147) ERROR: <core> [core/cfg.y:3402]:
yyparse(): misused command async_ms_sleep</tt><br>
<tt> 0(22147) CRITICAL: <core> [core/cfg.y:3547]:
yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 221, column 23: Command
cannot be used in the block</tt><br>
<br>
<tt>ERROR: bad config file (1 errors)</tt></span><br>
<br>
I wanted to introduce an artificial delay of just a few
miliseconds to 200 OK to INVITE.<br>
<br>
it's not just a problem about 180 and 200, but several other
conditions that will start to appear, like betwen
ACK-Reinvite.<br>
<br>
Anyone reading is the list administrator? I tried to
subscribe to the list, bit it seems I am still not a member,
so I don't receive answers (unless I am copied directly) and
can't post immediately, only after moderator's approval.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Also, I can't
answer all responses.<br>
<br>
Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Luis<br>
<br>
On 4/8/20 1:07 PM, Daniel-Constantin Mierla wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:35.4pt">Hello,<o:p></o:p></p>
<p style="margin-left:35.4pt">you have to keep in mind that
Kamailio is a SIP packet router, not a telephony engine. If
180 and 200 replies are part of a call is not something that
Kamailio recognize at its core. Its main goal is to route
out as fast as possible what is received, by executing the
configuration file script. Now, a matter of your
configuration file, processing of some SIP messages can take
longer than processing other. And the processing is done in
parallel, a matter of children parameter (and tcp_children,
sctp_children).<o:p></o:p></p>
<p style="margin-left:35.4pt">With that in mind, a way to try
to cope better with the issue you face is to set
route_locks_size parameter, see:<o:p></o:p></p>
<p style="margin-left:35.4pt"> * <a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fwiki%2Fcookbooks%2Fdevel%2Fcore%23route_locks_size&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126745899&sdata=2rvJhQuycna8JLMYrsl4CRHY3eYD6mk75OidAQvZjqY%3D&reserved=0" originalsrc="https://www.kamailio.org/wiki/cookbooks/devel/core#route_locks_size" shash="ipAlWZSACKUE1TH3NKEHscGdhBQqQZsgfPRUmUJbn9AC9O5xkBR3Gz7KV4hbVfuo7jN7D/BydrmmTpWL3PXEicVxdsarm9QGCEnMOUtvNdY1+WIaRe5Mh2zaTbnD+WTbC3ZztzVTh8VY/DYUDD1xoJqrctT09/EBympL/ZZeSEI=" moz-do-not-send="true">
https://www.kamailio.org/wiki/cookbooks/devel/core#route_locks_size</a><o:p></o:p></p>
<p style="margin-left:35.4pt">Probably is what you look for.<o:p></o:p></p>
<p style="margin-left:35.4pt">But if you want more tight
constraints, like when receiving a 180 after a 200ok and not
route it out, you have to make the logic in configuration
file by combining modules such as dialog or htable (as
already suggested).<o:p></o:p></p>
<p style="margin-left:35.4pt">Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On 08.04.20
16:04, Luis Rojas G. wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi,
Henning,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">No need to
be ironic. As I mentioned on my first post, I tried
stateful proxy and I observed the same behavior.
<br>
<br>
<i>"I tried using stateful proxy and I obtained the same
result."</i><br>
<br>
The asynchronous sleep seems promising. I will look into
it.<br>
<br>
Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Luis<br>
<br>
<br>
On 4/8/20 9:30 AM, Henning Westerholt wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US">Hi Luis,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">I see.
Well, you want to use Kamailio as a stateless proxy,
on the other hand it should do things that are
inherently stateful.
</span><span style="font-family:"Segoe UI
Emoji",sans-serif" lang="EN-GB">😉</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">As
mentioned, have a look to the dialog module to track
the state of dialogs that you process. This will not
work in a stateless mode, though.
</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">You
can also use the htable module to just store some data
about the processed messages in a shared memory table
and use this to enforce your ordering. There is also
the option to do an asynchronous sleep (with the
async) module on the message that you want to delay
but still processing other messages during it.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Cheers,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Henning</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">--
</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Henning
Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126755895&sdata=sTgS3OE42QH2V75%2FJGHejT1Q%2BKyx1oOCozcNUhdGPe8%3D&reserved=0" originalsrc="https://skalatan.de/blog/" shash="bT364eHH1qLzNUNQr1bUWWxxGKB1jVaY7hGrvtqdpp+HIRvcYj8fcgtq/E0oUAMyCQylWBwq5+20T73GCKkk89foxEPN+klz77D3A0mzjakvbC2qpldJJBM23gzp+e9IsGwsrIhvB5nt0wF7rqlhifkSpjHSXIvuRPqsA9WTfAE=" moz-do-not-send="true"><span style="color:#0563C1" lang="EN-GB">https://skalatan.de/blog/</span></a></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Kamailio
services –
</span><span style="mso-fareast-language:EN-US"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126755895&sdata=kgTIj%2FQHNV84x5ez8r8SN%2BOCzXz0pMQjdLpLiJ4%2Btvc%3D&reserved=0" originalsrc="https://gilawa.com/" shash="n7laAaH/4KlQEzmbQyFzJAoIJzH0THlqdUixTOO6QKLsteFSKsD+mRvoWxBlINOdl4TtaaVA39b9NjoNa/kYOpDnhvwTlIu/BKh99+eJRx7ygiHcldVnleGigZ18ajm+jgW6XPOmwIFfIX8YnCDuqN7RSGP7G4ySjC2+D65+5fo=" moz-do-not-send="true"><span style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a>
</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt"><b>From:</b>
Luis Rojas G. <a href="mailto:luis.rojas@sixbell.com" moz-do-not-send="true">
<luis.rojas@sixbell.com></a> <br>
<b>Sent:</b> Wednesday, April 8, 2020 3:00 PM<br>
<b>To:</b> Henning Westerholt <a href="mailto:hw@skalatan.de" moz-do-not-send="true"><hw@skalatan.de></a>;
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true"><sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> Re: [SR-Users] Kamailio propagates
180 and 200 OK OUT OF ORDER<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:70.8pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">Hello,
Henning,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">I am
worried about this scenario, because it's a symptom of
what may happen in other cases. For instance, I've
seen that this operator usually sends re-invites
immediate after sending ACK. This may create race
conditions like 3.1.5 of RFC5407<br>
<br>
<a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc5407%23page-22&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126765886&sdata=fWW3S%2FmlzcitCl2ocmzoHQXY2P%2BK%2BSYqNTM3yLTqX6A%3D&reserved=0" originalsrc="https://tools.ietf.org/html/rfc5407#page-22" shash="gOGqztJFGIRYIEAQ7sY2jbHTuzd/UraTAUpOu2O7JE5QNdZOBr3HQE34oWkQ1OEu1Hu5Z1DRtS4zea4pTRHAQ1RD4P35xQ0IlDi4syRjUUDi4z+UY41y3edP1hzxySl/fZWQZvMBftrdY7036KycI/jV/S7lH3VuqcIhXUABCRU=" moz-do-not-send="true">https://tools.ietf.org/html/rfc5407#page-22</a><br>
<br>
I'd understand that one happens because of packet
loss, as it's in UDP's nature, but in this case it
would be artificially created by Kamailio. if there
was no problem at network level (packet loss, packets
following different path on the network and arriving
out of order), why Kamailio creates it? <br>
<br>
I'd expect that the shared memory is used precisely
for this. If an instance of kamailio receives a 200
OK, it could check on the shm and say "hey, another
instance is processing a 180 for this call. Let's wait
for it to finish" (*). I know there could still be a
problem, the instance processing the 180 undergoes a
context switch just after it receives the message, but
before writing to shm, but it would greatly reduce the
chance.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:70.8pt">In
our applications we use a SIP stack that always sends
messages to the application in the same order it
receives them, even though is multi-threaded and
messages from the network are received by different
threads. So, they really syncronize between them. Why
Kamailio instances don't?<br>
<br>
I am evaluating kamailio to use it as a dispatcher to
balance load against our several Application Servers,
to present to the operator just a couple of entrance
points to our platform (they don't want to establish
connections to each one of our servers). This operator
is very difficult to deal with. I am sure they will
complain something like "why are you sending messages
out of order? Fix that". The operator will be able to
see traces and check that messages entered the
Kamailio nodes in order and left out of order. They
will not accept it.<br>
<br>
(*) Not really "wait", as it would introduce a delay
in processing all messages. it should be like putting
it on a queue, continue processing other messages, and
go back to the queue later.<br>
<br>
Well, thanks for your answer.<br>
<br>
Luis<br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
On 4/8/20 3:01 AM, Henning Westerholt wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US">Hello Luis,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">as
the 1xx responses are usually send unreliable
(unless you use PRACK), you should not make any
assumption on the order or even the arrival of this
messages. It can also happens on a network level, if
send by UDP.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Can
you elaborate why you think this re-ordering is a
problem for you?</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">One
idea to enforce some ordering would be to use the
dialog module in combination with reply routes and
the textops(x) module.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">About
the shared memory question – Kamailio implement its
own memory manager (private memory and shared memory
pool).</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Cheers,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Henning</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">--
</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Henning
Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126775887&sdata=6Ta8j%2FmwY4sj%2FJuJYf3BmOjoLc0GqB3RoJsQkwjX9fE%3D&reserved=0" originalsrc="https://skalatan.de/blog/" shash="UjmOTkbvXyRehUEnZYYBjWa2Cj6sJNI3mr+/mOzdmu9iATr79EAbVgsf9efj7BMT+8Fu37LYYIJXoSQyEJFUIlLP0vAC3Loyf2ZCkj8wfRSM1c+HgJClAZjn0jhuf3wu/5x2/TNV8y3EkOivLvY6N1ozxapTHreMmOy0ASGx5nQ=" moz-do-not-send="true"><span style="color:#0563C1" lang="EN-GB">https://skalatan.de/blog/</span></a></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB">Kamailio
services –
</span><span style="mso-fareast-language:EN-US"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126775887&sdata=rKYyhbl6jrbRlumdJ4xo67EVC7%2F%2B6JOnqtaXKxgcNAU%3D&reserved=0" originalsrc="https://gilawa.com/" shash="Bg7AKHxDnZC9mDjIFa1xElJE5gIsJb/d2V8UxN6ibQnTTTxDEU0jE9xGtR7x9Ao4G1qwVhCBaVLIKqed/UQz7FPjsBV3hctseoQVUB7a0F5jkfVZFhyyhZmE1XdhPjKTfgftLyJZT9IY+DSRC8EnkXgyVP2QgCTryZPLSzzj8Og=" moz-do-not-send="true"><span style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a>
</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt"><span style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:106.2pt"><b>From:</b>
sr-users <a href="mailto:sr-users-bounces@lists.kamailio.org" moz-do-not-send="true">
<sr-users-bounces@lists.kamailio.org></a>
<b>On Behalf Of </b>Luis Rojas G.<br>
<b>Sent:</b> Tuesday, April 7, 2020 10:43 PM<br>
<b>To:</b> <a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<b>Subject:</b> [SR-Users] Kamailio propagates 180
and 200 OK OUT OF ORDER<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:106.2pt"> <o:p></o:p></p>
<div>
<p style="margin-left:106.2pt">Good day,<o:p></o:p></p>
<p style="margin-left:106.2pt">I am testing the
dispatcher module, using Kamailio as stateless
proxy. I have a pool of UAC (scripts in SIPP) and a
pool of UAS (also scripts in SIPP) for the
destinations. Kamailio version is
kamailio-5.3.3-4.1.x86_64.<o:p></o:p></p>
<p style="margin-left:106.2pt">Problem I have is, if
UAS responds 180 and 200 OK to Invite immediately,
sometimes they are propagated out of order. 200 OK
before 180, like this :<o:p></o:p></p>
<p style="mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:106.2pt"><img style="width:6.2187in;height:2.177in" id="_x0000_i1025" src="cid:part15.DCE3F6C2.8891B85A@sixbell.com" class="" width="597" height="209" border="0"><o:p></o:p></p>
<p style="margin-left:106.2pt">UAS is
172.30.4.195:5061. UAC is 172.30.4.195:5080.
Kamailio is 192.168.253.4:5070<o:p></o:p></p>
<p style="margin-left:106.2pt">Difference between 180
and 200 is just about 50 microseconds.
<o:p></o:p></p>
<p style="margin-left:106.2pt">My guess is that both
messages are received by different instances of
Kamailio, and then because of context switches, even
though the 180 is received before, that process ends
after the processing of 200. However, I had the idea
that in order to avoid these problems the kamailio
processes synchronized with each other using a
shared memory. I tried using stateful proxy and I
obtained the same result.<o:p></o:p></p>
<p style="margin-left:106.2pt">By the way, anyone has
any idea about how Kamailio's share memory is
implemented? It clearly does not use the typical
system calls shmget(), shmat(), because they are not
shown by ipcs command.<o:p></o:p></p>
<p style="margin-left:106.2pt">Before posting here I
googled, but I couldn't find anything related to
this. I can't believe I am the only one who ever had
this problem, so I guess I am doing something
wrong...<o:p></o:p></p>
<p style="margin-left:106.2pt">Please, any help. I'm
really stuck on this.<o:p></o:p></p>
<p style="margin-left:106.2pt">Thanks.<o:p></o:p></p>
<pre style="margin-left:106.2pt">-- <o:p></o:p></pre>
</div>
</blockquote>
<p style="margin-left:70.8pt"> <o:p></o:p></p>
<pre style="margin-left:70.8pt">-- <o:p></o:p></pre>
<pre style="margin-left:70.8pt">Luis Rojas<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Software Architect<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Sixbell<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Los Leones 1200<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Providencia<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Santiago, Chile<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Phone: (+56-2) 22001288<o:p></o:p></pre>
<pre style="margin-left:70.8pt"><a href="mailto:luis.rojas@sixbell.com" moz-do-not-send="true">mailto:luis.rojas@sixbell.com</a><o:p></o:p></pre>
<pre style="margin-left:70.8pt"><a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.sixbell.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126785882&sdata=b3ZCPZYFoj3MK5yvYyC%2BmaA4TaX79XK6kMgcpKfKeHU%3D&reserved=0" originalsrc="http://www.sixbell.com/" shash="WJW+f+fsMJaznlRpjh8LSzh0O5b4d2K3WvrZiTM3Ol9d5r7Gv2Znpjrl/sz6FMaqu6cp+0xp2htXCHLDM/iGvyP3zCS4noajt1Bd+KJhXJRjzrZvBH2kVMiutTAWOQY+qGlU9FERD+4uIr4XNzcNYWazW+pggi7rfF7zKUguJFs=" moz-do-not-send="true">http://www.sixbell.com</a><o:p></o:p></pre>
</blockquote>
<p style="margin-left:35.4pt"><o:p> </o:p></p>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Luis Rojas<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Software Architect<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Sixbell<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Los Leones 1200<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Providencia<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Santiago, Chile<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Phone: (+56-2) 22001288<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="mailto:luis.rojas@sixbell.com" moz-do-not-send="true">mailto:luis.rojas@sixbell.com</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.sixbell.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126785882&sdata=b3ZCPZYFoj3MK5yvYyC%2BmaA4TaX79XK6kMgcpKfKeHU%3D&reserved=0" originalsrc="http://www.sixbell.com/" shash="WJW+f+fsMJaznlRpjh8LSzh0O5b4d2K3WvrZiTM3Ol9d5r7Gv2Znpjrl/sz6FMaqu6cp+0xp2htXCHLDM/iGvyP3zCS4noajt1Bd+KJhXJRjzrZvBH2kVMiutTAWOQY+qGlU9FERD+4uIr4XNzcNYWazW+pggi7rfF7zKUguJFs=" moz-do-not-send="true">http://www.sixbell.com</a><o:p></o:p></pre>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
<br>
<o:p></o:p></p>
<pre style="margin-left:35.4pt">_______________________________________________<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Kamailio (SER) - Users Mailing List<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126795873&sdata=vmweOGqIgIj9MuJ3zCFSoQF1AN9dXNk0fhqrZd3yeLk%3D&reserved=0" originalsrc="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" shash="ZdQhqgcJV1APqbvXbn0hQ0t4c1vu2uJhC8H4hdAmyJspmXKRU1ARvEaqgZcX2YQcMfbFpSp9Ka/NrEAswW6qa6QzAETJ7FWyNOKmcyu/qZISWKTGijlg9kFsDdJ+r/uMFY4jPKWlM5ZnW+OTaET7OBZbHt/dhJERJsuqrpdoKlM=" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Daniel-Constantin Mierla -- <a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126805873&sdata=HP7Zo8iF2agQH5hsn8MszA4yvqaBrEmWokb82inWai4%3D&reserved=0" originalsrc="http://www.asipto.com/" shash="I9gvMwipuy4nodYL5sw2+nrPZRTM/gBwcXPPnGf50tXloR41cYN0efhm9oV8ttrUhNC6TnXRHmtV3CP74r4QMAGGymTUc+8wjCtBEdsoqyweWitjQZvYlW85oBDsU2QAZgxYX9uaLfalTh1kge3bizb0Q5R7DXol0sBLKVa6yCo=" moz-do-not-send="true">www.asipto.com</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126805873&sdata=159tYP2tC5GVknpx0MQUcplE1Z7Kz3uGpyd%2Bl4ca3H0%3D&reserved=0" originalsrc="http://www.twitter.com/miconda" shash="zk7J4IbzDeTNBaJnT4A9ci9FUnqo96RkZKaH2+NPpZzcONFRI0mGjlNT/4U4Kf6xCs3yeOPYOgRvWAF22bI+L2QD1XpQLX+3rMHdFODgY1A9OV5wbtXtK+RJ8IEQ8N15WtkjT1QnEG+E8fpOY4XL2impNrMmmgFiN7qo9vubNLI=" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126815864&sdata=xv%2Brl%2FT1sdypV6jZgrSfQ2hcVBg6%2F1AAx1RKopW3c10%3D&reserved=0" originalsrc="http://www.linkedin.com/in/miconda" shash="EEt+q5zGzMD21Z1IDHNDNFzE1zrxVH4axhKwIg6VpJPsGLMuCRqjKzJirt8uhtjuoPsz9ZuKcWiCTw5YhUebEdUR2/0yg20q2j2YcsAZ0aCHobzzV8zN4Ft3TR48gcdXZB7JnhhEwNJ/zUVvTAXaYjLoeJO8Itug+CVOikp5t+E=" moz-do-not-send="true">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</blockquote>
<p style="margin-left:35.4pt"><o:p> </o:p></p>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Luis Rojas<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Software Architect<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Sixbell<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Los Leones 1200<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Providencia<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Santiago, Chile<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Phone: (+56-2) 22001288<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="mailto:luis.rojas@sixbell.com" moz-do-not-send="true">mailto:luis.rojas@sixbell.com</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.sixbell.com%2F&data=02%7C01%7C%7C0b0a85d5dffe4ac00ffe08d7dbfa3bd7%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637219740126825866&sdata=Eue1NN0hWvVc%2BECank%2F6ZomNe2YitlpGQtpCmmSWA6U%3D&reserved=0" originalsrc="http://www.sixbell.com/" shash="cSjfAHMUVTtZ3fDBQ76nT9xOYvD2cDh2ILc1sCOXTN8cfG3l2QXnuW7fdAo1xd2wLcb8IowU6pGZdYDFyP5sWhc4wi+JLy0fKFOdD4z33clFfX1w6UNlpUG/mbg7Q0icX2Q3l7fN4mFpsKD/J16T6vhY1qXkckS4vVnMpwu7LP8=" moz-do-not-send="true">http://www.sixbell.com</a><o:p></o:p></pre>
</div>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Luis Rojas
Software Architect
Sixbell
Los Leones 1200
Providencia
Santiago, Chile
Phone: (+56-2) 22001288
<a class="moz-txt-link-freetext" href="mailto:luis.rojas@sixbell.com">mailto:luis.rojas@sixbell.com</a>
<a class="moz-txt-link-freetext" href="http://www.sixbell.com">http://www.sixbell.com</a></pre>
</body>
</html>