I use a lot of applications. :)

So the mix/match syntax below is 'pretty fine' for you?

- #!define NAME VALUE
- NAME "VALUE"
- NAME=VALUE
- NAME="VALUE"; # required quotes are parameter specific

As a user, it can be painful figuring which syntax to use just to set a simple name/value pair.  Each method is basically equivalent in functionality, but only one will work.  And that depends on where it's used in the configuration.  This is what I really want to fix.

And don't forget, there's one more way we can set a name/value pair.

modparam("module_name", "NAME", "VALUE")

Changing the routing logic seemed to be the easiest to address, starting with an include.  With the simple goal of separating logic{..} from configuration directives.

My thought here.. In order to fix the name/value syntax, leave the current configuration parser untouched for routing logic.  But first, we have to separate the routing logic from the main configuration file.

Adding a compile option is just a longer term vision for a cleaner configuration structure.  A directory provides the user flexibility, but a fixed routing_logic.cfg file works too.  But even a fixed file should be customizable as a compile option.


Sincerely,
Brian LaVallee


On 3/19/15 19:33, Alekzander Spiridonov wrote:
=D I believe you've learned too many applications.

Current syntax looks pretty fine for me and (as you've already mentioned) any separation could be achieved with include's.

Anyway I'm strongly against idea of any compile-time paths.

2015-03-19 10:13 GMT+03:00 Brian LaVallee <brian.lavallee@invite-comm.jp>:
Hi,

I would like to propose [and manage] an effort with the primary Kamailio developers to simplify the configuration syntax.  I'm not a developer, but used lot's of different applications and I'm familiar with various configuration formats.

Based on what I've seen, there are five (5) types of configuration directives used with Kamailio. 

- C-Style Control Directives
- Apache-Like Name/Value Pairs
- Normal Name/Value Pairs
- Modify Parameter Procedures
- Routing Logic Scripting

I do understand some of this may be the result of merging multiple projects.  But this mixture of syntax slows adoption, drastically increases the learning curve for the user base.  By implementing a consistent standard to the configuration syntax, it will make using the application less complicated.

--

My first recommendation, would be to separate the routing logic from the primary configuration file.  This can easily be done with import/include.  However, I feel that a fixed path should be added during compile. 

--with-routing=/etc/kamailio/routing/

Then it would possible to modify the configuration parser to read all the files in that directory.  Allowing the separation of the route logic into individual files.  relay.cfg, reqinit.cfg, ... xmlrpc.cfg, tovoicemail.cfg, etc...  Making individual logic changes a bit easier.

To reach a fixed path solution, and keep some backwards compatibility, the first step should be... Use import/include and move all the route logic into /etc/kamailio/routing/basic.cfg

We can discuss on the mailing list or feel free to contact me directly.


Sincerely,
Brian LaVallee

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




--
Best regards,
Alekzander Spiridonov



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev