[SR-Users] Kamailio propagates 180 and 200 OK OUT OF ORDER

Henning Westerholt hw at skalatan.de
Wed Apr 8 09:01:28 CEST 2020


Hello Luis,

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.

Can you elaborate why you think this re-ordering is a problem for you?

One idea to enforce some ordering would be to use the dialog module in combination with reply routes and the textops(x)  module.

About the shared memory question – Kamailio implement its own memory manager (private memory and shared memory pool).

Cheers,

Henning


--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Luis Rojas G.
Sent: Tuesday, April 7, 2020 10:43 PM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] Kamailio propagates 180 and 200 OK OUT OF ORDER


Good day,

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.

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 :

[cid:image001.png at 01D60D84.49317330]

UAS is 172.30.4.195:5061. UAC is 172.30.4.195:5080. Kamailio is 192.168.253.4:5070

Difference between 180 and 200 is just about 50 microseconds.

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.

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.

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...

Please, any help. I'm really stuck on this.

Thanks.

--

Luis Rojas

Software Architect

Sixbell

Los Leones 1200

Providencia

Santiago, Chile

Phone: (+56-2) 22001288

mailto:luis.rojas at sixbell.com

http://www.sixbell.com

--

Luis Rojas

Software Architect

Sixbell

Los Leones 1200

Providencia

Santiago, Chile

Phone: (+56-2) 22001288

mailto:luis.rojas at sixbell.com

http://www.sixbell.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200408/e85511ed/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 49792 bytes
Desc: image001.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200408/e85511ed/attachment.png>


More information about the sr-users mailing list