mirror of https://github.com/sipwise/kamailio.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.6 KiB
62 lines
2.6 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
|
<chapter id="Select_Intro">
|
|
<title>Introduction and Notations</title>
|
|
<section id="Intro">
|
|
<title>Introduction</title>
|
|
<para>Selects are read-only functions that can be used in the script and
|
|
that always return a string value. In the script a select always starts
|
|
with a '<emphasis>@</emphasis>'. In an expression context a
|
|
select always evaluates to either a string or undef.
|
|
</para>
|
|
<para>For more informations see
|
|
<ulink url=' http://sip-router.org/wiki/cookbooks/selects/devel'>
|
|
http://sip-router.org/wiki/cookbooks/selects/devel</ulink>.
|
|
</para>
|
|
<para>This document lists all the selects implemented by each module.
|
|
</para>
|
|
</section>
|
|
<section id="Notations">
|
|
<title>Notations</title>
|
|
<para>The following notations are used:
|
|
<orderedlist>
|
|
<listitem><para>@ - all selects always start with '@'.</para></listitem>
|
|
<listitem><para>"string" - string type.</para></listitem>
|
|
<listitem><para>integer - integer type.</para></listitem>
|
|
<listitem><para>[] - Parameter markers. Can be either [integer] or
|
|
["string"].
|
|
Note that instead of ["string"] one could write .string,
|
|
e.g.:
|
|
@foo.bar["string"] is equivalent to @foo.bar.string.
|
|
</para></listitem>
|
|
<listitem><para>{} - denotes an optional parameter.
|
|
E.g.: @ruri.params{["string"]} means you could use
|
|
@ruri.params by itself or you could specify an extra parameter:
|
|
@ruri.params["trasnport"] or @ruri.params.transport.
|
|
</para></listitem>
|
|
<listitem><para><string> - means the next member is not fixed and can
|
|
take any string value (it is a string parameter).
|
|
It is equivalent with ["string"], e.g.:
|
|
@msg.header.<string> is the same as
|
|
@msg.header["string"].
|
|
It is used only to expose an internal implementation detail
|
|
(SEL_PARAM_* vs. CONSUME_NEXT_*), but from the script writer point
|
|
of view it is the same thing.
|
|
</para></listitem>
|
|
<listitem><para>.* - means the select can be followed by a variable number
|
|
of string parameters.
|
|
E.g.: @cfg_get.* means that @cfg_get.core.version is a valid usage.
|
|
</para></listitem>
|
|
<listitem><para>* (without a '.' in front) - it means the
|
|
last member might be a class that might expand further (but the
|
|
"expansion" is not defined in the same module).
|
|
E.g. @foo.nameaddr* means that nameaddr is most likely
|
|
a class that expands further
|
|
(for example into @foo.nameaddr.uri a.s.o).
|
|
</para></listitem>
|
|
</orderedlist>
|
|
</para>
|
|
</section>
|
|
</chapter>
|