[SR-Users] kamcli v1.1.0 released

Samuel F. samuel_is_kewl at hotmail.com
Tue Oct 16 21:18:09 CEST 2018


Alright, I was more thinking about it from a newcomer perspective. When one is evaluating Kamailio, it will be difficult to understand what to use. Documentations and tutorials everywhere will be messy since all of them will use different tools.

Also, from a development perspective, is it not a lot to maintain 3 CLI tools?

If one could replace the other two, from my limited understanding, I think it would be great to consider deprecating the older ones when/if kamcli has full feature parity with the others.

Cheers, Samuel
________________________________
From: Daniel-Constantin Mierla <miconda at gmail.com>
Sent: Tuesday, October 16, 2018 19:43
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] kamcli v1.1.0 released


None of them is deprecated at this moment.


Both kamctl and kamcli can execute rpc commands, but over jsonrpc (relying on jsonrpcs module), not over binrpc (which relies on ctl module) like kamcmd. The features in kamcmd not existing in the other are tab completion for rpc command names and session like connection (can keep the history of rpc commands in the same session).

Not sure, not being a Python developer, but for kamcli it might be easy to add tab completion for rpc command names, they can be retrieved via rpc command system.listMethods. Even more, kamcli relies on Python's Click framework and I read that it should be easy to add support for bash/shell completion of its arguments.

For the moment, I would say that kamctl/kamdbctl are enough if you work with a pretty standard kamailio deployment. Kamcli would be more useful if you need to extend the control tool with some customized functionality.

Cheers,
Daniel

On 16.10.18 19:17, Samuel F. wrote:
Thank you for the clarifications. It would be great to add that to the wiki.

It would also be nice to have a recommendation to users what tool should be used by newcomers, ie. what is currently the tool under development / not being deprecated.
________________________________
From: Daniel-Constantin Mierla <miconda at gmail.com><mailto:miconda at gmail.com>
Sent: Tuesday, October 16, 2018 16:10
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] kamcli v1.1.0 released


Probably we should put this information somewhere in the wiki, for now here is sort of short presentation for each:


1) kamctl and kamdbctl are related, both being shell scripts (developed over the time from the old serctl/openserctl), the first is for interacting with a kamailio instances, the second is only for creating (and managing) the database structure needed by kamailio


2) kamcmd is practically only a binary rpc client that interacts with ctl module from kamailio -- this was developed by SER project during 2005-2008 (when we were separately)


3) kamcli is written in Python and aims to become a (better) alternative to kamctl (and kamdbctl), with a plugin like architecture to extend it with new subcommands, more flexibility (e.g., modules/libs from python that can be used) and better error handling


For example, adding a new subcommand for kamcli means adding a python script inside commands folder. This comes handy if you have a kamailio installation using a custom database table that you access via sqlops -- with few lines of python script you can add a subcommand to manage its records (add/remove/update), doing validation of the values with python expressions to avoid inserting invalid records...


Another nice feature of kamcli vs kamctl is the ability to choose the format for output -- e.g., jsonrpc response can be presented in a compact form as yaml instead of json.


Overall, kamctl and kamdbctl are part of kamailio source tree and packaged inside kamailio debs/rpms, likely to stay so, no plans to replace/remove them, at least in the near future.


kamcli is a separate repository (https://github.com/kamailio/kamcli<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=2w0mnossrFPeNe3NeeL4r3GXLFPQ1zEJH5OC7ODRuxM%3D&reserved=0>) and it is going to have its own deb/rpm file (actually Victor already built the deb package, available via deb.kamailio.org repositories).


Cheers,
Daniel

On 16.10.18 15:41, Samuel F. wrote:
Great and thank you!

Is there a writeup on how these tools differ and what one should use?

kamcmd
kamcli
kamctl
kamdbctl

________________________________
From: sr-users <sr-users-bounces at lists.kamailio.org><mailto:sr-users-bounces at lists.kamailio.org> on behalf of Daniel-Constantin Mierla <miconda at gmail.com><mailto:miconda at gmail.com>
Sent: Tuesday, October 16, 2018 10:03
To: Kamailio (SER) - Devel Mailing List; Kamailio (SER) - Users Mailing List; business at lists.kamailio.org<mailto:business at lists.kamailio.org>
Subject: [SR-Users] kamcli v1.1.0 released

Hello,

kamcli tool just got its first official release, a step forward in the
process of packaging it.

It is a command line tool that aims to be a modern alternative to the
venerable kamctl, being written in Python and having already a large set
of implemented sub-commands, such as:

  * subscriber – manage SIP subscribers
  * ul – manage user location records
  * address – manage permissions address records
  * aliasdb – manage database aliases
  * db – manage kamailio database content
  * dialog – manage active calls (dialog)
  * dialplan – manage dialplan records
  * dispatcher – manage load balancer (dispatcher)
  * group – manage group membership records (acl)
  * moni – continuous refresh of the values for a list of statistics
  * mtree – manage memory trees (mtree)
  * ps – print the details for kamailio running processes
  * rpc – interact with kamailio via jsonrpc control commands (alias of
jsonrpc)
  * rpcmethods – return the list of available RPC methods (commands)
  * speeddial – manage speed dial records
  * srv – server management commands (sockets, aliases, …)
  * stats – get kamailio internal statistics
  * tls – management commands for TLS profiles and connections
  * uptime – print the uptime for kamailio instance

The news article for this release is available at:

  * https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fw%2F2018%2F10%2Fkamcli-v1-1-0-released%2F&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=e%2B3CSXIFa1ka08nYWWm%2FhI9Jwu4QBOmZbyu3KQ5m64s%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fwww.kamailio.org%252Fw%252F2018%252F10%252Fkamcli-v1-1-0-released%252F%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3De%252B3CSXIFa1ka08nYWWm%252FhI9Jwu4QBOmZbyu3KQ5m64s%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=SsA9oNY%2FL6L%2BXY6%2BuvWKhTlIusNsGmC2oWBTmZzLhlA%3D&reserved=0>

The corresponding tag in the github repository being:

  * https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli%2Freleases%2Ftag%2Fv1.1.0&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=pJsL8bSsrFoOiOXhBH1RVtySl03Oa958ErORwhfGXbU%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Fkamailio%252Fkamcli%252Freleases%252Ftag%252Fv1.1.0%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DpJsL8bSsrFoOiOXhBH1RVtySl03Oa958ErORwhfGXbU%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=ww6bsL6egCXWHP3CT0IrsuH3eYU%2F0SCCbOCcloBn3vY%3D&reserved=0>

How to install kamcli and examples of usage can be found at:

  * https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli%2Fblob%2Fv1.1%2FREADME.md&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=C5O%2FD7ahjlVmoNexzZ0yziOhSwR%2BNzP7UHeoSMZUtF0%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Fkamailio%252Fkamcli%252Fblob%252Fv1.1%252FREADME.md%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DC5O%252FD7ahjlVmoNexzZ0yziOhSwR%252BNzP7UHeoSMZUtF0%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=ngx%2FIRZ6vg9QI3IZFYjTW1%2BKnPqej9XkEywF9NFbems%3D&reserved=0>

Cheers,
Daniel

--
Daniel-Constantin Mierla -- https://eur04.safelinks.protection.outlook.com/?url=www.asipto.com&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=EV9GFvqdMpagr6xmbVexTWRP2PtLBA3FIwsoIBbNV9M%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dwww.asipto.com%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DEV9GFvqdMpagr6xmbVexTWRP2PtLBA3FIwsoIBbNV9M%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=ndNxB%2BWgw5Preizi4bOOZjZZ02xgi9HLrl6XFk2ayJc%3D&reserved=0>
https://eur04.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmiconda&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=3nDVe8jZ9QYeNqVjj07CuIA2qkyzfoQtP8GPc8VwATY%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dwww.twitter.com%252Fmiconda%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3D3nDVe8jZ9QYeNqVjj07CuIA2qkyzfoQtP8GPc8VwATY%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=JqmTng3XGbJYZ8DCngN7t0uUz4MFuXg3fahAfEm2%2BoM%3D&reserved=0> -- https://eur04.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=E%2F7Hxus5XiJJySRmORIGM0ZUyexzK7FNwgnzUkCbLRo%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dwww.linkedin.com%252Fin%252Fmiconda%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DE%252F7Hxus5XiJJySRmORIGM0ZUyexzK7FNwgnzUkCbLRo%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=eeY40JNLQEY%2Fjx4hRGw2iNu3dOL2fW9NmWfz5tYc14M%3D&reserved=0>
Kamailio World Conference -- https://eur04.safelinks.protection.outlook.com/?url=www.kamailioworld.com&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=nSzkZakzIo%2FoFXCPvV%2FqUCdXn90WAGlFmB%2B3lsh9Tlo%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dwww.kamailioworld.com%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DnSzkZakzIo%252FoFXCPvV%252FqUCdXn90WAGlFmB%252B3lsh9Tlo%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398692126&sdata=0u8lerxjlYnE%2FW%2FS0fm%2BPY9hlyQPt6bUKECvVN33PR0%3D&reserved=0>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- https://eur04.safelinks.protection.outlook.com/?url=www.asipto.com&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=EV9GFvqdMpagr6xmbVexTWRP2PtLBA3FIwsoIBbNV9M%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dwww.asipto.com%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DEV9GFvqdMpagr6xmbVexTWRP2PtLBA3FIwsoIBbNV9M%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=riJG7WY9X77WY9xTgvAZvWwPQNBhqmyItbC3fbOUNBo%3D&reserved=0>


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636752739421479581&sdata=ZIVuOB2ncShUziDuIh%2BoalsUNMLOl86ZyC6w%2F4Ip%2FSQ%3D&reserved=0<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Flists.kamailio.org%252Fcgi-bin%252Fmailman%252Flistinfo%252Fsr-users%26amp%3Bdata%3D02%257C01%257C%257Cfed7a25d71b24b0796fe08d6333e2a8d%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%257C0%257C636752739421479581%26amp%3Bsdata%3DZIVuOB2ncShUziDuIh%252BoalsUNMLOl86ZyC6w%252F4Ip%252FSQ%253D%26amp%3Breserved%3D0&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=5gr9jDEqsyEV4Vukg82TTN61RGPPtj%2FFAOFft2AsyhY%3D&reserved=0>


--
Daniel-Constantin Mierla -- www.asipto.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=ZgrDMhO16kIKAYEGwA8hHtdGC3wrXpJUYyH2q66QhBM%3D&reserved=0>
www.twitter.com/miconda<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=xT9MNO24nseDm30zonW77tGsln8tWKKjGb2LijTSYPU%3D&reserved=0> -- www.linkedin.com/in/miconda<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=nvzvXE%2Bp3fggHVrLLJlqAcYnoMmRo5k3G6usJbEcWuo%3D&reserved=0>
Kamailio World Conference -- www.kamailioworld.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailioworld.com&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=6ov34pGMLJJhqVHAmcc222zWoKg2PcZ7XRZDNok7YcA%3D&reserved=0>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=ZgrDMhO16kIKAYEGwA8hHtdGC3wrXpJUYyH2q66QhBM%3D&reserved=0>


--
Daniel-Constantin Mierla -- www.asipto.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=ZgrDMhO16kIKAYEGwA8hHtdGC3wrXpJUYyH2q66QhBM%3D&reserved=0>
www.twitter.com/miconda<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=xT9MNO24nseDm30zonW77tGsln8tWKKjGb2LijTSYPU%3D&reserved=0> -- www.linkedin.com/in/miconda<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=nvzvXE%2Bp3fggHVrLLJlqAcYnoMmRo5k3G6usJbEcWuo%3D&reserved=0>
Kamailio World Conference -- www.kamailioworld.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailioworld.com&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=6ov34pGMLJJhqVHAmcc222zWoKg2PcZ7XRZDNok7YcA%3D&reserved=0>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753086398848371&sdata=ZgrDMhO16kIKAYEGwA8hHtdGC3wrXpJUYyH2q66QhBM%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181016/eeef722d/attachment.html>


More information about the sr-users mailing list