Sep
2nd

Support for ‘include’ in config file

miconda on September 2nd, 2009

The configuration file language supports now a new directive that allow including the content of another file during parsing of routing logic.

This allows splitting big configs for easier maintenance, even modularity — building a library of config snippets that are included and combined to build a full configuration file.

The syntax is:

include_file “file_name”

There is no restriction of what the included file should contain, it must be a valid content for the place where the include directive is used.

Here is an example:

route {
    ...
    include_file "/sr/checks.cfg"
    ...
}

--- /sr/checks.cfg ---

   if (!mf_process_maxfwd_header("10")) {
       sl_send_reply("483","Too Many Hops");
       exit;
   }

---

The feature is documented at:

http://sip-router.org/wiki/cookbooks/core-cookbook/devel

Tags: kamailio, openser, ser, sip-router
News - RSS Feed

Comments are closed.


    Menu

  • About
  • Answers
  • Benefits
  • Download
  • Releases
  • History
  • How to Contribute
  • Licensing
  • Management

    Links

    • Bug Tracker
    • Docbook Docs
    • Doxygen Docs
    • GIT Repository
    • Mailing Lists
    • Wiki
  • News
  • Log in
© The SIP-Router Project | Entries (RSS)