Re: Best approach for 2-node active-active Kamailio setup

Asmaa BOUDDYACH via sr-users <[email protected]> Thu, 9 Jul 2026 10:42:21 +0200
Newsgroups gmane.comp.voip.ser
Message-ID <CAFZyeg73mLXe-woSdR0wXKyn7+TKgkV46sX3-Xr7SD8RYyFL5w@mail.gmail.com>
--===============0699705281==
Content-Type: multipart/alternative; boundary="000000000000d3cf2f0656299ad1"

--000000000000d3cf2f0656299ad1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

=F0=9F=99=8F

Asma BOUDDYACH a r=C3=A9agi depuis Gmail
<https://www.google.com/gmail/about/?utm_source=3Dgmail-in-product&utm_medi=
um=3Det&utm_campaign=3Demojireactionemail#app>

Le jeu. 9 juil. 2026 =C3=A0 09:51, Benoit Panizzon <[email protected]>=
 a
=C3=A9crit :

> Hi Asma
>
> > I am currently deploying a Kamailio SBC infrastructure with 2 nodes, on=
e
> > per datacenter, and I would like to set them up in active-active mode.
>
> This was our intention too - we ran into several issues.
>
> Now we operate in a 'two independent node' set-up but one node can not
> take over active calls of the other fails. So it is OK if I want to do
> maintenance, so I can 'gracefully' take one node down by having it
> reject new calls but continue to process calls with have a toTag until
> no more calls are active.
>
> > I have no experience yet with multi-node Kamailio setups and I would li=
ke
> > to ask:
> >
> > 1. What is the recommended approach for a 2-node active-active Kamailio
> > deployment today?
>
> I can only tell the issues I ran into:
>
> Dialog Module is (my opinion) not quite fit for an active-active set-up
> when replicating via DMQ. Reason: There is always one node which
> initially processed the call which is the 'master' node for the entire
> dialogue - it is also the only one which will issue a 'BYE' to
> terminate a call if the default_timeout is reached.
>
> And I believe there is still what I believe is a bug: If the
> default_timeout timer fires on the 'slave' first, all the dialogue
> metadata is being deleted from memory (and possibly the backend
> database) so the master node never terminates the call, because it
> 'forgot' the dialogue.
>
> Also you would have to make sure you use hostnames in all headers and
> not ip addresses as the ip address is specific to one of your nodes and
> make sure the hostname resolves to both ip addresses of your
> active-active nodes.
>
> But then again - will your systems outside kamailio be re-sending a
> message to the other ip of that hostname if one does not react?
>
> We also use MySQL as DB backend for dialog and we keep getting
> 'orphaned' entries which are not being correctly removed after a
> dialogue ends (we have a mysql housekeeping script finding them an
> deleting them).
>
> > 2. What modules or mechanisms should I use to synchronize state between
> the
> > two nodes (calls, registrations, etc.)?
>
> DMQ
>
> > 3. Are there any known issues or limitations I should be aware of befor=
e
> > starting the configuration?
>
> Mentioned above.
>
> Also if anyone has a working active-active - active- failover-able
> set-up with dialog - I would be very interested on how they done it
> properly.
>
> Mit freundlichen Gr=C3=BCssen
>
> -Beno=C3=AEt Panizzon-
> --
> I m p r o W a r e   A G    -    Leiter Commerce Kunden
> ______________________________________________________
>
> Zurlindenstrasse 29             Tel  +41 61 826 93 00
> CH-4133 Pratteln                Fax  +41 61 826 93 01
> Schweiz                         Web  http://www.imp.ch
> ______________________________________________________
>


--=20

*Cordialement*

*Asmaa BOUDDYACH*

Team Leader PBC =E2=80=93 D=C3=A9ploiement- Exploitation- Coordination  =E2=
=80=93
Communications Unifi=C3=A9es

Ex=C3=A9cutive R=C3=A9seau SI et Services \ Services \ Ligne de services Vo=
ix

Communications unifi=C3=A9es et Relations clients

SFR Business

*T=C3=A9l. **+33 (0) 1 87 64 78 13*

[image: logos-signature-e-mail-sfrbusiness]

--=20





















This message and any of its attachments is intended
solely for the addresses and is confidential. If you receive this message=
=20
in
error, please delete it and immediately notify the sender. Any use not=20
in
accord with its purpose, any dissemination or disclosure, either whole=20
or
partial, is prohibited except formal approval. The internet cannot=20
guarantee
the integrity of this message. The INTELCIA Group shall (will)=20
not therefore be
liable for the message if modified.



=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=
=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94



Ce
message et toutes les pi=C3=A8ces jointes sont =C3=A9tablis =C3=A0 l'intent=
ion=20
exclusive de
ses destinataires et sont confidentiels. Si vous recevez ce=20
message par erreur,
merci de le d=C3=A9truire et d=E2=80=99en avertir imm=C3=A9diatement=20
l=E2=80=99exp=C3=A9diteur. Toute
utilisation de ce message non conforme =C3=A0 sa=20
destination, toute diffusion ou
toute publication, m=C3=AAme partielle, est=20
interdite, sauf autorisation expresse.
L=E2=80=99internet ne permettant pas=20
d=E2=80=99assurer l=E2=80=99int=C3=A9grit=C3=A9 de ce message, le groupe
INTELCIA d=C3=A9cline toute=20
responsabilit=C3=A9 au titre de ce message, dans l=E2=80=99hypoth=C3=A8se
o=C3=B9 il aurait =C3=A9t=C3=A9=20
modifi=C3=A9.






--000000000000d3cf2f0656299ad1
Content-Type: text/vnd.google.email-reaction+json; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

{
  "emoji": "=F0=9F=99=8F",
  "version": 1
}
--000000000000d3cf2f0656299ad1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div><p style=3D"font-size:50px;margin-top:0;margin-bottom:0">=F0=9F=99=8F<=
/p><p style=3D"margin-top:10px;margin-bottom:0">Asma BOUDDYACH a r=C3=A9agi=
 depuis <a href=3D"https://www.google.com/gmail/about/?utm_source=3Dgmail-i=
n-product&amp;utm_medium=3Det&amp;utm_campaign=3Demojireactionemail#app">Gm=
ail</a></p></div><br><div class=3D"gmail_quote gmail_quote_container"><div =
dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0jeu. 9 juil. 2026 =C3=A0=C2=A009:5=
1, Benoit Panizzon &lt;<a href=3D"mailto:[email protected]">benoit.pan=
[email protected]</a>&gt; a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">Hi Asma<br>
<br>
&gt; I am currently deploying a Kamailio SBC infrastructure with 2 nodes, o=
ne<br>
&gt; per datacenter, and I would like to set them up in active-active mode.=
<br>
<br>
This was our intention too - we ran into several issues.<br>
<br>
Now we operate in a &#39;two independent node&#39; set-up but one node can =
not<br>
take over active calls of the other fails. So it is OK if I want to do<br>
maintenance, so I can &#39;gracefully&#39; take one node down by having it<=
br>
reject new calls but continue to process calls with have a toTag until<br>
no more calls are active.<br>
<br>
&gt; I have no experience yet with multi-node Kamailio setups and I would l=
ike<br>
&gt; to ask:<br>
&gt; <br>
&gt; 1. What is the recommended approach for a 2-node active-active Kamaili=
o<br>
&gt; deployment today?<br>
<br>
I can only tell the issues I ran into:<br>
<br>
Dialog Module is (my opinion) not quite fit for an active-active set-up<br>
when replicating via DMQ. Reason: There is always one node which<br>
initially processed the call which is the &#39;master&#39; node for the ent=
ire<br>
dialogue - it is also the only one which will issue a &#39;BYE&#39; to<br>
terminate a call if the default_timeout is reached.<br>
<br>
And I believe there is still what I believe is a bug: If the<br>
default_timeout timer fires on the &#39;slave&#39; first, all the dialogue<=
br>
metadata is being deleted from memory (and possibly the backend<br>
database) so the master node never terminates the call, because it<br>
&#39;forgot&#39; the dialogue.<br>
<br>
Also you would have to make sure you use hostnames in all headers and<br>
not ip addresses as the ip address is specific to one of your nodes and<br>
make sure the hostname resolves to both ip addresses of your<br>
active-active nodes.<br>
<br>
But then again - will your systems outside kamailio be re-sending a<br>
message to the other ip of that hostname if one does not react?<br>
<br>
We also use MySQL as DB backend for dialog and we keep getting<br>
&#39;orphaned&#39; entries which are not being correctly removed after a<br=
>
dialogue ends (we have a mysql housekeeping script finding them an<br>
deleting them).<br>
<br>
&gt; 2. What modules or mechanisms should I use to synchronize state betwee=
n the<br>
&gt; two nodes (calls, registrations, etc.)?<br>
<br>
DMQ<br>
<br>
&gt; 3. Are there any known issues or limitations I should be aware of befo=
re<br>
&gt; starting the configuration?<br>
<br>
Mentioned above.<br>
<br>
Also if anyone has a working active-active - active- failover-able<br>
set-up with dialog - I would be very interested on how they done it<br>
properly.<br>
<br>
Mit freundlichen Gr=C3=BCssen<br>
<br>
-Beno=C3=AEt Panizzon-<br>
-- <br>
I m p r o W a r e=C2=A0 =C2=A0A G=C2=A0 =C2=A0 -=C2=A0 =C2=A0 Leiter Commer=
ce Kunden<br>
______________________________________________________<br>
<br>
Zurlindenstrasse 29=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Tel=C2=
=A0 +41 61 826 93 00<br>
CH-4133 Pratteln=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fax=
=C2=A0 +41 61 826 93 01<br>
Schweiz=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0Web=C2=A0 <a href=3D"http://www.imp.ch" rel=3D"nore=
ferrer" target=3D"_blank">http://www.imp.ch</a><br>
______________________________________________________<br>
</blockquote></div><div><br clear=3D"all"></div><div><br></div><span class=
=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s=
ignature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><p class=3D"M=
soNormal" style=3D"margin:0cm 0cm 0.0001pt;color:rgb(34,34,34);font-size:11=
pt;font-family:Calibri,sans-serif"><a name=3D"SignatureSanitizer_m_-4073345=
684613365890__MailAutoSig"><b><span style=3D"font-size:10pt;color:black">Co=
rdialement</span></b></a><span style=3D"font-size:10pt;color:black"></span>=
</p><p class=3D"MsoNormal" style=3D"margin:0cm 0cm 0.0001pt;color:rgb(34,34=
,34);font-size:11pt;font-family:Calibri,sans-serif"><b><span style=3D"font-=
size:10pt;color:black">Asmaa BOUDDYACH</span></b><span style=3D"font-size:1=
0pt;color:black"></span></p><p class=3D"MsoNormal" style=3D"margin:0cm 0cm =
0.0001pt;color:rgb(34,34,34);font-size:11pt;font-family:Calibri,sans-serif"=
><span style=3D"font-size:10pt;color:black">Team Leader PBC =E2=80=93 D=C3=
=A9ploiement- Exploitation- Coordination=C2=A0 =E2=80=93=C2=A0 Communicatio=
ns Unifi=C3=A9es</span></p><p class=3D"MsoNormal" style=3D"margin:0cm 0cm 0=
.0001pt;color:rgb(34,34,34);font-size:11pt;font-family:Calibri,sans-serif">=
<span style=3D"font-size:10pt;color:black">Ex=C3=A9cutive R=C3=A9seau SI et=
 Services \ Services \ Ligne de services Voix</span></p><p class=3D"MsoNorm=
al" style=3D"margin:0cm 0cm 0.0001pt;color:rgb(34,34,34);font-size:11pt;fon=
t-family:Calibri,sans-serif"><span style=3D"font-size:10pt;color:black">Com=
munications unifi=C3=A9es et Relations clients</span></p><p class=3D"MsoNor=
mal" style=3D"margin:0cm 0cm 0.0001pt;color:rgb(34,34,34);font-size:11pt;fo=
nt-family:Calibri,sans-serif"><span style=3D"font-size:10pt;color:black">SF=
R Business</span></p><p class=3D"MsoNormal" style=3D"margin:0cm 0cm 0.0001p=
t;color:rgb(34,34,34);font-size:11pt;font-family:Calibri,sans-serif"><b><sp=
an style=3D"font-size:10pt;color:black">T=C3=A9l.=C2=A0</span></b><b><span =
lang=3D"EN-US" style=3D"font-size:10pt">+33 (0) 1 87 64 78 13</span></b><sp=
an style=3D"font-size:10pt"></span></p><p class=3D"MsoNormal" style=3D"marg=
in:0cm 0cm 0.0001pt;color:rgb(34,34,34);font-size:11pt;font-family:Calibri,=
sans-serif"><img width=3D"555" height=3D"126" alt=3D"logos-signature-e-mail=
-sfrbusiness"></p></div></div>

<br>



















<p><span style=3D"font-size:11pt;font-family:Calibri,sans-serif;color:rgb(3=
1,73,125)" lang=3D"EN-US">This message and any of its attachments is intend=
ed
solely for the addresses and is confidential. If you receive this message i=
n
error, please delete it and immediately notify the sender. Any use not in
accord with its purpose, any dissemination or disclosure, either whole or
partial, is prohibited except formal approval. The internet cannot guarante=
e
the integrity of this message. The INTELCIA Group shall (will) not therefor=
e be
liable for the message if modified.</span><span></span></p>

<p><span style=3D"font-size:11pt;font-family:Calibri,sans-serif;color:rgb(3=
1,73,125)">=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=
=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94</s=
pan><span></span></p>

<p><span style=3D"font-size:11pt;font-family:Calibri,sans-serif;color:rgb(3=
1,73,125)">Ce
message et toutes les pi=C3=A8ces jointes sont =C3=A9tablis =C3=A0 l&#39;in=
tention exclusive de
ses destinataires et sont confidentiels. Si vous recevez ce message par err=
eur,
merci de le d=C3=A9truire et d=E2=80=99en avertir imm=C3=A9diatement l=E2=
=80=99exp=C3=A9diteur. Toute
utilisation de ce message non conforme =C3=A0 sa destination, toute diffusi=
on ou
toute publication, m=C3=AAme partielle, est interdite, sauf autorisation ex=
presse.
L=E2=80=99internet ne permettant pas d=E2=80=99assurer l=E2=80=99int=C3=A9g=
rit=C3=A9 de ce message, le groupe
INTELCIA d=C3=A9cline toute responsabilit=C3=A9 au titre de ce message, dan=
s l=E2=80=99hypoth=C3=A8se
o=C3=B9 il aurait =C3=A9t=C3=A9 modifi=C3=A9.</span><span></span></p>






--000000000000d3cf2f0656299ad1--

--===============0699705281==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!

--===============0699705281==--