<div dir="ltr"><br><div>Hello,</div><div><br></div><div>I've started playing with an idea to add multiple asterisk servers and using dispatcher to balance the sip load between them. I added the code according to dispatcher module documentation (<a href="http://www.kamailio.org/docs/modules/4.2.x/modules/dispatcher.html">http://www.kamailio.org/docs/modules/4.2.x/modules/dispatcher.html</a>), but I think there's something off in my setup: </div>
<div><br></div><div>kamctl ul output shows 2 AORs for one client: </div><div><br></div><div><div>AOR:: <a href="mailto:770@testers.com">770@testers.com</a></div><div><span class="" style="white-space:pre">          </span>Contact:: sip:770@2.2.2.2:64340;rinstance=c634da314e12385f;transport=UDP Q=</div>
<div><span class="" style="white-space:pre">                            </span>Expires:: 3221</div><div><span class="" style="white-space:pre">                             </span>Callid:: ZTE1MWYwYzM3NGNjNjMxMmEzM2JjYWNmNzQyZTdiNGI.</div><div><span class="" style="white-space:pre">                              </span>Cseq:: 2</div>
<div><span class="" style="white-space:pre">                            </span>User-agent:: Z 3.2.21357 r21367</div><div><span class="" style="white-space:pre">                            </span>State:: CS_SYNC</div><div><span class="" style="white-space:pre">                            </span>Flags:: 0</div>
<div><span class="" style="white-space:pre">                            </span>Cflag:: 0</div><div><span class="" style="white-space:pre">                          </span>Socket:: udp:<a href="http://1.1.1.1:5060">1.1.1.1:5060</a></div><div><span class="" style="white-space:pre">                          </span>Methods:: 5087</div>
<div><span class="" style="white-space:pre">                            </span>Ruid:: uloc-53bfe447-35ae-2a2</div><div><span class="" style="white-space:pre">                              </span>Reg-Id:: 0</div><div><span class="" style="white-space:pre">                         </span>Last-Keepalive:: 1405174150</div>
<div><span class="" style="white-space:pre">                            </span>Last-Modified:: 1405174150</div><div>AOR:: <a href="mailto:770@1.1.1.1">770@1.1.1.1</a></div><div><span class="" style="white-space:pre">          </span>Contact:: <a href="http://sip:770@1.1.1.1:5070">sip:770@1.1.1.1:5070</a> Q=</div>
<div><span class="" style="white-space:pre">                            </span>Expires:: 68</div><div><span class="" style="white-space:pre">                               </span>Callid:: <a href="mailto:327fcf07641f80006e962821112a61b5@testers.com">327fcf07641f80006e962821112a61b5@testers.com</a></div>
<div><span class="" style="white-space:pre">                            </span>Cseq:: 754</div><div><span class="" style="white-space:pre">                         </span>User-agent:: Asterisk PBX 11.10.2</div><div><span class="" style="white-space:pre">                          </span>State:: CS_SYNC</div>
<div><span class="" style="white-space:pre">                            </span>Flags:: 0</div><div><span class="" style="white-space:pre">                          </span>Cflag:: 0</div><div><span class="" style="white-space:pre">                          </span>Socket:: udp:<a href="http://1.1.1.1:5060">1.1.1.1:5060</a></div>
<div><span class="" style="white-space:pre">                            </span>Methods:: 4294967295</div><div><span class="" style="white-space:pre">                               </span>Ruid:: uloc-53bfe447-35af-a82</div><div><span class="" style="white-space:pre">                              </span>Reg-Id:: 0</div>
<div><span class="" style="white-space:pre">                            </span>Last-Keepalive:: 1405174477</div><div><span class="" style="white-space:pre">                                </span>Last-Modified:: 1405174477</div></div><div><br></div><div><br></div><div>I don't think I should be seeing an AOR for 770 where Contact is the public address of my server (here 1.1.1.1) and User-Agent which is Asterisk. </div>
<div><br></div><div>I'm using Asterisk Realtime integration, and by what I can tell the sip messages are going nicely, client authenticates with Kamailio and sends this message to Asterisk (which is on the same machine; Kamailio at 5060 and Asterisk at 5070): </div>
<div><br></div><div><div>1.1.1.1.sip > 1.1.1.1.vtsas: SIP, length: 374</div><div>        REGISTER sip:<a href="http://1.1.1.1:5070">1.1.1.1:5070</a> SIP/2.0</div><div>        Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bKbc8a.f4473947000000000000000000000000.0</div>
<div>        To: <<a href="mailto:sip%3A770@1.1.1.1">sip:770@1.1.1.1</a>></div><div>        From: <<a href="mailto:sip%3A770@1.1.1.1">sip:770@1.1.1.1</a>>;tag=4a9c3f1c98b9f1c5704acfd1770d93d2-d0c1</div><div>        CSeq: 10 REGISTER</div>
<div>        Call-ID: <a href="mailto:7ffa0191-13742@1.1.1.1">7ffa0191-13742@1.1.1.1</a></div><div>        Max-Forwards: 70</div><div>        Content-Length: 0</div><div>        Contact: <<a href="http://sip:770@1.1.1.1:5060">sip:770@1.1.1.1:5060</a>></div>
<div>        Expires: 3600</div></div><div><br></div><div><br></div><div>Currently I can make calls from 770 to 123 which is an Asterisk extension that answers, plays hello world and hangs up. However I can't call another sip clients when I route calls through Asterisk, they do work fine if I don't use Asterisk for handling calls, but I'd like Kamailio to be in the role of proxy/loadbalancer and Asterisk to handle calls. </div>
<div><br></div><div>My config is the simple default config, added with realtime stuff and then dispatcher according to the documentation. I wonder if there's something wrong in the REGISTER that Kamailio sends to Asterisk, or maybe something else going wrong?</div>
<div><br></div><div>Has anyone seen results like this and do you spot something here that needs fixing? </div><div><br></div><div>Thanks,</div><div>Olli</div><div><br></div><div><br></div><div><br></div><div><br></div></div>