From openSIPS

Development: Design-Opensips-Script-Rework

Development -> Planning -> OpenSIPS Script Rework

Problems to be addressed

There are two types of problems with the current OpenSIPS scripting language, which relate to both its structure and functionality:

Proposed Solution

Trying to address the above issues, we suggest a new format for the configuration script:

1) a simple re-structuring to solve the problems, but trying to keep a similarity with the actual structure. The grammar will enforce three main sections in the cfg file, in a certain order:

 opensips-3.0.cfg

# script starts with the core engine configuration section
core {
    log_level = 4
    log_stderror = no
    log_facility = LOG_LOCAL0
    listen = udp:1.1.1.1
    mpath = "/usr/lib/x86_64-linux-gnu/opensips/modules"
}

# after the core is configured, we have the section dealing with modules
loadmodule [tm] {
   fr_timeout = 4
   timer_partitions = 2
}

loadmodule [avpops] {
   db_url = "mysql://user:passwd@host/database"
   use_domain = 1
}

# last section is meant to exclusively hold routing routes

route {...}
failure_route [call_failure] {...}
local_route {...}
...
History

The problem and its solution have already been discussed together with the community, during this 2015 IRC meeting.

Retrieved from https://www.opensips.org/Development/Design-Opensips-Script-Rework
Page last modified on December 13, 2018, at 05:09 PM