Hello,
related to the initial topic of this discussion, the first line sets the
algorithm for looking up script variables.
So far, up to 3.4.x, here were the rules:
- #!KAMAILIO - anything $xy (including the $xy(...)) must be a
pseudo-variable (pv)
- #!SER - anything $xy is considered an AVP
- #!MAXCOMPAT - $xy is looked up as a PV first and if not found then is
considered AVP
MAXCOMPAT was the default one for default flavour if nothing was
specified in the first line. Depending what flavour you compiled, the
associated compatibility mode was set as default.
Starting with 4.0.0, MAXCOMPAT is the default mode for KAMAILIO flavour
because this is now the default flavour. Setting the first line can
overwrite what so ever is the default value (overwriting is valid also
for past release).
Cheers,
Daniel
On 1/30/13 1:26 PM, Fred Posner wrote:
On 1/30/13 5:08 AM, Olle E. Johansson wrote:
Daniel,
The #!KAMAILIO is something I don't see in documentation. There's some
old communication on the various flavour markers in the config file, but
can you describe it a bit so we can add it to the core cookbook in the
wiki? You referred to it here as well as in the discussion with
Philipper earlier.
How does it affect variables?
/O
http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#script_comp…
Script compatibility mode
option to offer best compatibility with expected behaviour had by
older versions
as now we integrate functionalities from Kamailio and SER all
together, this directive offer the possibility to choose between. For
example:
in Kamailio, processing of failure route uses selected reply
code from branches of the last step of serial forking
in SER, processing of failure route uses selected reply code
from all branches, offering the option to drop replies for branches of
the last step of serial forking via a module function
you can choose between ser compatible, kamailio compatible and max
compatibility (compatible with both as much as possible), using:
#!SER
#!KAMAILIO
#!OPENSER
#!ALL
#!MAXCOMPAT
where #!KAMAILIO is equivalent with #!OPENSER and #!ALL with #!MAXCOMPAT
IMPORTANT - set #!KAMAILIO as first line in your config file if you
update from 1.5.x or older version of Kamailio (OpenSER), otherwise
you may experience new behaviour for some old functions.
#!KAMAILIO
...
I've been meaning to check my wiki account, so I'll add this more places.
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
-
http://conference.kamailio.com -