Hi list,
I'm new here, also to Kamailio. My goal is to achieve the "standard solution": Kamailio for load balancing and high availability of several Asterisk servers.
For starters, I've set it up with Kamailio+dispatcher+permissions acting as a proxy and it was working fine, but I'd like to try to keep it much more simple. For these reasons:
1) I'd like to maintain different peer settings in Asterisk (DTMF, codecs).
2) I don't want/need a database for Kamailio. I think it is mandatory for permissions module + IP auth. So, let's do Asterisk the authentication, it's already there.
3) Accounting. I'm using a software where it's really useful for accounting purposes if every peer/user has its own entry in Asterisk's sip.conf / in realtime table.
Long story short, my config now looks like this and it seems to be working fine for me:
request_route { route(DISPATCHER); }
route[DISPATCHER] {
if ( method=="REGISTER") { ds_select_domain("1","4"); sl_send_reply("300","Redirect"); exit; }
if ( method=="INVITE" ) { ds_select_domain("1","4"); sl_send_reply("300","Redirect"); exit; }
if ( method=="SUBSCRIBE" ) { ds_select_domain("1","4"); sl_send_reply("300","Redirect"); exit; }
}
My questions:
1) There are other approaches to the DTMF+codecs issue. Like this thread from 2013: http://lists.kamailio.org/pipermail/sr-users/2013-January/076379.html - but I have dozens of changing PSTN peers, so authentication/accounting based on port would be cumbersome. Are there new/alternative ways?
2) I searched the archive and the Web but did not find many questions about a "I-don't-want-Kamailio-to-show-as-the-only-peer-to-Asterisk" solution. Therefore I'm wondering: Is everyone a) running such homogeneous setups that they can survive with the same codec + DTMF settings in Asterisk for all their peers + users? Or b) doing some rewriting magic within Kamailio to deal with it? Or c) I'm overlooking a simple solution. Which one is it? :)
3) And the biggest question: Everywhere I read basically "Redirect server for LB + HA is not recommended, better use proxy". Is this still true, and if so, what are the reasons? Because I should be worried that not all clients/gateways out there respect a SIP 300 Redirect? Other reasons?
Thanks so much! :) Markus