cookbooks:4.0.x:core:cfg
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cookbooks:4.0.x:core:cfg [2013/06/26 07:00] – [Instruction Separator] poing | cookbooks:4.0.x:core:cfg [2013/06/26 07:39] (current) – [Configuration Directives] poing | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <fc # | ||
- | |||
====== The Configuration File ====== | ====== The Configuration File ====== | ||
Line 18: | Line 16: | ||
There are five (5) types of configuration directives used with Kamailio.\\ | There are five (5) types of configuration directives used with Kamailio.\\ | ||
- | <fc #AA0000>**Each type of configuration directive uses its own syntax!**</ | + | ^ |
- C-Style Control Directives | - C-Style Control Directives | ||
Line 30: | Line 28: | ||
==== Comments ==== | ==== Comments ==== | ||
- | <fc #FF0000>**The first thing you should understand is the comment syntax used in the configuration file.\\ \\ **</ | + | ^ |
Comments in the configuration file are a mixture of C-Style (**not C++**) and scripting language syntaxes.\\ | Comments in the configuration file are a mixture of C-Style (**not C++**) and scripting language syntaxes.\\ | ||
It closely resembles the PHP style, **// | It closely resembles the PHP style, **// | ||
Line 39: | Line 38: | ||
/* This is a ... | /* This is a ... | ||
block comment */</ | block comment */</ | ||
- | |<fc #FF0000>**Not a Comment: | + | |<fc #800000>**Not a Comment: |
|Line Comment:< | |Line Comment:< | ||
- | |**<fc #FF0000>Valid Configuration Directive:</ | + | |**<fc #800000>Valid Configuration Directive:</ |
----- | ----- | ||
Line 67: | Line 66: | ||
^ Type ^ Format ^ Comment ^ | ^ Type ^ Format ^ Comment ^ | ||
- | | C-Style Control Directives | #!directive NAME VALUE | Begins with hash-bang (#!) | | + | | C-Style Control Directives | # |
| Apache-Like Name/Value Pairs | name " | | Apache-Like Name/Value Pairs | name " | ||
| Normal Name/Value Pairs | name=value | Delimited by an equals sign | | | Normal Name/Value Pairs | name=value | Delimited by an equals sign | | ||
Line 97: | Line 96: | ||
#!endif | #!endif | ||
</ | </ | ||
+ | |||
----- | ----- | ||
==== Apache Name/Value Pairs ==== | ==== Apache Name/Value Pairs ==== | ||
Line 112: | Line 112: | ||
import_file "/ | import_file "/ | ||
</ | </ | ||
- | ----- | + | |
+ | ------- | ||
==== Normal Name/Value Pairs ==== | ==== Normal Name/Value Pairs ==== | ||
+ | |||
+ | These name/value pairs are normally delimited by an equal sign. | ||
^ Syntax: | | ^ Syntax: | | ||
|<code c> | |<code c> | ||
- | | ||
- | [[../ | + | <fc # |
+ | Check the [[../ | ||
^ Examples: | ^ Examples: | ||
Line 132: | Line 135: | ||
alias=" | alias=" | ||
</ | </ | ||
- | ----- | + | |
+ | ------ | ||
==== Modify Parameter Procedure ==== | ==== Modify Parameter Procedure ==== | ||
Line 142: | Line 146: | ||
| | ||
<fc # | <fc # | ||
+ | |||
+ | See the [[http:// | ||
^ Examples: | ^ Examples: | ||
Line 153: | Line 159: | ||
----- | ----- | ||
==== Route Functions ==== | ==== Route Functions ==== | ||
+ | |||
+ | I will not go into too much detail here, the scripting methods, functions, and procdedures should be covered elsewhere in this wiki.\\ | ||
+ | |||
+ | |||
+ | ^ Example: | ||
+ | |<code c> | ||
+ | route(REQINIT); | ||
+ | route(NATDETECT); | ||
+ | |||
+ | # CANCEL ?? | ||
+ | if (is_method(" | ||
+ | exit; | ||
+ | } | ||
+ | |||
+ | # OTHER SCRIPT CODE HERE | ||
+ | }</ |
cookbooks/4.0.x/core/cfg.1372230059.txt.gz · Last modified: 2013/06/26 07:00 by poing