[Kamailio-Devel] Syntax for mi commands

Daniel-Constantin Mierla miconda at gmail.com
Fri Jan 30 16:14:46 CET 2009



On 01/30/2009 03:02 PM, Johansson Olle E wrote:
> 30 jan 2009 kl. 13.45 skrev Iñaki Baz Castillo:
>
>   
>> 2009/1/30 Daniel-Constantin Mierla <miconda at gmail.com>:
>>     
>>> Please contribute there with suggestions and discuss them here. I  
>>> am for
>>> "module-identifier - underscore - command name".
>>>       
>> I agree. Also I suggest that "module-identifier" would be, strictly,
>> the module real name, without using abbreviations. For example:
>>
>> Wrong:
>>  ul_rm
>>
>> Correct:
>>  usrloc_rm
>>
>> Do you agree? Since a MI commands depends on the module it's built on,
>> I think this approach would be the best and easiest.
>>     
>
> I agree, but some MI commands are from the core, like get_statistics.  
> We can
> either implement a "pseudo-module-identifier" like stat_get or move it  
> to core,
> like "core_stat_get".
>
> The question is how many developers we hurt by changing existing  
> commands.
> For the actual command name, we can implement aliases so both work  
> during
> a release. And some warnings.
>
> But if we change responses to make them more parseable, that's another  
> issue.
> Then the API is changed.
>
> We propably should also take some of these questions to the sip-router  
> project,
> since the interface is part of the future common core.
>
> One thing I noticed is that there's a lot of duplication of code between
> the modules mi_fifo and mi_datagram. That is a good way to create future
> problems. Maybe the parsers should move in to the core mi code?
>   
With sip-router project, the MI will become a library. Such code can be 
added there or make an additional one to be shared only by these two 
modules.

Also, these specific implementations, like get_statistics command should 
be moved to some modules (e.g., in this case, statistics).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list