<div dir="ltr">you can set the DB as Master-Master, and add a virtual IP for the DB Cluster. Point your Asterisk boxes to connect to that VIP, and you're good to go.<div><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-family:Arial,sans-serif">Sérgio Charrua</span></b><br></p><div><div dir="ltr"><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><img src="http://cdn.shopify.com/s/files/1/0380/5305/t/11/assets/logo.png?11469850511917603945" width="96" height="32"><b><span style="font-size:9pt;font-family:Arial,sans-serif"><br></span></b></p><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-size:9pt;font-family:Arial,sans-serif;color:red"><span style="color:rgb(0,0,0)"></span><span style="color:rgb(51,102,255)"><a href="http://www.voip.pt/" style="color:rgb(17,85,204)" target="_blank">www.voip.pt</a></span></span></b><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(136,136,136)"><br></span><span style="font-family:Arial,sans-serif">Tel.: <span style="color:rgb(51,102,153)"><a href="callto:+351+91+104+12+66" style="color:rgb(51,102,153);text-decoration:none" target="_blank">+351 </a>21 130 71 77<br></span></span><span style="font-family:"Times New Roman",serif"></span></span></p><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(187,187,187)"><span style="color:rgb(128,128,128)">Email : <strong><a href="mailto:sergio.charrua@voip.pt" style="color:rgb(17,85,204)" target="_blank">sergio.charrua@voip.pt</a></strong></span><br></span></span></p><table border="0" cellspacing="0" cellpadding="0" width="650" style="width:487.5pt">
 <tbody><tr>
  <td style="padding:0cm">
  <p class="MsoNormal"><span lang="EN-US" style="font-family:"Vodafone Rg";color:rgb(204,204,204)">This message
  and any files or documents attached are strictly confidential or otherwise
  legally protected. </span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Vodafone Rg";color:rgb(204,204,204)">It is intended only for the individual or entity named. If
  you are not the named addressee or have received this email in error, please
  inform the sender immediately, delete it from your system and do not copy or
  disclose it or its contents or use it for any purpose. Please also note that
  transmission cannot be guaranteed to be secure or error-free. </span><span lang="EN-US" style="font-family:"Times New Roman",serif"><span></span></span></p>
  </td>
 </tr>
</tbody></table><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)">

<span style="font-family:"Times New Roman",serif"></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"> </p></div></div><div style="font-size:small"><br><br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 22, 2020 at 1:22 PM Aristeidis Tsitras <<a href="mailto:tsitras@gmail.com">tsitras@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">So, in order to have it working i need 2 realtime asterisk that are in a master-slave setup and have users created in both. Am i correct?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Στις Τετ, 22 Ιουλ 2020, 11:36 ο χρήστης Sergio Charrua <<a href="mailto:sergio.charrua@voip.pt" target="_blank">sergio.charrua@voip.pt</a>> έγραψε:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Try to install SNGREP command line application. It greatly helped me to understand what was going on in kamailio. <div>Install it in your Kamailio server, and run it. You will then be able to see and understand all SIP requests and responses.</div><div><br></div><div>Also, as Daniel said, the SIP requests between client->kamailio->asterisk must be kept the same at all times when trying to register. Additionally, install Asterisk with Realtime module, and share the same SIP users across your asterisk boxes, by the means of a DB. This is the best approach.</div><div><br></div><div>Hope this helps,</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-family:Arial,sans-serif">Sérgio Charrua</span></b><br></p><div><div dir="ltr"><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><img src="http://cdn.shopify.com/s/files/1/0380/5305/t/11/assets/logo.png?11469850511917603945" width="96" height="32"><b><span style="font-size:9pt;font-family:Arial,sans-serif"><br></span></b></p><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-size:9pt;font-family:Arial,sans-serif;color:red"><span style="color:rgb(0,0,0)"></span><span style="color:rgb(51,102,255)"><a href="http://www.voip.pt/" style="color:rgb(17,85,204)" rel="noreferrer" target="_blank">www.voip.pt</a></span></span></b><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(136,136,136)"><br></span><span style="font-family:Arial,sans-serif">Tel.: <span style="color:rgb(51,102,153)"><a href="callto:+351+91+104+12+66" style="color:rgb(51,102,153);text-decoration:none" rel="noreferrer" target="_blank">+351 </a>21 130 71 77<br></span></span><span style="font-family:"Times New Roman",serif"></span></span></p><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(187,187,187)"><span style="color:rgb(128,128,128)">Email : <strong><a href="mailto:sergio.charrua@voip.pt" style="color:rgb(17,85,204)" rel="noreferrer" target="_blank">sergio.charrua@voip.pt</a></strong></span><br></span></span></p><table border="0" cellspacing="0" cellpadding="0" width="650" style="width:487.5pt">
 <tbody><tr>
  <td style="padding:0cm">
  <p class="MsoNormal"><span lang="EN-US" style="font-family:"Vodafone Rg";color:rgb(204,204,204)">This message
  and any files or documents attached are strictly confidential or otherwise
  legally protected. </span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Vodafone Rg";color:rgb(204,204,204)">It is intended only for the individual or entity named. If
  you are not the named addressee or have received this email in error, please
  inform the sender immediately, delete it from your system and do not copy or
  disclose it or its contents or use it for any purpose. Please also note that
  transmission cannot be guaranteed to be secure or error-free. </span><span lang="EN-US" style="font-family:"Times New Roman",serif"><span></span></span></p>
  </td>
 </tr>
</tbody></table><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)">

<span style="font-family:"Times New Roman",serif"></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"> </p></div></div><div style="font-size:small"><br><br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 22, 2020 at 6:19 AM Aristeidis Tsitras <<a href="mailto:tsitras@gmail.com" rel="noreferrer" target="_blank">tsitras@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other.</div><div>here is the console error:</div><div><font size="1"><i><b><--- Transmitting (NAT) to <a href="http://192.168.0.99:5060" rel="noreferrer" target="_blank">192.168.0.99:5060</a> ---><br><span style="background-color:rgb(255,255,0)"><span style="color:rgb(0,0,0)">SIP/2.0 401 Unauthorized</span></span><br>Via: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060<br>Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060<br>From: <<a href="mailto:sip%3A500@192.168.0.99" rel="noreferrer" target="_blank">sip:500@192.168.0.99</a>>;tag=580308996<br>To: <<a href="mailto:sip%3A500@192.168.0.99" rel="noreferrer" target="_blank">sip:500@192.168.0.99</a>>;tag=as4657cc95<br>Call-ID: 822746835-5060-1@BJC.BGI.B.BBH<br>CSeq: 2005 REGISTER<br>Server: Asterisk PBX 11.25.3<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE<br>Supported: replaces, timer<br>WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=true<br>Content-Length: 0</b></i></font><br></div><div><br></div><div><br></div><div><br></div><div>On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other.</div><div>This is really odd.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga <<a href="mailto:jurijs.ivolga@gmail.com" rel="noreferrer" target="_blank">jurijs.ivolga@gmail.com</a>> έγραψε:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Ah,</div><div><br></div><div>I see the problem, just change list file in following way:</div><div><br></div><div>
1 sip:<a href="http://192.168.0.100:5080" rel="noreferrer" target="_blank">192.168.0.100:5080</a> 0 0 maxload=20<br>1 sip:<a href="http://192.168.0.101:5080" rel="noreferrer" target="_blank">192.168.0.101:5080</a> 0 0 maxload=20

</div><div><br></div><div><div><div dir="ltr"><div dir="ltr">Jurijs<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga <<a href="mailto:jurijs.ivolga@gmail.com" rel="noreferrer" target="_blank">jurijs.ivolga@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Aristedis,</div><div><br></div><div>Sorry, indeed you have module parameters.</div><div><br></div><div>When one asterisk is down what you see when you run:</div><div><br></div><div>kamcmd dispatcher.list</div><div><br></div><div><div><div dir="ltr"><div dir="ltr">Jurijs<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras <<a href="mailto:tsitras@gmail.com" rel="noreferrer" target="_blank">tsitras@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div>i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached. <br></div><div><br></div><div>Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.</div><div><br></div><div><br></div>

</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov <<a href="mailto:arsperger@gmail.com" rel="noreferrer" target="_blank">arsperger@gmail.com</a>> έγραψε:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Aristeidis,</div>David is right, first would be good to check the status of the destinations.<br><br>In your configuration there are couple of things to have in mind: need to set correct flag param <br><a href="https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p.flags" rel="noreferrer" target="_blank">https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p.flags</a><br>select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. <div>You can find the examples in the module doc.<div><br>Cheers,<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras <<a href="mailto:tsitras@gmail.com" rel="noreferrer" target="_blank">tsitras@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if <u><b>some </b></u>of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones. <br></div><div><br></div><div>I am attaching the kamailio.cfg. My dispatch list is:</div><div>1 sip:<a href="http://192.168.0.100:5080" rel="noreferrer" target="_blank">192.168.0.100:5080</a> 0 0 maxload=20<br>2 sip:<a href="http://192.168.0.101:5080" rel="noreferrer" target="_blank">192.168.0.101:5080</a> 0 0 maxload=20</div><div><br></div><div>In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.</div><div><br></div><div>I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers. <br></div><div><br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Arsen Semenov<br></div><div><br></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>