Sipsak or other tool pointing via Contact header to Kamailio is still an option, but you can use directly uac module -- you have to set the details for remote registrations inside uac_reg database table and configure uac module, some details also at:

  - https://kamailio.org/docs/modules/5.0.x/modules/uac.html#idp38102932

Cheers,
Daniel


On 14.06.17 18:17, Jean Cérien wrote:

Thanks, I went for the permission + dispatcher, and so far it looks good.

One last thing.... I need the kamailio server to explicitly register to a provider. Googling the archive, I could only find an old reference to use sipsak. Does that mean that sipsak (or any other sip crafting tool like sipsak) should send a register request to Kamailio, which in turn will forward it to the voip provider ?

Here is the message: https://lists.kamailio.org/pipermail/sr-users/2004-November/041304.html

Rgds
J


On Tue, Jun 13, 2017 at 3:01 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:

Hello,

I typically blend several modules to achieve your routing needs:

  - permissions module with address table to detect if calls are coming from providers or asterisk farm

  - based on result use load balancer to send out to asterisk farm

  - or use pdt (if each provider has one gateway) or mtree+dispatcher (mtree to translate from a prefix to a dispatcher set id of the provider with many gateways) to send out to providers

If least cost routing is needed towards providers, then you can decide to use one of next modules:

   - lcr

   - carrierroute

   - drouting

Cheers,
Daniel


On 12.06.17 21:21, Jean Cérien wrote:

Hello

I am looking at the following configuration: 

1/ voip providers, with different external sip servers, will send calls to kamailio, that will dispatch them to asterisk servers, with load balancing & failover. The IP of the asterisk servers are known and fixed.

2/ the asterisk servers will also place calls, going through kamailio, that will dispatch them to the voip provider sip servers, based on R-URI / Prefix.

I've achieved #1 with dispatcher module, I've seen carrierroute module that can achieve #2, but I dont really grasp how to put the two together.

I have the feeling that #1 can also be done with carrierroute, and that I only need to check if the 'from' domain is one my asterisk, and chose a different routing table, but I dont see how to do that

is that a valid approch ? where should I look to do that ?

thanks

J.


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com