Let's suppose that i have two machines with installed asterisk and one with kamailio. I would like have routing based on sip domain. for domain sip.domain1.com send sip signalling to asterisk#1 server and for sip.domain2.com send to asterisk#2 server. What i should use? Domain module or what ?
Tomasz
Depends on where you want the registration to be done. If you want it done on each asterisk independently, you can use load balancing. If you want it done in kamailio, you need multidomain and route accordingly. On Sun, Feb 26, 2017 at 6:33 PM przeqpiciel przeqpiciel@gmail.com wrote:
Let's suppose that i have two machines with installed asterisk and one with kamailio. I would like have routing based on sip domain. for domain sip.domain1.com send sip signalling to asterisk#1 server and for sip.domain2.com send to asterisk#2 server. What i should use? Domain module or what ?
Tomasz _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Sun, Feb 26, 2017 at 06:33:08PM +0100, przeqpiciel wrote:
Let's suppose that i have two machines with installed asterisk and one with kamailio. I would like have routing based on sip domain. for domain sip.domain1.com send sip signalling to asterisk#1 server and for sip.domain2.com send to asterisk#2 server. What i should use? Domain module or what ?
The low tech solution is to do something based on $rd:
if($rd=="sip.domain1.com") { $du="sip:1.2.3.4"; } else if(($rd=="sip.domain2.com") { $du="sip:2.3.4.5"; }
//RELAY
Thanm you for respond. I would like to have a farm of asterisks for one domain and few single asterisk for dedicated domains. So probably i have to check destination domain and after that if i found this domain in my DB then i could use dispatcher module. Am i right?
27.02.2017 6:35 PM "Daniel Tryba" d.tryba@pocos.nl napisał(a):
On Sun, Feb 26, 2017 at 06:33:08PM +0100, przeqpiciel wrote:
Let's suppose that i have two machines with installed asterisk and one
with
kamailio. I would like have routing based on sip domain. for domain sip.domain1.com send sip signalling to asterisk#1 server and for sip.domain2.com send to asterisk#2 server. What i should use? Domain
module
or what ?
The low tech solution is to do something based on $rd:
if($rd=="sip.domain1.com") { $du="sip:1.2.3.4"; } else if(($rd=="sip.domain2.com") { $du="sip:2.3.4.5"; }
//RELAY
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Mon, Feb 27, 2017 at 07:11:28PM +0100, przeqpiciel wrote:
Thanm you for respond. I would like to have a farm of asterisks for one domain and few single asterisk for dedicated domains. So probably i have to check destination domain and after that if i found this domain in my DB then i could use dispatcher module. Am i right?
Yes, the dispatcher module would apply as a solution, it essentially sets $du. Just set an avp based on domain and use that avp as a selector:
if(!ds_select_dst($avp(dispatcherid), $avp(dispatcheralgo))) { send_reply("404", "No dispatcher available"); exit; }