<div dir="ltr"><div>Below is output from the dispatcher table, Set-2 is a pool of asterisk servers to be Load balanced, and Set-1 is the Telco IP.</div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="background-color:rgb(238,238,238)"><span style="font-family:monospace,monospace">KAMSBC01:~# kamctl dispatcher dump</span><br></span></div><div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">SET_NO:: 2</font></div><div><font face="monospace, monospace"><b style="background-color:rgb(238,238,238)">SET:: 2 </b></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">        URI:: sip:<a href="http://192.168.0.150:5050">192.168.0.150:5050</a> flags=AP priority=1 attrs=</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">        URI:: sip:<a href="http://192.168.0.151:5060">192.168.0.151:5060</a> flags=AP priority=1 attrs=<br></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">        URI:: sip:<a href="http://192.168.0.152:5070">192.168.0.152:5070</a> flags=AP priority=1 attrs=<br></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">        URI:: sip:<a href="http://192.168.0.153:5080">192.168.0.153:5080</a> flags=AP priority=1 attrs=<br></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">        URI:: sip:<a href="http://192.168.0.155:5090">192.168.0.155:5090</a> flags=AP priority=1 attrs=<br></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)"><b>SET:: 1</b></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">        URI:: sip:124.311.201.600:5060 flags=AP priority=1 attrs=</font></div></div><div><br></div><div>Now in my kamailio.cfg in relevant route</div><div><br></div><div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">if(<a href="http://kamailio.org/docs/modules/4.3.x/modules/dispatcher.html#dispatcher.f.ds_is_from_list">ds_is_from_list</a>("1")) {</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)" size="1">#Call from Telco Should goto Asterisk pool in Loadbalanced mode</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                 if(!ds_select_dst("2", "4")) {</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                        sl_send_reply("500", "Service Unavailable");</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                        xlog("L_INFO","[$fU@$si:$sp]{$rm} No destinations available for $rd \n");</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                        exit;</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                }</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">} else if (ds_is_from_list("2")) {</font></div></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)" size="1">#Call from Asterisk servers pool, send it to telco using LoadBalancer</font></div><div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                if(!ds_select_dst("1", "4")) {</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                        sl_send_reply("500", "Service Unavailable");</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                        xlog("L_INFO","[$fU@$si:$sp]{$rm} No destinations available for $rd \n");</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                        exit;</font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)">                }</font></div></div><div><span style="background-color:rgb(238,238,238)"><font face="monospace, monospace">}</font><br></span></div><div><br></div><div><br></div><div>So if your Telco has more than 1 IP you can do Load balancing.</div><div><br></div><div>I hope this solves your problem.</div><div><br></div><div><br></div><div>Best Regards,</div><div>Sammy</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 30, 2015 at 3:17 AM, Sandeep Chakravarthi <span dir="ltr"><<a href="mailto:ivschakravarthi@gmail.com" target="_blank">ivschakravarthi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Can you share the sample code to differentiate the both telco IP and our server IP?</div><div><br></div><div>.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">Warm Regards,<br>Sandeep Chakravarthi.</div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Tue, Jul 14, 2015 at 10:55 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sure but if you look into the dispatcher module there is a field called 'setid' or groupid. Use it wisely to differentiate between the Load Balanced asterisk pool and the Telco IP. <div>The dispatcher module is exactly what you should use. You can find out if incoming source IP belongs to a particular set in dispatcher table thus you can tell if call is coming from Telco or from your Asterisks.</div><div>You can select the dispatcher set for load balancing but if we only have one IP in there then it gets all the load.</div><div><br></div><div>BR,</div><div>Sammy</div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 14, 2015 at 1:21 PM, Sandeep Chakravarthi <span dir="ltr"><<a href="mailto:ivschakravarthi@gmail.com" target="_blank">ivschakravarthi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>Thanks for the immediate reply.</div><div><br></div><div>You are right ,using the dispatcher module , i am able to send the OPTIONS packet to MSC Telco.</div><div><br></div><div>But as i describer in  my earlier mail, i am using the same dispatcher module to establish the sip trunk  between my My Kamailio server and my Asterisk server.</div><div><br></div><div>There is a table in the database with the name dispatcher.</div><div>Now, in that table i have 2 records</div><div>one is my Telco SIP IP and the other is Asterisk PBX IP.</div><div><br></div><div>But as per my understanding from the google, dispatcher module is used for load balancing between the servers</div><div><br></div><div>Telco SIP server will be sending the calls to Kamailio and Kamailio has to distribute completely to Asterisk server instead of distributing the calls between Telco SIP IP and Asterisk.</div><div><br></div><div><br></div><div>Please help with it.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">Warm Regards,<br>Sandeep Chakravarthi.</div></div></div><div><div>
<br><div class="gmail_quote">On Tue, Jul 14, 2015 at 10:28 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>You're right about using IP Auth in Kamailio. You'll need to use the permissions module. However I believe permissions module wont send the OPTIONS to the MSC SIP Server. For this you may alternatively use the "dispatcher" module.</div><div><br></div><div>Take a look at the sample kamailio.cfg here: <a href="http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb" target="_blank">http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb</a></div><div><br></div><div>Follow the tag WITH_IPAUTH and I'm sure you'll be able to implement it easily.</div><div><br></div><div>BR,</div><div>Sammy</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jul 14, 2015 at 12:51 PM, Sandeep Chakravarthi <span dir="ltr"><<a href="mailto:ivschakravarthi@gmail.com" target="_blank">ivschakravarthi@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><br>
<div>Hi,</div><div>We have a requirement with one of our telco</div><div>We are using asterisk in our servers and we are planning to implement SIP-I protocol and we choosed kamailio for it.</div><div><br></div><div>In Kamailio website, i came to know that kamailio will be supporting both SIP-I and SIP-T protocols</div><div><br></div><div>Below is what we need and pls confirm whether it is possible or not?</div><div><br></div><div>Asterisk PBX <-------> Kamailio <--------> Telco MSC</div><div><br></div><div><br></div><div>Telco will be forwarding the calls to kamailio on sip-i protocol and kamailio server has to forward the calls to our Asterisk server by converting sip-i to standard sip protocol</div><div><br></div><div>Similiarly Asterisk will be initiating sip call to kamailio server and kamailio server should convert it into SIP-I and should forward the call to Telco MSC</div><div><br></div><div><br></div><div>1.  I am able to establish the SIP trunk [sending OPTIONS from asterisk and kamailio acknowledges with 200 OK] between Asterisk and Kamailio using dispatcher module in kamailio and sip.conf in asterisk.</div><div><br></div><div>How to establish the SIP trunk between kamailio and telco MSC?</div><div>[Generally MSC will act as SIP server and kamalio should send OPTIONS packet and MSC will acknowledges with 200 OK]<br></div><div><br></div><div><br></div><div>My telco MSC has only provided me the MSC SIP IP and there were no username/passwords provided.</div><div>Means i need to use IP based authentication for the SIP Trunk establishment.</div><div><br></div><div>In Kamailio how to achieve it?</div><div><br></div><div>Please help and any suggestions/feedback will be highly appreciated and thankful</div><div><br></div><div><br></div><div>Regards,</div><div>Sandeep</div></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>