[OpenSIPS-Users] Regarding Option request .

Răzvan Crainea razvan at opensips.org
Tue Nov 8 09:16:49 CET 2016


Hello!

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:

if (method == "OPTIONS" && is_from_gw()) {
     sl_send_reply("200", "OK");
     exit;
}

[1] http://www.opensips.org/html/docs/modules/1.11.x/drouting.html#id295343

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 11/08/2016 10:05 AM, Sasmita Panda wrote:
> Hi All ,
>
>         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 .
>
>      Previously , I was sending 200 Ok to all the Options requests , 
> So I have written the config file like bellow .
>
> route{
>  if (method=="OPTIONS") {
>                 sl_send_reply("200", "OK");
>                 exit;
>         }
> .......................
> ...............................
> route(1);
> }
>
> I have tried many possible ways but its not happening . What should I 
> do to achieve my goal ?
>
> */Thanks & Regards/*
> /Sasmita Panda/
> /Network Testing and Software Engineer/
> /3CLogic , ph:07827611765/
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161108/fb98a8bc/attachment.htm>


More information about the Users mailing list