[Kamailio-Devel] Syntax for mi commands
Johansson Olle E
oej at edvina.net
Tue Jan 27 22:47:29 CET 2009
While digging around the mi interface, I've discovered that there is a
few different syntaxes around and would like to suggest that we
implement some sort of guidelines for the future.
* Examples of mi commands
------------------------------------
rl_stats
regex_reload
ul_rm
Syntax: Module identifier - underscore - command
* Wrong syntax according to above rule:
----------------------------------------------------
reload_blacklist
Should propably be "blacklist_reload" or "bl_reload" to follow above
syntax
* Totally different syntax:
------------------------------
refreshXcapDoc - note UpperCaseLikeJava
Should propably be something like "xc_refresh_xcapdoc"
* Other examples
----------------------
- The dialog module use both dlg_ and profile_ prefixes, which is
confusing
- cpl-c has REMOVE_CPL and GET_CPL in upper case
- cfgutils has a lot of different commands without a clear prefix system
- For command arguments, carrierroute use a command-line syntax, which
no other module does. Instead of multiple arguments, it has one
argument with whitespace and dash syntax, like no other module.
------------------------
I don't judge what's right or wrong here, just document that this is a
bit confusing and not very logical. It raises a few questions:
- Do we need guidelines for this, so we don't get yet another syntax
in the next new module?
- Is it possible to change existing commands for a new release?
We just did an overhaul of the Asterisk manager interface in 1.6.0 to
make it a tiny bit more logical than before. In that work, we changed
the version number of the AMI api so that clients could adopt to the
changes.
Cheers,
/O
More information about the Devel
mailing list