[SR-Users] Limiting Kamailios accepted methods

Gholamreza Sabery gr.sabery at gmail.com
Thu Apr 12 16:58:14 CEST 2018


Dear Grant

Thank you very much!

On Thu, Apr 12, 2018 at 6:00 PM, Grant Bagdasarian <gb at cm.nl> wrote:

> Hi,
>
>
>
> We use the is_method function to enforce this. You can specify multiple
> method names in the function arguments.
>
> For instance:
>
>
>
> if(is_method("SUBSCRIBE|NOTIFY|PUBLISH|INFO|MESSAGE")) {
>
>         sl_send_reply("405", "Method Not Allowed");
>
>         exit;
>
>     }
>
>
>
> Regards,
>
>
>
> Grant Bagdasarian
>
> Senior Developer
>
> +31765727054
>
> cm.com
>
>
>
> *From:* sr-users <sr-users-bounces at lists.kamailio.org> * On Behalf Of *Gholamreza
> Sabery
> *Sent:* donderdag 12 april 2018 14:47
> *To:* Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
> *Subject:* [SR-Users] Limiting Kamailios accepted methods
>
>
>
> Hi,
>
> I want to limit Kamailios accepted methods to REGISTER, INVITE and their
> related methods like BYE and CANCEL. How to do this in Kamailio? Is there a
> standard way or I should use is_method function?
>
> Regards
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180412/f29914fa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 4971 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180412/f29914fa/attachment.png>


More information about the sr-users mailing list