AI and VoIP Blog

VOIP | AI | Cloud | Kamailio | Open Source


Most useful Kamailio commands


Kamailio has three inbuilt tools that can be used to manage and configure Kamailio. Although there are several commands within these tools, I am going to describe the most useful of them all.

KAMCTL

Common Commands:

Command Description
kamctl ul showUser location in memory (registered users)
kamctl ul show –briefShow in-RAM online users in short format
kamctl address dumpAddress table data in cache
kamctl address showAddress table data in DB
kamctl db show <tablename>Show database table
kamctl startStart kamailio
kamctl stopStop kamailio
kamctl restartRestart kamailio
kamctl add <username> <password>Add a new subscriber to the database
kamctl show <username>Show subscriber attributes
kamctl passwd <username> <password>Change user’s password
kamctl rm <username>Delete a user
kamctl address reloadReload address records from database into memory
Kamctl dispatcher reloadReload dispatcher records from database into memory

KAMDBCTL

Command Description
kamdbctl createcreates a new database
kamdbctl backupdumps current database to file
kamdbctl presenceadds the presence related tables
kamdbctl extraadds the extra tables
kamdbctl dbuidadds the uid tables
kamdbctl grantgrant privileges to database
kamdbctl revokerevoke privileges to database

KAMCMD

Command Description
kamcmd help or
kamcmd ? or
kamcmd system.listMethods
list all methods that can be used with kamcmd.
We can use grep to filter the output.
kamcmd dmq.list_nodeslist members of the DMQ node
kamcmd core.sockets_listlist all the listener sockets
kamcmd core.uptimeKamailio uptime
kamcmd rtpengine.show allshow status of all rtpengine nodes
kamcmd rtpengine.enable all 1enable all rtpengine nodes
kamcmd rtpengine.enable udp:192.168.2.133:8081 1enable one rtpengine nodes
kamcmd rtpengine.reloadReloads the database node table content if configured
kamcmd dlg.listLists the description of all dialogs (active calls)
kamcmd dlg.stats_activeGet stats about active dialogs by scanning internal list of dialogs

For an exhaustive list of kamcmd commands please check my github repositiry here

There is also a python based tool called kamcli which is a modern version to the bash based kamctl . To know more about it and how to use it, please visit the github page https://github.com/kamailio/kamcli/blob/master/README.md

If you want me to share more information about kamailio please let me know in the comment and I will write an article about it.

I will be updating the list of commands so don’t forget to bookmark this page for quick reference. Please subscribe to my blog to receive the future articles about Cloud, OpenSource and Artificial Intelligence.


Discover more from AI and VoIP Blog

Subscribe to get the latest posts sent to your email.



Leave a comment