Hi Daniel,

That's the path I'm on, just wanted to make sure I hadn't overlooked something obvious.

In a test environment, I have a SIP client registered to kamailio.  I also have kamailio registered with an ITSP using uac module, based on a UACReg record configured through Siremis.  Inbound calls are routing nicely, but I'm having trouble with outbound calls.

My ITSP account is challenging the outbound INVITE.  Configuring peering is an option, but I'm trying to understand the authentication case for my own satisfaction.

If I understand correctly, there are a number of approaches for outbound:

1.  Use another service as a gateway (asterisk, etc)
2.  Use lcr module
3.  Use carrierroute module
4.  Use manual routing in the config file

Some comments on these: 

1.  I understand that kamailio is not designed to be a B2BUA, I'm trying to use it as a proxy.  I prefer not to introduce another element.
2.  lcr module looks promising.  I got as far as loading a gateway from the database, but then hit the authentication problem described in 4. below.
3.  carrierroute module has been troublesome.  I'm using the APT package and found that carrierroute was not included.  After installing kamailio-carrierroute-modules, kamailio fails to start with a load_module error: undefined symbol cfg_set_error_function.

Similar trouble has been reported in relation to libconfuse.  This is installed and 'ldd carrierroute.so' does not report any missing dependencies.

4.  Since I'm using only a single outbound route (for now), I'm working on manual routing in the config file while I get the authentication working.

I have got as far as catching the 401 Unauth response from the ITSP to my INVITE, calling uac_auth() in the failure_route (see fragment below) and relaying.
The ITSP then returns 482 Merged Request in response to the INVITE that includes the auth header.  This occurs regardless of whether I call append_branch before relaying.
I have read a number of historical threads about the CSeq not being incremented and it makes sense to me in this context not to do so, but a different branch tag doesn't appear to be enough in this case for the server to treat it as a different request.

failure_route[1] {
if (t_check_status("401")) {
append_branch();
uac_auth();
}
t_relay();
}

    Incidentally, in order to create the Auth response, I had to hard code credentials into the config file with 
modparam("uac","credential","user:domain:password")
    Can these credentials be configured from Siremis?  I thought it might use the existing UACReg record, but that doesn't seem to be the case.

I'm happy to break out any of these into individual threads, but I've put them all together here to give you an idea of where I'm at.

Cheers,
Dave.

On 20 Sep 2013, at 4:37 am, sr-users-request@lists.sip-router.org wrote:


Hello,


On 9/19/13 9:59 AM, David Wilson wrote:
Hi All,

I have Kamailio 4.0.3 installed via APT onto Ubuntu 12.04 and have Siremis 4.0 installed and running nicely.

Is there an example config file that demonstrates how to use the features configurable through Siremis?

For example, when I populate a UACReg record via Siremis, I had to adapt the kamailio.cfg to use that information.  Similar adaptations are required for LCR or CR records and these are where I'm struggling; there is some routing code that is implied by the data structures, but the documentation for the corresponding modules doesn't provide an overall example.
siremis is the toolkit to manage the database records for most of the 
records. Building the logic to use the records from kamailio.cfg is a 
matter of requirements to implement.

The starting point is the readme for the module, there you can find 
details about parameters and function. The way to go is trying something 
by yourself based on readme and if you get stuck, then ask help here. 
Otherwise no one would be able to give hints or config parts to plug in 
an unknown environment.

Cheers,
Daniel