<div dir="ltr"><div dir="ltr">I will assume that you use Kamailio as SIP Proxy between a SIP Provider (TelCo) and your Asterisk boxes (using SIP.conf), and that Kamailio is receiving OPTIONS messages from TelCo, and forwarding those OPTIONS to Asterisk who will fail to answer.<div>This is a common implementation with TelCos.The solution is to set Kamailio to Reply to TelCo, adding following route:</div><div><br></div><div><div>route {</div><div>        # OPTIONS requests without a username in the Request-URI but one</div><div>        # of our domains or IPs are addressed to the proxy itself and</div><div>        # can be answered statelessly.</div><div>        if (is_method("OPTIONS")) </div><div>        {</div><div>                sl_send_reply("200","OK");</div><div>                exit;</div><div>        }</div></div><div>[.....]</div><div><br></div><div>It will then reply SIP 200 to TelCo.</div><div>Usually, Asterisk does not answer to SIP OPTION messages coming from TelCos (and thus acting like a SIP Agent) but it does send OPTIONS to SIP Agents and peers, which in turn will reply (I think it is set by the Qualify which pings the SIP peers). </div><div>So, in this case, Kamailio should be the one to reply to Telco's SIP OPTION request with a 200 OK response (if it replies 404 NOT FOUND the TelCo will then set your servers as OFFLINE and you won't receive calls or SIP messages anymore, just like it is happening to you in the present).</div><div><br></div><div>I think that Asterisk with PJSIP allows replies to OPTION messages, but I still haven't used PJSIP.....</div><div><br></div><div>Hope this helps.</div><div><div><div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-family:Arial,sans-serif">Sérgio Charrua</span></b><br></p><div><div dir="ltr"><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><img src="http://cdn.shopify.com/s/files/1/0380/5305/t/11/assets/logo.png?11469850511917603945" width="96" height="32"><b><span style="font-size:9pt;font-family:Arial,sans-serif"><br></span></b></p><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-size:9pt;font-family:Arial,sans-serif;color:red"><span style="color:rgb(0,0,0)"></span><span style="color:rgb(51,102,255)"><a href="http://www.voip.pt/" style="color:rgb(17,85,204)" target="_blank">www.voip.pt</a></span></span></b><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(136,136,136)"><br></span><span style="font-family:Arial,sans-serif">Tel.: <span style="color:rgb(51,102,153)"><a href="callto:+351+91+104+12+66" style="color:rgb(51,102,153);text-decoration:none" target="_blank">+351 </a>21 130 71 77<br></span></span><span style="font-family:"Times New Roman",serif"></span></span></p><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(187,187,187)"><span style="color:rgb(128,128,128)">Email : <strong><a href="mailto:sergio.charrua@voip.pt" style="color:rgb(17,85,204)" target="_blank">sergio.charrua@voip.pt</a></strong></span><br></span></span></p><table border="0" cellspacing="0" cellpadding="0" width="650" style="width:487.5pt">
 <tbody><tr>
  <td style="padding:0cm">
  <p class="MsoNormal"><span lang="EN-US" style="font-family:"Vodafone Rg";color:rgb(204,204,204)">This message
  and any files or documents attached are strictly confidential or otherwise
  legally protected. </span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Vodafone Rg";color:rgb(204,204,204)">It is intended only for the individual or entity named. If
  you are not the named addressee or have received this email in error, please
  inform the sender immediately, delete it from your system and do not copy or
  disclose it or its contents or use it for any purpose. Please also note that
  transmission cannot be guaranteed to be secure or error-free. </span><span lang="EN-US" style="font-family:"Times New Roman",serif"><span></span></span></p>
  </td>
 </tr>
</tbody></table><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)">

<span style="font-family:"Times New Roman",serif"></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"> </p></div></div><div style="font-size:small"><br><br></div></div></div></div></div></div></div></div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 11, 2020 at 8:00 PM Joel Serrano <<a href="mailto:joel@textplus.com">joel@textplus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">You can also set 404 as a valid response to the OPTIONS in Kam.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 11, 2020 at 05:36 Barry Flanagan <<a href="mailto:barry@flanagan.ie" target="_blank">barry@flanagan.ie</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <div>On 11/12/2020 13:23, Mihai Cezar wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Hello, You right, i've found something, seems that the
          kamailio-probe it puts the destination down. Any ideas why
          it's doing this ?</div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>"OPTIONS-Request was finished with code 404"</p>
    <p>The OPTIONS returns a 404. You need to put something into your
      default context in Asterisk so it returns 200. If your default
      context is "default" then this would work in extensions.conf:</p>
    <p><i>[default]</i></p>
    <p><i>exten => s,1,Hangup()</i></p>
    <p>Then do a "dialplan reload" in asterisk.<br>
    </p>
    <p>Hope this helps<br>
    </p>
    <p>-Barry Flanagan<br>
    </p></div><div>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>: ds_run_route(): ds_run_route
          event_route[dispatcher:dst-down<br>
          : ds_run_route(): route does not exist 8(24491) DEBUG: {2 10
          OPTIONS <a href="mailto:3afe874f6d71811b-24504@127.0.0.1" target="_blank">3afe874f6d71811b-24504@127.0.0.1</a>}
          dispatcher<br>
          : ds_options_callback(): OPTIONS-Request was finished with
          code 404 (to <a>sip:10.1.2.2;transport=udp</a>, group 1)<br>
          : ds_update_state(): update state for
          <a>sip:10.1.2.2;transport=udp</a> in group 1 to 10<br>
          : ds_update_state(): destination did not replied 10 times,
          threshold 10<br>
          : ds_update_state(): deactivate destination, threshold 10
          reached<br>
          : ds_run_route(): ds_run_route event_route[dispatcher:dst-down<br>
          : ds_run_route(): route does not exist 8(24491) DEBUG: {2 10
          OPTIONS <a href="mailto:3afe874f6d71811c-24504@127.0.0.1" target="_blank">3afe874f6d71811c-24504@127.0.0.1</a>}
          dispatcher [dispatch.c:2805<br>
          : ds_manage_routes(): set 1</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Dec 10, 2020 at 11:53
          AM Володимир Іванець <<a href="mailto:volodyaivanets@gmail.com" target="_blank">volodyaivanets@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">Hello,
            <div><br>
            </div>
            <div>Can you see some warnings or errors in the Kamailio log
              file? If no, try to increase the verbosity level.</div>
            <div><br>
            </div>
            <div>Also, how does the third REGISTER compares to the first
              or second one?</div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">чт, 10 груд. 2020 о 09:08
              Mihai <<a href="mailto:m@mokalife.ro" target="_blank">m@mokalife.ro</a>> пише:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
              <div dir="ltr">
                <div>Hi, <br>
                </div>
                <div><br>
                </div>
                <div>I am forwarding all the traffic to my asterisk
                  server ( including registers)</div>
                <div>everything seems to work when i first register but
                  if stay idle 2-3 minute it gets unregistered and then
                  i can't register back unless i restart kamailio</div>
                <div>see attached print screen<br>
                </div>
              </div>
              _______________________________________________<br>
              Kamailio (SER) - Users Mailing List<br>
              <a href="mailto:sr-users@lists.kamailio.org" target="_blank">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/cgi-bin/mailman/listinfo/sr-users</a><br>
            </blockquote>
          </div>
          _______________________________________________<br>
          Kamailio (SER) - Users Mailing List<br>
          <a href="mailto:sr-users@lists.kamailio.org" target="_blank">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/cgi-bin/mailman/listinfo/sr-users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
-Barry</pre>
  </div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">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/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">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/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>