<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>no, such check is not in the code right now -- one needs to do
some C coding to extend the RPC command implemenation.</p>
<p>Note that this will apply for master branch, because in the past
the reload was getting all the records from database (or text
file) to replace all kept in memory at that time. In the master
branch, it is possible to add/remove single dispatcher items
without interacting with database/text file.</p>
<p>If you do such operations for older kamailio versions, likely
there is a REST API wrapper developed in your side to add/remove
single dispatcher item, which is actually updating database/text
file and then triggers the rpc reload command.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 03.06.19 14:49, Colin, Andrew wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAK_tst5uyVHmBUR0gEE72sCfW_hQimaeitZ08zsrL3=-ivL9+g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Thanks Daniel,
<div><br>
</div>
<div>But is it possible for kamailio to check that list and
either allow or deny the request?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jun 3, 2019 at 1:38 PM
Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@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 bgcolor="#FFFFFF">
<div class="gmail-m_3478167202561644828moz-cite-prefix">Hello,</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix"><br>
</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix">you
can retrieve the list of available destinations via RPC
command:</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix"><br>
</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix"> *
<a
href="https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.r.list"
target="_blank" moz-do-not-send="true">https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.r.list</a></div>
<div class="gmail-m_3478167202561644828moz-cite-prefix"><br>
</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix">By
using jsonrpcs module, the list is in json format.</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix"><br>
</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix">Cheers,<br>
Daniel</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix"><br>
</div>
<div class="gmail-m_3478167202561644828moz-cite-prefix">On
03.06.19 14:34, Colin, Andrew wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I am using the API to remove dispatchers
with a simple curl command,
<div>is there a way i can make kamailio check that there
are sufficient dispatchers available before removing
them when the command is run?</div>
<div><br>
</div>
<div><br>
</div>
<div>Example: i am removing asterisk1 out of kamailio
dispatcher list, but kamailio needs to ensure that
there is atleast 2 or 3 other asterisk servers active
in the list before it allows it to be removed.</div>
<div><br>
</div>
<div>any ideas how i can achieve this?</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset
class="gmail-m_3478167202561644828mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_3478167202561644828moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="gmail-m_3478167202561644828moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="gmail-m_3478167202561644828moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="gmail-m_3478167202561644828moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="gmail-m_3478167202561644828moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a class="gmail-m_3478167202561644828moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="gmail-m_3478167202561644828moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a></pre>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div><font size="4" face="arial, helvetica, sans-serif"><br>
</font></div>
<span
style="font-family:arial,helvetica,sans-serif;font-size:large">
<div><span
style="font-family:arial,helvetica,sans-serif;font-size:large"><br>
</span></div>
Andrew Colin</span>
<div>
<div><span
style="color:rgb(51,51,51);font-family:inherit;font-style:inherit;font-weight:inherit;font-size:14px">Voice
System Engineer</span>
<div style="font-family:arial,sans-serif"><span
style="font-family:arial,helvetica,sans-serif;font-size:x-small">Nexmo
The Vonage API Platform | 3rd Floor 15 Bonhill Street
| London | EC2A 4DN</span><br>
</div>
<div style="font-family:arial,sans-serif"><a
href="mailto:andrew.colin@vonage.com"
style="color:rgb(17,85,204);font-family:arial,helvetica,sans-serif;font-size:x-small"
target="_blank" moz-do-not-send="true">andrew.colin@vonage.com</a><font
size="1" face="arial, helvetica, sans-serif"> </font></div>
<div style="font-family:arial,sans-serif"><font size="1"
face="arial, helvetica, sans-serif"><br>
</font></div>
<div style="font-family:arial,sans-serif">
<ul style="margin:0px;padding:0px 0px
8px;border:0px;font-size:13px;font-family:Helvetica,Arial,sans-serif;vertical-align:baseline;list-style:none;font-stretch:inherit;line-height:17px;outline:0px;display:table-cell;width:523px;color:rgb(51,51,51)">
<img src="https://lh4.googleusercontent.com/fxy6NAsA4EeAUXzOwL0cY7U8BrENzuDT1boD5zga08vD0_rby8tJq7EvVNyhPOXWoayaRMrtwgB5Xr6nxXjW-n1s3oN5QZ--wSqo2HwWZsmHCrNplksrXJ7eQxnOS-Qo3O7_IRUW" alt="Macintosh HD:Users:amandafrancoeur:Dropbox:Nexmo:Brand Guidelines:Logo:nexmo_color.png" style="border: none; color: rgb(0, 0, 0); font-family: Arial; white-space: pre-wrap;" moz-do-not-send="true" width="200" height="54">
</ul>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</body>
</html>