[SR-Users] Removal of Dispatcher

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 4 09:10:31 CEST 2019


Hello,

no, such check is not in the code right now -- one needs to do some C
coding to extend the RPC command implemenation.

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.

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.

Cheers,
Daniel

On 03.06.19 14:49, Colin, Andrew wrote:
> Thanks Daniel,
>
> But is it possible for kamailio to check that list and either allow or
> deny the request?
>
> On Mon, Jun 3, 2019 at 1:38 PM Daniel-Constantin Mierla
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
>     Hello,
>
>     you can retrieve the list of available destinations via RPC command:
>
>       *
>     https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.r.list
>
>     By using jsonrpcs module, the list is in json format.
>
>     Cheers,
>     Daniel
>
>     On 03.06.19 14:34, Colin, Andrew wrote:
>>     I am using the API to remove dispatchers with a simple curl command,
>>     is there a way i can make kamailio check that there are
>>     sufficient dispatchers available before removing them when the
>>     command is run?
>>
>>
>>     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.
>>
>>     any ideas how i can achieve this?
>>
>>
>>
>>
>>     _______________________________________________
>>     Kamailio (SER) - Users Mailing List
>>     sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
>>     https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>     -- 
>     Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
>     www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>
>
>
> -- 
>
>
> Andrew Colin
> Voice System Engineer
> Nexmo The Vonage API Platform | 3rd Floor 15 Bonhill Street | London |
> EC2A 4DN
> andrew.colin at vonage.com <mailto:andrew.colin at vonage.com>  
>
>     Macintosh HD:Users:amandafrancoeur:Dropbox:Nexmo:Brand
>     Guidelines:Logo:nexmo_color.png 
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190604/64660be6/attachment.html>


More information about the sr-users mailing list