<div dir="ltr"><br><div>A little progress on this; the double-AOR problem was fixed; I had callbackextension field in the realtime table, which caused extra REGISTER messages to be sent from Asterisk to Kamailio and that messed the AORs for my clients. </div>

<div><br></div><div>Calling between the clients is a problem though, the INVITE gets routed correctly but for some reason, when the INVITE is returning from Asterisk to be routed to the called party, location lookup fails. I end up with 404 and no route to destination error. Any clues on to why location lookup would fail? </div>

<div><br></div><div>kamctl ul show gives correct looking output for both registered clients.</div><div><br></div><div>cheers,</div><div>Olli</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-12 17:27 GMT+03:00 Olli Heiskanen <span dir="ltr"><<a href="mailto:ohjelmistoarkkitehti@gmail.com" target="_blank">ohjelmistoarkkitehti@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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" target="_blank">770@testers.com</a></div><div><span style="white-space:pre-wrap">              </span>Contact:: sip:770@2.2.2.2:64340;rinstance=c634da314e12385f;transport=UDP Q=</div>

<div><span style="white-space:pre-wrap">                          </span>Expires:: 3221</div><div><span style="white-space:pre-wrap">                           </span>Callid:: ZTE1MWYwYzM3NGNjNjMxMmEzM2JjYWNmNzQyZTdiNGI.</div><div><span style="white-space:pre-wrap">                            </span>Cseq:: 2</div>

<div><span style="white-space:pre-wrap">                          </span>User-agent:: Z 3.2.21357 r21367</div><div><span style="white-space:pre-wrap">                          </span>State:: CS_SYNC</div><div><span style="white-space:pre-wrap">                          </span>Flags:: 0</div>

<div><span style="white-space:pre-wrap">                          </span>Cflag:: 0</div><div><span style="white-space:pre-wrap">                                </span>Socket:: udp:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a></div><div><span style="white-space:pre-wrap">                              </span>Methods:: 5087</div>

<div><span style="white-space:pre-wrap">                          </span>Ruid:: uloc-53bfe447-35ae-2a2</div><div><span style="white-space:pre-wrap">                            </span>Reg-Id:: 0</div><div><span style="white-space:pre-wrap">                               </span>Last-Keepalive:: 1405174150</div>

<div><span style="white-space:pre-wrap">                          </span>Last-Modified:: 1405174150</div><div>AOR:: <a href="mailto:770@1.1.1.1" target="_blank">770@1.1.1.1</a></div><div><span style="white-space:pre-wrap">              </span>Contact:: <a href="http://sip:770@1.1.1.1:5070" target="_blank">sip:770@1.1.1.1:5070</a> Q=</div>

<div><span style="white-space:pre-wrap">                          </span>Expires:: 68</div><div><span style="white-space:pre-wrap">                             </span>Callid:: <a href="mailto:327fcf07641f80006e962821112a61b5@testers.com" target="_blank">327fcf07641f80006e962821112a61b5@testers.com</a></div>

<div><span style="white-space:pre-wrap">                          </span>Cseq:: 754</div><div><span style="white-space:pre-wrap">                               </span>User-agent:: Asterisk PBX 11.10.2</div><div><span style="white-space:pre-wrap">                                </span>State:: CS_SYNC</div>

<div><span style="white-space:pre-wrap">                          </span>Flags:: 0</div><div><span style="white-space:pre-wrap">                                </span>Cflag:: 0</div><div><span style="white-space:pre-wrap">                                </span>Socket:: udp:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a></div>

<div><span style="white-space:pre-wrap">                          </span>Methods:: 4294967295</div><div><span style="white-space:pre-wrap">                             </span>Ruid:: uloc-53bfe447-35af-a82</div><div><span style="white-space:pre-wrap">                            </span>Reg-Id:: 0</div>

<div><span style="white-space:pre-wrap">                          </span>Last-Keepalive:: 1405174477</div><div><span style="white-space:pre-wrap">                              </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" target="_blank">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" target="_blank">sip:770@1.1.1.1</a>></div><div>        From: <<a href="mailto:sip%3A770@1.1.1.1" target="_blank">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" target="_blank">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" target="_blank">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>

</blockquote></div><br></div>