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.
kamailio/obsolete/pdt/doc/functions.xml

42 lines
1.3 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">
<section id="pdt.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
</sectioninfo>
<title>Functions</title>
<section id="prefix2domain">
<title>
<function>prefix2domain(mode)</function>
</title>
<para>
Build a new URI if it is necessary. Returns 1 when the translation
was made or there was nothing to translate (user part of the URI is
empty, it does not match the prefix parameter or there is no domain
associated with a possible prefix from user part). Returns -1 in
error cases.
</para>
<para>
The "mode" parameter specifies whether to strip or not the prefix
from user part. If the parameter is missing or it has the value
"0", then the prefix is removed along with the leading
prefix. If the value is "1", only the leading prefix
is removed. If the values is "2" the user part of the
URI is not changed.
</para>
<example>
<title><function>prefix2domain</function> usage</title>
<programlisting>
...
prefix2domain();
...
prefix2domain("2");
...
</programlisting>
</example>
</section>
</section>