Skip to content

Commit 4b779d0

Browse files
committed
[mid-]registrar docs: Parameterize examples; Move to lib/reg
1 parent 11c8a18 commit 4b779d0

File tree

7 files changed

+37
-33
lines changed

7 files changed

+37
-33
lines changed

doc/entities.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<!ENTITY osipssolname "OpenSIPS Solutions">
1414
<!ENTITY osipssol "<ulink url='http://www.opensips-solutions.com/'>www.opensips-solutions.com</ulink>">
15+
<!ENTITY OSS "<ulink url='http://opensips-solutions.com'>OpenSIPS Solutions</ulink>">
1516

1617
<!ENTITY osipshome "https://opensips.org/">
1718
<!ENTITY osipsbugs "https://github.com/OpenSIPS/opensips/issues">

modules/registrar/doc/lookup_flags.xml renamed to lib/reg/doc/lookup_flags.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<listitem>
55
<para>
66
<emphasis>'b' (no Branches)</emphasis> - this flag controls how
7-
lookup function processes multiple contacts. If there are
7+
the &reg_lookup_f; function processes multiple contacts.
8+
If there are
89
multiple contacts for the given username in usrloc and this
910
flag is not set, Request-URI will be overwritten with the
1011
highest-q rated contact and the rest will be appended to
@@ -20,8 +21,8 @@
2021
<emphasis>'B' (to Branches only)</emphasis> - this flags forces
2122
all found contacts to be uploaded only as branches (in the
2223
destination set) and not at all in the R-URI of the
23-
current message. Using this option allows the lookup() function to also
24-
be used in the context of a SIP reply.
24+
current message. Using this option allows the &reg_lookup_f; function to
25+
also be used in the context of a SIP reply.
2526
</para>
2627
</listitem>
2728

@@ -41,7 +42,7 @@
4142
<emphasis role='bold'>WARNING: </emphasis>
4243
<emphasis>if you want this flag activated,
4344
the 'b' (no Branches) flag must not be set, because by setting
44-
that flag you won't allow lookup to write in a branch.</emphasis>
45+
that flag you won't allow &reg_lookup_f; to write in a branch.</emphasis>
4546
</para>
4647
</listitem>
4748

@@ -78,7 +79,7 @@
7879
<para>
7980
<emphasis>'g' (Global lookup)</emphasis> - this flag
8081
is only relevant with federated user location clustering. If
81-
set, the lookup() function will not only perform the classic
82+
set, the &reg_lookup_f; function will not only perform the classic
8283
in-memory "search-AoR-and-push-branches" operation, but will
8384
also perform a metadata lookup and append an additional branch
8485
for each returned result. The "in-memory branches" correspond
@@ -110,7 +111,7 @@
110111
<para>
111112
<emphasis>'yXXXXX' (Max pinging latency)</emphasis> - maximally
112113
accepted contact pinging latency (microseconds). Contacts of an
113-
AoR with a higher latency will be discarded during the lookup.
114+
AoR with a higher latency will be discarded during &reg_lookup_f;.
114115
</para>
115116
</listitem>
116117
<listitem>

modules/registrar/doc/pn_modparams.xml renamed to lib/reg/doc/pn_modparams.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<title>Setting the <varname>pn_enable</varname> parameter</title>
2121
<programlisting format="linespecific">
2222
...
23-
modparam("registrar", "pn_enable", true)
23+
modparam("&reg_module;", "pn_enable", true)
2424
...
2525
</programlisting>
2626
</example>
@@ -44,7 +44,7 @@ modparam("registrar", "pn_enable", true)
4444
<title>Setting the <varname>pn_providers</varname> parameter</title>
4545
<programlisting format="linespecific">
4646
...
47-
modparam("registrar", "pn_providers", "apns, fcm, webpush")
47+
modparam("&reg_module;", "pn_providers", "apns, fcm, webpush")
4848
...
4949
</programlisting>
5050
</example>
@@ -68,7 +68,7 @@ modparam("registrar", "pn_providers", "apns, fcm, webpush")
6868
other URI parameters, etc.).
6969
</para>
7070
<para>
71-
After a <emphasis>lookup</emphasis> operation, the above PN-related
71+
After calling &reg_lookup_f;, the above PN-related
7272
parameters will be automatically stripped from the resulting
7373
Request URI(s).
7474
</para>
@@ -82,7 +82,7 @@ modparam("registrar", "pn_providers", "apns, fcm, webpush")
8282
<title>Setting the <varname>pn_ct_match_params</varname> parameter</title>
8383
<programlisting format="linespecific">
8484
...
85-
modparam("registrar", "pn_ct_match_params", "pn-provider, pn-prid")
85+
modparam("&reg_module;", "pn_ct_match_params", "pn-provider, pn-prid")
8686
...
8787
</programlisting>
8888
</example>
@@ -108,7 +108,7 @@ modparam("registrar", "pn_ct_match_params", "pn-provider, pn-prid")
108108
<title>Setting the <varname>pn_pnsreg_interval</varname> parameter</title>
109109
<programlisting format="linespecific">
110110
...
111-
modparam("registrar", "pn_pnsreg_interval", 140)
111+
modparam("&reg_module;", "pn_pnsreg_interval", 140)
112112
...
113113
</programlisting>
114114
</example>
@@ -140,7 +140,7 @@ modparam("registrar", "pn_pnsreg_interval", 140)
140140
<title>Setting the <varname>pn_trigger_interval</varname> parameter</title>
141141
<programlisting format="linespecific">
142142
...
143-
modparam("registrar", "pn_trigger_interval", 130)
143+
modparam("&reg_module;", "pn_trigger_interval", 130)
144144
...
145145
</programlisting>
146146
</example>
@@ -165,7 +165,7 @@ modparam("registrar", "pn_trigger_interval", 130)
165165
<title>Setting the <varname>pn_skip_pn_interval</varname> parameter</title>
166166
<programlisting format="linespecific">
167167
...
168-
modparam("registrar", "pn_skip_pn_interval", 10)
168+
modparam("&reg_module;", "pn_skip_pn_interval", 10)
169169
...
170170
</programlisting>
171171
</example>
@@ -175,8 +175,8 @@ modparam("registrar", "pn_skip_pn_interval", 10)
175175
<section id="param_pn_inv_timeout" xreflabel="pn_inv_timeout">
176176
<title><varname>pn_inv_timeout</varname> (integer)</title>
177177
<para>
178-
This timeout starts counting following a <emphasis>lookup</emphasis>.
179-
which triggers at least one Push Notification. The value
178+
This timeout starts counting following a &reg_lookup_f; which
179+
triggers at least one Push Notification. The value
180180
represents the maximum allowed time for the Push Notifications and
181181
their corresponding re-registrations from the awoken SIP UA to take
182182
place.
@@ -197,7 +197,7 @@ modparam("registrar", "pn_skip_pn_interval", 10)
197197
<title>Setting the <varname>pn_inv_timeout</varname> parameter</title>
198198
<programlisting format="linespecific">
199199
...
200-
modparam("registrar", "pn_inv_timeout", 5)
200+
modparam("&reg_module;", "pn_inv_timeout", 5)
201201
...
202202
</programlisting>
203203
</example>

modules/registrar/doc/reg_modparams.xml renamed to lib/reg/doc/reg_modparams.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<programlisting format="linespecific">
2323
...
2424
# Allow no more than 10 contacts per AOR
25-
modparam("&mod_name;", "max_contacts", 10)
25+
modparam("&reg_module;", "max_contacts", 10)
2626
...
2727
</programlisting>
2828
</example>
@@ -40,7 +40,7 @@ modparam("&mod_name;", "max_contacts", 10)
4040
<example>
4141
<title>Setting the <emphasis>max_username_len</emphasis> module parameter</title>
4242
<programlisting format="linespecific">
43-
modparam("&mod_name;", "max_username_len", 128)
43+
modparam("&reg_module;", "max_username_len", 128)
4444
</programlisting>
4545
</example>
4646
</section>
@@ -57,7 +57,7 @@ modparam("&mod_name;", "max_username_len", 128)
5757
<example>
5858
<title>Setting the <emphasis>max_domain_len</emphasis> module parameter</title>
5959
<programlisting format="linespecific">
60-
modparam("&mod_name;", "max_domain_len", 128)
60+
modparam("&reg_module;", "max_domain_len", 128)
6161
</programlisting>
6262
</example>
6363
</section>
@@ -74,7 +74,7 @@ modparam("&mod_name;", "max_domain_len", 128)
7474
<example>
7575
<title>Setting the <emphasis>max_aor_len</emphasis> module parameter</title>
7676
<programlisting format="linespecific">
77-
modparam("&mod_name;", "max_aor_len", 512)
77+
modparam("&reg_module;", "max_aor_len", 512)
7878
</programlisting>
7979
</example>
8080
</section>
@@ -91,7 +91,7 @@ modparam("&mod_name;", "max_aor_len", 512)
9191
<example>
9292
<title>Setting the <emphasis>max_contact_len</emphasis> module parameter</title>
9393
<programlisting format="linespecific">
94-
modparam("&mod_name;", "max_contact_len", 512)
94+
modparam("&reg_module;", "max_contact_len", 512)
9595
</programlisting>
9696
</example>
9797
</section>

modules/mid_registrar/doc/mid_registrar.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
33
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
44

5-
<!ENTITY mod_name "<acronym>mid_registrar</acronym>">
5+
<!ENTITY reg_module "<acronym>mid_registrar</acronym>">
6+
<!ENTITY reg_lookup_f "<emphasis><acronym>mid_reg_lookup()</acronym></emphasis>">
67

78
<!ENTITY admin SYSTEM "mid_registrar_admin.xml">
89
<!ENTITY contrib SYSTEM "contributors.xml">
910

1011
<!-- Common registrar/mid-registrar documentation -->
11-
<!ENTITY reg_modparams SYSTEM "../../registrar/doc/reg_modparams.xml">
12-
<!ENTITY pn_modparams SYSTEM "../../registrar/doc/pn_modparams.xml">
13-
<!ENTITY lookup_flags SYSTEM "../../registrar/doc/lookup_flags.xml">
14-
<!ENTITY lookup_retcodes SYSTEM "../../registrar/doc/lookup_retcodes.xml">
12+
<!ENTITY reg_modparams SYSTEM "../../../lib/reg/doc/reg_modparams.xml">
13+
<!ENTITY pn_modparams SYSTEM "../../../lib/reg/doc/pn_modparams.xml">
14+
<!ENTITY lookup_flags SYSTEM "../../../lib/reg/doc/lookup_flags.xml">
15+
<!ENTITY lookup_retcodes SYSTEM "../../../lib/reg/doc/lookup_retcodes.xml">
1516

1617
<!-- Include general documentation entities -->
1718
<!ENTITY % docentities SYSTEM "../../../doc/entities.xml">
@@ -29,5 +30,5 @@
2930
&contrib;
3031

3132
&docCopyrights;
32-
<para>&copyright; 2016-2020 &osipssol;</para>
33+
<para>&copyright; 2016-2020 &OSS;</para>
3334
</book>

modules/registrar/doc/registrar.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
33
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
44

5-
<!ENTITY mod_name "<acronym>registrar</acronym>">
5+
<!ENTITY reg_module "<acronym>registrar</acronym>">
6+
<!ENTITY reg_lookup_f "<emphasis><acronym>lookup()</acronym></emphasis>">
67

78
<!ENTITY admin SYSTEM "registrar_admin.xml">
89
<!ENTITY faq SYSTEM "registrar_faq.xml">
910
<!ENTITY contrib SYSTEM "contributors.xml">
1011

1112
<!-- Common registrar/mid-registrar documentation -->
12-
<!ENTITY reg_modparams SYSTEM "reg_modparams.xml">
13-
<!ENTITY pn_modparams SYSTEM "pn_modparams.xml">
14-
<!ENTITY lookup_flags SYSTEM "lookup_flags.xml">
15-
<!ENTITY lookup_retcodes SYSTEM "lookup_retcodes.xml">
13+
<!ENTITY reg_modparams SYSTEM "../../../lib/reg/doc/reg_modparams.xml">
14+
<!ENTITY pn_modparams SYSTEM "../../../lib/reg/doc/pn_modparams.xml">
15+
<!ENTITY lookup_flags SYSTEM "../../../lib/reg/doc/lookup_flags.xml">
16+
<!ENTITY lookup_retcodes SYSTEM "../../../lib/reg/doc/lookup_retcodes.xml">
1617

1718
<!-- Include general documentation entities -->
1819
<!ENTITY % docentities SYSTEM "../../../doc/entities.xml">
@@ -33,5 +34,5 @@
3334

3435
&docCopyrights;
3536
<para>&copyright; 2003 &fhg;</para>
36-
<para>&copyright; 2020 &osipssolname;</para>
37+
<para>&copyright; 2020 &OSS;</para>
3738
</book>

0 commit comments

Comments
 (0)