<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">Hello,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Well, not really. I could present to
the operator, for instance, three independent nodes running
Kamailio. If they need to send calls to our platform, they send to
any of them, and monitor their state with SIP OPTIONS. A call
that goes through that node will go just through the same node
until the end. No need to synchronize nodes. So, for the operator
we would have three nodes to send all the traffic to, instead of
the 8 nodes PER SITE we have now (for geographic redundancy
reasons), plus several ports in each server. 600.000 was the
worst scenario, with one site completely down, and failures at the
remaining site too. But I have to consider that case.<br>
<br>
Best regards,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Luis<br>
<br>
thOn 4/9/20 3:09 AM, Henning Westerholt wrote:<br>
</div>
<blockquote type="cite" cite="mid:VI1PR05MB459009C3C77036CC07B8ABFCC5C10@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",serif;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;}
span.E-MailFormatvorlage22
{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,<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">if you are designing for over 600.000
concurrent calls, you would probably like to look for a
distributed/clustered solution anyway, I guess. And this
will bring some more topics related to synchronisation and
race-conditions to think about.<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">Of course not knowing the details about the
scenario, but maybe it make sense to tackle this
race-condition problem in the client instead of trying to
fix it elsewhere. As already pointed out, you canβt control
the network transmission anyway, if you use UDP.<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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739041212&sdata=noOFwSRqzfcNoQ%2F83Gkp3vmvp0Q9aaliZ7LZHfe1hWQ%3D&reserved=0" originalsrc="https://skalatan.de/blog/" shash="pa3HLa6ixuTPDrz2u/DZqM4Gh1L0gjY9L26i7qvYO/4NNH5Oy4l0V8ZMXtH/D7sGHXq3SBKFpSfXN3OrzR8HchHUHHM06ZTHCnm9JFqNXbqOMvGU6cVg6ZwmbdRlGtfmSu7Q4Um/k7Sx4ZLxDpTPYUTadjLGkYCJuS7MKOUElXM=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739051207&sdata=XRnx7ZfE%2B8O5BygZvBW85IIkHRn%2FYJLcL%2FRd%2BDz3WFI%3D&reserved=0" originalsrc="https://gilawa.com/" shash="PHtTnw3UU1M1gHdH9Tqz9FZMRcjQbgmD1k1Ds6iEa5RgzFI5jZsd13lQ2g9gqjwI5tvEaLnJPpMBuiJN66kGN+SWtsx/MgWVhG46BkP+gQxaxFfKWx1IzMfIwRCD5fiJfEespDqKdUTVCvYSew9HOXIhKUbRl4t/1b4xBS562R4=" 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 11: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,<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">I looked into
that parameter, but I need to use with the dialog module,
and I'm pretty afraid to use that. I was looking more into
the stateless proxy, because I need to process a lot of
traffic.<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">My target is
4200CAPS. with duration between 90s and 210. Let's say, 150
seconds. That would mean 630.000 simultaneous dialogs. I
don't think the solution can go that way.<br>
<br>
it would really help me to be able to use completely
stateless proxy plus Async in reply_route(), to introduce an
artificial delay before forwarding 200 OK to Invite.. As
someone mentioned, it would help me on request_route(), for
race conditions between ACK and Re-Invite.<br>
<br>
Any idea why Async is not allowed in reply_route()?<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="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt">Luis<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">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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739051207&sdata=DddXcygCHxnvwnSKuhnXGHvqDXG4CNlQA6IqFO4wagc%3D&reserved=0" originalsrc="https://www.kamailio.org/wiki/cookbooks/devel/core#route_locks_size" shash="xPPkbnmMyt2ks4dwRAOVBwpdJAZPhVZIiRNzO7+Sos4O6zYGpFeb19d7reCIBoL9snUbvntaNFKv8vcytngBIbTVrXgrk1l4iBnnnqQ/0MuJ9XXr7bYvCPBQZMvJYaCU7Lvyxn6XZ4kz0YFumvhSWUCgjfAdWRn3HuM2OaXAfQc=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739061202&sdata=QR%2BEZ8xV2XnoswAZz1GfoqHto6PqKnox%2F15Mk1fjwek%3D&reserved=0" originalsrc="https://skalatan.de/blog/" shash="wTKwNmiVrHmfTvoo1lhphiOomGY/bJGUGEi6H3s0dexomM7zkP+BXdhqbJ58XczxDDL5UO5XsVij0lAD4RrWxp54Y2HoSiWC0xtJ6+OCB5LFYI7haWDfiBjsYxiAya2SSeskPc8E2r4kJevLgNwdMBo/AecT+Y2dXRTJ7+DMpSM=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739071195&sdata=3A3W3yHs%2FpAyCfUKgs9ryswCfWQu%2B2xAe0EM3IcFLn8%3D&reserved=0" originalsrc="https://gilawa.com/" shash="JnABhfi1xGYI+vCD8/aSkl6kER96ErEu4j4C0Fh9kkYn0gbn5qQjz05PMnk0g8v+jus4JnekWQYqDQGHbcPGkslbWvqmSzsNXfUrYW/NRptlzRSsRjDNzm1NWK6rInZ2+XQLkip8X0mp4s8m1xf/obPQ0zjz3cZ9SE1EzhchT90=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739071195&sdata=%2Fj6eShkeZlapKoyfaAPhxIZwGQ8RoImdltXzEIzqIEs%3D&reserved=0" originalsrc="https://tools.ietf.org/html/rfc5407#page-22" shash="dZaqmgvZYsPpjwqFasLK2E+ku1m4MP/6M45PDh+moGu30hp1HcXVGGfFiechCZyM+FJoSRyvJl2tfyaXF243EXanw2+2dIgog/tzSKuEK6SCSZI+cYV6ZjthTxlWnXxrlG12ovshTx2MbGe+EM9a+M4OWoL4MiaI8fiIoMmsKqU=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739081191&sdata=w8T%2FJkut%2FvGG3g2jK%2F6XAyzKu6QP46rJCLkjmfczpV4%3D&reserved=0" originalsrc="https://skalatan.de/blog/" shash="tUe9AgaJN5CFgpFV7Itkm8+dgXF0BNaqRvB1yKSBYIz8G+5gcNX1dNY0d9FWHYu05lfoHEmKc3WmoucGE0lVwafoNA2GL6nynCNXQbI2K57QMcoLyVfuVzGmXcAaA3HmwgtAEKRT6nowSftD5zTnpwegyyOnvZNm+07YAoK2Y1Q=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739091188&sdata=FrLs3XExO%2BUoh5ixtMGaWpm6lso%2F45Zsbpq%2FWEUYa5A%3D&reserved=0" originalsrc="https://gilawa.com/" shash="Je6zy7Qf0Ugs3klPgcyHJymhiMifw0j3IL8U4ZhEXxGSNsBzh47NOuFms/U0SkAwa2ojJTxOBPN12e09GAQmZBUe2vYDRBtVTyBT56E8be4WVC7tkm/9hS9Gbf1aZ0yzjiOadw/8hP0yGivEdZ9pPo8PQw9dXzCvnEPqcLYlllg=" 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:part14.3E5420DB.C5A9023E@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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739091188&sdata=oB2BgyU7I1EqpWPs6z09pMiZUAxIkvfYDbcDb6uAh%2BY%3D&reserved=0" originalsrc="http://www.sixbell.com/" shash="vswFZDzhtdpLzB2zje4PdCZbDs719jTshQiMDyyG7HLqvTYaeqUtuYmmCeEgV5XiZXhVS5iYUlc3wwU1Vas6S3lKH3cmqTg3DWqyxKnWMJWZlS4rRr/1XQrqFgvWslWd0ZuuoabEGE9BcXjGugjmdF8G3kJxCHiaWGCt9tcygY8=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739101183&sdata=%2FArsmA%2BuRW7%2FLWVTfe7XQroM%2BU%2F0HQKYYuWKRoeJto0%3D&reserved=0" originalsrc="http://www.sixbell.com/" shash="HcZRm8n8XrcUYbU5xjaAt3JEkJoJ/U+htiGxo7tni1+E1NwJZ3Vumh320g3zZcno/1XmMUXreP5NidxSMEdZ+p2NZnK4MOSYKwOvaBLq1RXyAqz737dBmTp/ol+e+Lz8dwP3U/pVT7jEEBN9Sj30UylQepMEa264HpoOFfbeUhQ=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739111175&sdata=aVVB3EICvrPwLjFr877TAqpjTpK6VQGWHyKdMj1yCDI%3D&reserved=0" originalsrc="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" shash="b8KuE8Gbi8XFGOfZO46vOQ8sRQOOGk2cXE2wnRqbagME7SJGiwCg1WR/kZtLTu2tCZKdddIDFJ6GoUCVzVFhcnKMnUNANFDdwg0bkeZM7dkT/duccT4gF0MzDEcW1ag1T7JVKMrVZL69Ue48FnmPXhLp3xAndHf6BkxiTH3Ks8E=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739111175&sdata=6uacysmal8nnS9LhBEL4nPGY0FvVhH0xxQhwyiyCn1Y%3D&reserved=0" originalsrc="http://www.asipto.com/" shash="WMZW0OMVbj++lXeDYqDTqZhtzz7OdCT2yHya3aw/JKg3Ky5hdbyv2foGAvu3O4V00WWJL+BmX+mEPXXbFN2gXzlc9QnfZuK03LsatqM+QQh4Ts9Ggzs4rUzkGRvyiWJNNttR3+/wb8cBJYNhikZjnjfOXc8tRReU21Gb1ytKHhk=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739121172&sdata=m%2F3GIMG5A4yPhcU8q65zoQlTi217NNNVBvOqEZ4ZHBI%3D&reserved=0" originalsrc="http://www.twitter.com/miconda" shash="t7sQENu4EUEM8DAIpGqO3E9krfFb5+C3mm7B7gphEyEMiQ6nwI3bleXjXohTWr0aCLBFR8UWiaEeoSzix/MI/5mHAgk8qLXrjyTk4+Jf9h535Z+9mp0HUFolEG+8FA00t09gxWjZLRvG8i0kU+3gKvIp4A0oaUCkgYDCTD7qrVc=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739121172&sdata=eb6gf5y1nXawrfFNWzL40je3u%2FUD1QFBSP%2F0Vo8jhqA%3D&reserved=0" originalsrc="http://www.linkedin.com/in/miconda" shash="IU855w0qKCzDpo5omu0aIX5Bj5emV1b5mH015J4Uh2DYbZY8RF5a01E5nU0+QWN0gcRcWMZqf6E107FBl+ZykbgZCcKw75S1Sxr97xXRb0ckSpju2nZum7o4ItdI0C7qcgeWbj1szQslp5a2E/HbWegqGOqap9tIlrwKek1VAXY=" 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%7C2ead63007ea446f9a1fd08d7dc54f223%7Cab4a33c2b5614f798601bc921698ad08%7C0%7C0%7C637220129739131167&sdata=2tI0YqY9NFmHEp%2BJ%2BBtQ%2FjJeCFq9AcYl2T%2BX8E3qaLg%3D&reserved=0" originalsrc="http://www.sixbell.com/" shash="DC37gzn34/HUWE+PZKywYh0YzxdTRplDlVdyFrmOdNUQ6IkI2vrUQb4JnkcDQZAC1pTkq5+i7gUKQdF5CY1R7WQNyJ0+DfR6i6LuFEocufmHgsJr7HlPKNiNLVs1PZ97zZRTGsG76+Y7OAYjoDnibC4mxdrOKm5FY0KWMolunhE=" 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>