0

I'm still digging through documentation for Kamailio and its modules.

I've got several SIP accounts for different VoIP providers (login1:password1:sip.provider1.com, login2:password2:sip.provider2.com...)

I've got bunch of users connecting to my Kamailio. I'd like to route their calls via those providers (round-robin, random, lcr - doesn't matter in this case).

Which modules should I use?

The default pstn.gw_ip and pstn.gw_port allow to specify only single provider without password.

The LCR module seems like logical choice but I did not found a way to specify per-provider password.

This seems like a very common task so I'm probably missing something obvious.

god
  • 306
  • 1
  • 2
  • 12

1 Answers1

0

You should take a look at uac_auth kamailio module.

The documentation is there.

Mainly, you need to look at the uac_auth(..) method. This method is able to build and add an authentication header in a new request upon receiving 401 or 407!

AymericM
  • 1,645
  • 13
  • 13
  • That seems like what I need (at least for initial tests with single provider) however module documentation is very brief. Is there complete kamailio.cfg example available somewhere? I mean using uac for authenticating/registering with upstream sip server and for rewriting From/To headers accordingly? – god Nov 04 '15 at 14:46
  • It's true that the documentation is oriented towards people with already knowledge about kamailio. To replace From/To, you can use *uac_replace_from* and *uac_replace_to* in the uac_auth module. I'm sorry, I don't know any related kamailio.cfg example! – AymericM Nov 04 '15 at 18:21