Hello,

I'm trying to setup kamailio as load  balancer  Behind that load balancer I've a registrar and a presence server.

When I start a client for the REGISTER and subscribe messages all looks to work fine. The messages from clients are properly balanced to the backend and responses are forwarded properly to the clients.

However when my presence server sends a NOTIFY I find the load balancer module answers 404 message to the presence server.
I'm thinking the problem is front-end kamailio cannot locate users.  I am quite newbie to use Kamailio for this purpose so sorry if what i'm saying contains a big mistake.

My load balancer script looks as following:

log_facility=LOG_LOCAL0

fork=yes
children=4

listen=10.1.1.63:6666
listen=10.1.1.63:5060
alias=dev.myenvironment.net

mpath="/usr/local/lib/kamailio/modules_k/:/usr/local/lib/kamailio/modules/"

loadmodule "xlog.so"



# ----------------- setting module-specific parameters ---------------

#!define WITH_DISP

#!ifdef WITH_DISP
loadmodule "dispatcher.so"
loadmodule "db_mysql.so"
#!endif



# ----- dispatcher -----
#!ifdef WITH_DISP
# Set database used for dispatcher servers. As we will use default values, no further
# information is needed
modparam("dispatcher", "db_url","mysql://openser:openserrw@10.1.1.50/openser")
#!endif

####### Routing Logic ########
route{
#!ifdef WITH_DISP
if( uri=~"sip:.*session=chat.*" ) {
        xlog("L_DEBUG", "PoC:relaying chat session by Request URI");
        ds_select_dst("1", "3");

        forward();
} else {
        xlog("L_DEBUG", "PoC:relaying PoC Session by round-robin");
        ds_select_dst("1", "4");
        forward();
}
#!else
xlog("L_DEBUG", "PoC: Relaying by hardcoded route");
t_relay("10.1.1.50", "6666");
#!endif
}
~

So the questions are: Does this module need to locate users? Should I include usrloc module iin that sip proxy node in order to be able to locate the users??

Thanks
Albert