<div dir="ltr">Hi,<div><br></div><div>I'm not an expert buy maybe this could work:</div><div><br></div><div><span style="font-size:14px">route{</span><br style="font-size:14px"><span style="font-size:14px">        if ( !mf_process_maxfwd_header("10"</span><wbr style="font-size:14px"><span style="font-size:14px">) )</span><br style="font-size:14px"><span style="font-size:14px">        {</span><br style="font-size:14px"><span style="font-size:14px">                sl_send_reply("483","To Many Hops");</span><br style="font-size:14px"><span style="font-size:14px">                drop();</span><br style="font-size:14px"><span style="font-size:14px">        };</span><br></div><div><div>    <b>    if(is_method("OPTIONS")) {</b></div><div><b>                sl_send_reply("200","Keepalive");</b></div><div><b>                exit;</b></div><div><b>        }</b></div></div><div><div style="font-size:14px">        ds_select_dst("1", "4");</div><div style="font-size:14px">        forward();  #stateless forward<br>        # t_relay();  #stateful relay<br>}</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-19 18:40 GMT-03:00 SIP Tech <span dir="ltr"><<a href="mailto:siptech@onereach.com" target="_blank">siptech@onereach.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.  </div><div>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?</div><div><br></div><div>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.</div><div>route{<br>        if ( !mf_process_maxfwd_header("10"<wbr>) )<br>        {<br>                sl_send_reply("483","To Many Hops");<br>                drop();<br>        };<br>        ds_select_dst("1", "4");</div><div>        forward();  #stateless forward<br>        # t_relay();  #stateful relay<br>}</div><div><br></div><div>Here is a sample of what the incoming pings look like that hit Kamailio.</div><div>U 2017/04/19 21:21:00.89 <a href="http://192.168.168.168:5060" target="_blank">192.168.168.168:5060</a> -> <a href="http://172.31.31.31:5060" target="_blank">172.31.31.31:5060</a><br>OPTIONS sip:<a href="http://172.31.31.31:5060" target="_blank">172.31.31.31:5060</a> SIP/2.0.<br>Via: SIP/2.0/UDP 192.168.168.168:5060;branch=<wbr>z9hG.<br>Call-ID: <a href="mailto:536f9b34c@192.168.168.168" target="_blank">536f9b34c@192.168.168.168</a>.<br>To: <a href="mailto:sip%3Aping@172.31.31.31" target="_blank">sip:ping@172.31.31.31</a>.<br>From: <<a href="mailto:sip%3Aping@192.168.168.168" target="_blank">sip:ping@192.168.168.168</a>>;<wbr>tag=2b769f.<br>Max-Forwards: 70.<br>CSeq: 91160 OPTIONS.<br>Route: <sip:172.31.31.31:5060;lr>.</div><div><br></div><div>Using the above info what would a route look like in kamailio.cfg for this?</div><div>What specific modules need to be installed/enabled to make your suggested route functional?</div><div><br></div><div>Thanks guys<br></div></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>