[SR-Users] Shared location database used by independend kamailios

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 14 17:59:01 CEST 2015



On 14/04/15 17:11, Olle E. Johansson wrote:
> On 14 Apr 2015, at 17:06, Daniel Tryba <d.tryba at pocos.nl> wrote:
>
>> Is there an easy way to figure out on which server a uac is registered when 
>> using a shared database (modparam("usrloc", "db_mode", 3)).
>>
>> When uac1 is registered on server1 (dns srv loadbalancing) and uac2 is on 
>> server2. A call from uac1 to uac2 with a simple lookup("location") will result 
>> in server1 directly trying to connect to uac2. If this device is natted (or 
>> behind a stateful firewall) this will fail.
>>
>> In the location table the column socket contains the server which received the 
>> request. So if I know this value I can have server2 route the call to this 
>> value/server and have the call delivered to uac1 via an "existing connection".
>>
>> The idea was to use reg_fetch_contacts to fetch this/these socket values in 
>> $ulc and in case they are not local redirect/branch to those servers. But if 
>> the value of socket isn't local the $ulc for socket is null.
>>
>> I could use sqlops to fetch this manually, but is there an easier way I am 
>> missing?
>>
> Use the path header?
Upcoming major release has some embedded functionality for this case,
relying on path -- iirc, was added by Charles Chance:

-
http://kamailio.org/docs/modules/4.3.x/modules/registrar.html#registrar.p.path_check_local

Adding path can be done in config, then apply changes before doing save
location for register request.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com




More information about the sr-users mailing list