Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
UDP does not have any guaranteed state or order...
On Tue, Feb 5, 2019 at 4:44 AM Duarte Rocha duarterocha91@gmail.com wrote:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
We have dealt with this extensively, and the only way we know to fix it is to use the async features of Kamailio to, for example, slightly delay every reinvite, possibly informed by some state tracking/ordering of your own in htable.
On Tue, Feb 05, 2019 at 12:42:44PM +0000, Duarte Rocha wrote:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank you for your answer Alex.
Wheb you say you have dealt with this, do you mean this exact scenario with re-invites and ACK or just with general packets order?
I'll look into your solution, thank you.
Best Regards,
Duarte Rocha
Na(o) terça, 5/02/2019, 12:42, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
Yes, with reinvites appearing before, or exactly simultaneously to, the point at which the initial invite transaction is completed and the dialogue confirmed with an e2e ACK. These messages hit different worker threads and have somewhat unpredictable exit velocity, based on many stochastic factors.
— Sent from mobile, with due apologies for brevity and errors.
On Feb 5, 2019, at 12:55 PM, Duarte Rocha duarterocha91@gmail.com wrote:
Thank you for your answer Alex.
Wheb you say you have dealt with this, do you mean this exact scenario with re-invites and ACK or just with general packets order?
I'll look into your solution, thank you.
Best Regards,
Duarte Rocha
Na(o) terça, 5/02/2019, 12:42, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
if you want that all messages (requests or replies) within same dialog (sharing the same call-id) are processed in the order of receiving, then set the global parameter:
route_locks_size = 256
If you have more Kamailio processes, then set the value to be at least twice the number of processes.
Cheers, Daniel
On 05.02.19 13:42, Duarte Rocha wrote:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Daniel,
Thanks! I did not know this.
I think the reason I did not know it is that this is only documented in the devel core cookbook, and not in <= 5.2. :-)
On Tue, Feb 05, 2019 at 10:24:08PM +0100, Daniel-Constantin Mierla wrote:
Hello,
if you want that all messages (requests or replies) within same dialog (sharing the same call-id) are processed in the order of receiving, then set the global parameter:
route_locks_size = 256
If you have more Kamailio processes, then set the value to be at least twice the number of processes.
Cheers, Daniel
On 05.02.19 13:42, Duarte Rocha wrote:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in Washington, DC, USA -- www.asipto.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Yes, I noticed it was not documented, I added it in master recently, but didn't get the time to push it back being currently in a series of trips -- not sure in which release was introduced, likely 5.2, and, if older, I don't think before 5.1.
Hopefully there was a note about it in the wiki page with new features.
Cheers, Daniel
On 07.02.19 09:31, Alex Balashov wrote:
Daniel,
Thanks! I did not know this.
I think the reason I did not know it is that this is only documented in the devel core cookbook, and not in <= 5.2. :-)
On Tue, Feb 05, 2019 at 10:24:08PM +0100, Daniel-Constantin Mierla wrote:
Hello,
if you want that all messages (requests or replies) within same dialog (sharing the same call-id) are processed in the order of receiving, then set the global parameter:
route_locks_size = 256
If you have more Kamailio processes, then set the value to be at least twice the number of processes.
Cheers, Daniel
On 05.02.19 13:42, Duarte Rocha wrote:
Greetings,
I'm having some problems with keeping the order of the messages in Kamailio.
In some cases i'm receiving an ACK for the first INVITE and immediately after that a RE-INVITE is sent by the client. What is happening is that the the ACK took double the time of the RE-INVITE to process and as a consequence, the RE-INVITE was relayed before the ACK.
I have two questions :
1 - Is there a way to keep the order of the messages in a dialog, and if so, what are the downsides to it?
2 - The machine wasn't in a load state (only one concurrent call) and the ACK and the RE-INVITE should go roughly through the same processing methods and should take took the same time to be be relayed. What can be the reason for this?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in Washington, DC, USA -- www.asipto.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users