<div dir="ltr"><div>Dear Grant<br><br></div>Thank you very much!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 6:00 PM, Grant Bagdasarian <span dir="ltr"><<a href="mailto:gb@cm.nl" target="_blank">gb@cm.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div class="m_-8036445954400118335WordSection1">
<p class="MsoNormal"><span lang="NL">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="NL"><u></u> <u></u></span></p>
<p class="MsoNormal">We use the is_method function to enforce this. You can specify multiple method names in the function arguments.<u></u><u></u></p>
<p class="MsoNormal">For instance:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1e1e1e"><span style="font-size:10.5pt;font-family:Consolas;color:#c586c0">if</span><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">(is_method(</span><span style="font-size:10.5pt;font-family:Consolas;color:#ce9178">"SUBSCRIBE|<wbr>NOTIFY|PUBLISH|INFO|MESSAGE"</span><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">))
 {<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1e1e1e"><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">        sl_send_reply(</span><span style="font-size:10.5pt;font-family:Consolas;color:#ce9178">"405"</span><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">,
</span><span style="font-size:10.5pt;font-family:Consolas;color:#ce9178">"Method Not Allowed"</span><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">);<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1e1e1e"><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">        </span><span style="font-size:10.5pt;font-family:Consolas;color:#c586c0">exit</span><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1e1e1e"><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4">    }<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<table class="m_-8036445954400118335MsoNormalTable" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 1.5pt 0cm">
<p class="MsoNormal"><span style="font-size:16.0pt;color:#1657ea">Grant Bagdasarian</span><span style="font-size:12.0pt;color:#1657ea"><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 15.0pt 0cm">
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Senior Developer</span><span style="font-size:9.0pt;color:black"><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 1.5pt 0cm">
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1657ea"><a href="tel:+31765727054" target="_blank"><span style="color:blue">+31765727054</span></a></span><span style="font-size:9.0pt;color:#1657ea"><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 15.0pt 0cm">
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1657ea"><a href="https://cm.com" target="_blank"><span style="color:blue">cm.com</span></a></span><span style="font-size:9.0pt;color:#1657ea"><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:3.75pt 0cm 16.5pt 0cm">
<p class="MsoNormal"><img style="width:1.5625in;height:.6354in" id="m_-8036445954400118335_x0000_i1025" src="cid:image002.png@01D3D273.275C78C0" border="0" width="150" height="61"><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="NL"><u></u> <u></u></span></p>
<p class="MsoNormal"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.<wbr>kamailio.org</a>> <b>
On Behalf Of </b>Gholamreza Sabery<br>
<b>Sent:</b> donderdag 12 april 2018 14:47<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> [SR-Users] Limiting Kamailios accepted methods<u></u><u></u></p><span class="">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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?<br>
<br>
<u></u><u></u></p>
</div>
<p class="MsoNormal">Regards<u></u><u></u></p>
</div>
</span></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>