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 show | User location in memory (registered users) |
| kamctl ul show –brief | Show in-RAM online users in short format |
| kamctl address dump | Address table data in cache |
| kamctl address show | Address table data in DB |
| kamctl db show <tablename> | Show database table |
| kamctl start | Start kamailio |
| kamctl stop | Stop kamailio |
| kamctl restart | Restart 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 reload | Reload address records from database into memory |
| Kamctl dispatcher reload | Reload dispatcher records from database into memory |
KAMDBCTL
| Command | Description |
| kamdbctl create | creates a new database |
| kamdbctl backup | dumps current database to file |
| kamdbctl presence | adds the presence related tables |
| kamdbctl extra | adds the extra tables |
| kamdbctl dbuid | adds the uid tables |
| kamdbctl grant | grant privileges to database |
| kamdbctl revoke | revoke 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_nodes | list members of the DMQ node |
| kamcmd core.sockets_list | list all the listener sockets |
| kamcmd core.uptime | Kamailio uptime |
| kamcmd rtpengine.show all | show status of all rtpengine nodes |
| kamcmd rtpengine.enable all 1 | enable all rtpengine nodes |
| kamcmd rtpengine.enable udp:192.168.2.133:8081 1 | enable one rtpengine nodes |
| kamcmd rtpengine.reload | Reloads the database node table content if configured |
| kamcmd dlg.list | Lists the description of all dialogs (active calls) |
| kamcmd dlg.stats_active | Get 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.
Leave a comment