Hi,
I'm not an expert buy maybe this could work:
route{
if ( !mf_process_maxfwd_header("10") )
{
sl_send_reply("483","To Many Hops");
drop();
};
* if(is_method("OPTIONS")) {*
* sl_send_reply("200","Keepalive");*
* exit;*
* }*
ds_select_dst("1", "4");
forward(); #stateless forward
# t_relay(); #stateful relay
}
2017-04-19 18:40 GMT-03:00 SIP Tech <siptech(a)onereach.com>om>:
Hello, I have a simple Kamailio server built that acts
as a stateless load
balancer for incoming SIP calls. All kamailio does here is receive the
incoming call and route it round robin to a Freeswitch machine behind it.
All configuration in Kamailio is done in local config files including the
use of dispatcher.list. I have an external 3rd party partner sending my
Kamailio machine SIP options pings. Because my Kamailio sends all incoming
calls stateless to a FS machine behind it (round robin) the FS machines
behind Kamailio get the incoming ping requests and generate the 200 OK
reply back to kamailio. I would like the 3rd party to get a 200 OK for
pings directly from my Kamailio and not from freeswitch behing it.
I have the need to scale FS machines on the fly so I don't want FS
machines to be responsible for the sip options ping replies. I want
Kamailio itself to reply with a static 200 OK to incoming ping requests. I
have looked into nathelper and siputils options_reply to see if I could get
a simple static config to handle this 200 OK directly from Kamailio. I
cant get it to fully work as the incoming sip pings still hit freeswitch.
How can I configure this in the kamailio.cfg to get kamailio itself to
reply with a 200 OK to SIP Options Pings and NOT forward the ping request
to freeswitch?
Here is my current simple stateless LB config in kamailio that works great
for what it is and for what I need for loadbalancing incoming call requests.
route{
if ( !mf_process_maxfwd_header("10") )
{
sl_send_reply("483","To Many Hops");
drop();
};
ds_select_dst("1", "4");
forward(); #stateless forward
# t_relay(); #stateful relay
}
Here is a sample of what the incoming pings look like that hit Kamailio.
U 2017/04/19 21:21:00.89 192.168.168.168:5060 -> 172.31.31.31:5060
OPTIONS sip:172.31.31.31:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.168.168:5060;branch=z9hG.
Call-ID: 536f9b34c(a)192.168.168.168.
To: sip:ping@172.31.31.31.
From: <sip:ping@192.168.168.168>;tag=2b769f.
Max-Forwards: 70.
CSeq: 91160 OPTIONS.
Route: <sip:172.31.31.31:5060;lr>.
Using the above info what would a route look like in kamailio.cfg for this?
What specific modules need to be installed/enabled to make your suggested
route functional?
Thanks guys
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users