<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">this looks somehow like a dialplan issue from Asterisk side:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#333333"><br>
<span style="background:#ECF3F7">when i dial 8100 to 8101 i get in my asteris -r</span><br>
<br>
<span style="background:#ECF3F7">NOTICE[8453][C-0000000b]: chan_sip.c:26002 handle_request_invite: Call from '8101' (</span></span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#333333;background:#ECF3F7"><a href="http://95.217.223.95:5060"><span lang="EN-GB">95.217.223.95:5060</span></a></span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#333333;background:#ECF3F7">)
 to extension '8100' rejected because extension not found in context 'none-dial'.</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#333333"><br>
<br>
<span style="background:#ECF3F7">and not able to call extension to extension,</span></span><span lang="EN-GB">  </span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">See if you find something in the net with the quoted error message. Maybe if the issue is more from Asterisk side, try with a simple example without the Kamailio and then adding the
 Kamailio again when its works from Asterisk side.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a>
</span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<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> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Usama Shaikh<br>
<b>Sent:</b> Monday, November 9, 2020 6:16 PM<br>
<b>To:</b> sr-users@lists.kamailio.org<br>
<b>Subject:</b> [SR-Users] Having trouble Setup Kamailio as a load balancer for Asterisk servers using module dispatcher<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black;background:#E1EBF2">Hello Everyone.</span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black"><br>
<br>
<span style="background:#E1EBF2">I am having trouble to setting up kamailio for load balancing for asterisk servers.</span><br>
<br>
<span style="background:#E1EBF2">I am using module dispatcher for load balancing AND two different servers for kamailio and asterisk.</span><br>
<br>
<span style="background:#E1EBF2">I am doing it first time and have not exact idea about its all configs… but i have researched and done so far, now need help from you guys. Currently, trying to setup with the one kamailio and one asterisk then will go ahead
 if I get any success…</span><br>
<span style="background:#E1EBF2">using MariaDB MySQL for the dispatcher data.</span><br>
<br>
<span style="background:#E1EBF2">Simply I want to do is :</span><br>
<br>
<span style="background:#E1EBF2">1. Register my asterisk devices with kamailioIP (and I am able to do this using below configs)</span><br>
<span style="background:#E1EBF2">Devices are getting register with the asterisk from with kamailioIP</span><br>
<br>
<span style="background:#E1EBF2">2. I want to receive calls on the registered devices with KamailioIP (and i am not able to do this)</span><br>
<br>
<span style="background:#E1EBF2">WORK FLOW:</span><br>
<br>
<span style="background:#E1EBF2">KAMAILIO IP = XX.XX.XX.95 on port 5060 and Asterisk IP = XX.XX.XX.164 on port 5060</span><br>
<br>
<span style="background:#E1EBF2">SIP Device(ZOIPER) -------->>>>KAMAILIO SERVER(device register/load balancer)--------->>> ASTERISK SERVER</span><br>
<br>
<span style="background:#E1EBF2">Please have a look into my configuration files and let me know if anything is missing or wrong in these. Or anything to add or remove from the confs…</span><br>
<br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black;background:#E1EBF2">my kamailio.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black"><br>
<br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[….]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black"><br>
<br>
<span style="background:#E1EBF2">“kamctl dispatcher dump” looks like this:</span><br>
<br>
<span style="background:#E1EBF2">{</span><br>
<span style="background:#E1EBF2">"jsonrpc": "2.0",</span><br>
<span style="background:#E1EBF2">"result": {</span><br>
<span style="background:#E1EBF2">"NRSETS": 1,</span><br>
<span style="background:#E1EBF2">"RECORDS": [{</span><br>
<span style="background:#E1EBF2">"SET": {</span><br>
<span style="background:#E1EBF2">"ID": 1,</span><br>
<span style="background:#E1EBF2">"TARGETS": [{</span><br>
<span style="background:#E1EBF2">"DEST": {</span><br>
<span style="background:#E1EBF2">"URI": "</span></span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black;background:#E1EBF2"><a href="sip:ASTERISKIP:5060"><span lang="EN-GB">sip:ASTERISKIP:5060</span></a></span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black;background:#E1EBF2">",</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black"><br>
<span style="background:#E1EBF2">"FLAGS": "AP",</span><br>
<span style="background:#E1EBF2">"PRIORITY": 1,</span><br>
<span style="background:#E1EBF2">"ATTRS": {</span><br>
<span style="background:#E1EBF2">"BODY": "rweight=50;weight=50;cc=1",</span><br>
<span style="background:#E1EBF2">"DUID": "",</span><br>
<span style="background:#E1EBF2">"MAXLOAD": 0,</span><br>
<span style="background:#E1EBF2">"WEIGHT": 50,</span><br>
<span style="background:#E1EBF2">"RWEIGHT": 50,</span><br>
<span style="background:#E1EBF2">"SOCKET": "",</span><br>
<span style="background:#E1EBF2">"SOCKNAME": "",</span><br>
<span style="background:#E1EBF2">"OBPROXY": ""</span><br>
<span style="background:#E1EBF2">}</span><br>
<span style="background:#E1EBF2">}</span><br>
<span style="background:#E1EBF2">}]</span><br>
<span style="background:#E1EBF2">}</span><br>
<span style="background:#E1EBF2">}]</span><br>
<span style="background:#E1EBF2">},</span><br>
<span style="background:#E1EBF2">"id": 13403</span><br>
<span style="background:#E1EBF2">}</span><br>
<br>
<span style="background:#E1EBF2">And also have set trunk in ASTERISK sip.conf</span><br>
<br>
<span style="background:#E1EBF2">register => kamailioSIP:XXXX@KamailioIP:5060</span><br>
<br>
<span style="background:#E1EBF2">[kamailio]</span><br>
<span style="background:#E1EBF2">type=friend</span><br>
<span style="background:#E1EBF2">host= KamailioIP</span><br>
<span style="background:#E1EBF2">port=5060</span><br>
<span style="background:#E1EBF2">transport=udp</span><br>
<span style="background:#E1EBF2">allow=all</span><br>
<span style="background:#E1EBF2">allow=gsm</span><br>
<span style="background:#E1EBF2">allow=alaw,ulaw</span><br>
<span style="background:#E1EBF2">insecure=invite,port</span><br>
<span style="background:#E1EBF2">Permit = </span></span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black;background:#E1EBF2"><a href="http://0.0.0.0/0.0.0.0"><span lang="EN-GB">0.0.0.0/0.0.0.0</span></a></span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black"><br>
<span style="background:#E1EBF2">sipdebug=yes</span><br>
<span style="background:#E1EBF2">username=kamailioSIP</span><br>
<span style="background:#E1EBF2">canreinvite=no</span><br>
<span style="background:#E1EBF2">secret=XXXX</span><br>
<span style="background:#E1EBF2">qualify=yes</span><br>
<span style="background:#E1EBF2">dtmfmode=auto</span></span><span lang="EN-GB"><o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#333333;background:#ECF3F7">when i Register my asterisk devices with kamailioIP (and I am able to do this)</span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#333333"><br>
<span style="background:#ECF3F7">Devices are getting register with the asterisk from with kamailioIP asterisk -r : (here 8101 and 8100 is registered with Kamailio IP )</span><br>
<br>
<span style="background:#ECF3F7">[Nov 9 10:36:02] -- Registered SIP '8101' at XX.XX.XX.95:5060</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:02] -- Unregistered SIP '8101'</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:03] -- Registered SIP '8101' at XX.XX.XX..95:5060</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:03] == Manager 'listencron' logged on from 127.0.0.1</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:04] == Manager 'sendcron' logged off from 127.0.0.1</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:07] -- Unregistered SIP '8100'</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:09] -- Registered SIP '8100' at XX.XX.XX..95:5060</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:09] > Saved useragent "Z 3.15.40006 rv2.8.20" for peer 8100</span><br>
<span style="background:#ECF3F7">[Nov 9 10:36:09] NOTICE[8453]: chan_sip.c:23869 handle_response_peerpoke: Peer '8100' is now</span><br>
<span style="background:#ECF3F7">Reachable. (51ms / 2000ms)</span><br>
<br>
<br>
<span style="background:#ECF3F7">when i dial 8100 to 8101 i get in my asteris -r</span><br>
<br>
<span style="background:#ECF3F7">NOTICE[8453][C-0000000b]: chan_sip.c:26002 handle_request_invite: Call from '8101' (<a href="http://95.217.223.95:5060">95.217.223.95:5060</a>) to extension '8100' rejected because extension not found in context 'none-dial'.</span><br>
<br>
<span style="background:#ECF3F7">and not able to call extension to extension,</span></span>  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:black"><br>
<br>
<span style="background:#E1EBF2">PLEASE HELP to do this, I have search a lot and tried so much of stuff in configs but no success still kindly guide me if anything I am missing to do in the process or anything I am doing wrong.</span><br>
<span style="background:#E1EBF2">I will be eagerly waiting for any help or pointer…</span><br>
<br>
<span style="background:#E1EBF2">Thanks in advance</span></span>  <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>