<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hello!<br>
      <br>
      You chould use the is_from_gw()[1] function to detect if a message
      is coming from a gateway. So basically your code should look like
      this:<br>
      <br>
      if (method == "OPTIONS" &amp;&amp; is_from_gw()) {<br>
          sl_send_reply("200", "OK");<br>
          exit;<br>
      }<br>
      <br>
      [1]
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/drouting.html#id295343">http://www.opensips.org/html/docs/modules/1.11.x/drouting.html#id295343</a><br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 11/08/2016 10:05 AM, Sasmita Panda
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALf-Q45HsF3hPxv2mSe=cOsGA1iJ5RbFOL1RB75y0ozRN+=pmA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Hi All ,<br>
                <br>
              </div>
                      I am using opensips-1.11 . I have a requirement
              that when an "Option" request will come to my proxy from
              the gateways I have added in my dr_gateways table then
              only I will process the request and will send 200 OK .<br>
              <br>
            </div>
                 Previously , I was sending 200 Ok to all the Options
            requests , So I have written the config file like bellow .<br>
            <br>
            route{<br>
             if (method=="OPTIONS") {<br>
                            sl_send_reply("200", "OK");<br>
                            exit;<br>
                    }<br>
            .......................<br>
            ...............................<br>
          </div>
          route(1);<br>
          }<br>
          <br>
        </div>
        I have tried many possible ways but its not happening . What
        should I do to achieve my goal ? <br>
        <br clear="all">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div class="gmail_signature">
                      <div dir="ltr"><b><i>Thanks &amp; Regards</i></b>
                        <div><i>Sasmita Panda</i></div>
                        <div><i>Network Testing and Software Engineer</i></div>
                        <div><i>3CLogic , ph:07827611765</i></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>