File: uri_user.sgml

package info (click to toggle)
openser 1.1.0-9etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,828 kB
  • ctags: 11,809
  • sloc: ansic: 120,528; sh: 5,249; yacc: 1,716; makefile: 1,261; php: 656; perl: 205; sql: 190
file content (211 lines) | stat: -rw-r--r-- 4,584 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!-- Module User's Guide -->

<chapter>
	<chapterinfo>
	<revhistory>
		<revision>
		<revnumber>$Revision: 1.2 $</revnumber>
		<date>$Date: 2005/10/11 21:15:12 $</date>
		</revision>
	</revhistory>
	</chapterinfo>
	<title>User's Guide</title>
	
	<section>
	<title>Overview</title>
	<para>Various checks related to &sip; &uri;.</para>
	</section>
	<section>
	<title>Dependencies</title>
	<section>
		<title>&ser; Modules</title>
		<para>None.</para>
	</section>
	<section>
		<title>External Libraries or Applications</title>
		<para>
		The following libraries or applications must be installed before running
		&ser; with this module loaded:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>None</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	</section>
	<section>
	<title>Exported Parameters</title>
	<para>
		None.
	</para>
	</section>
	<section>
	<title>Exported Functions</title>
	<section>
		<title>
		<function moreinfo="none">is_user(username)</function>
		</title>
		<para>
		Check if the username in credentials matches the given username.
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para><emphasis>username</emphasis> - Username string.
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE.
		</para>
		<example>
		<title><function>is_user</function> usage</title>
		<programlisting format="linespecific">
...
if (is_user("john")) {
	...
};
...
</programlisting>
		</example>
	</section>
	<section>
		<title>
		<function moreinfo="none">has_totag()</function>
		</title>
		<para>
		Check if To header field uri contains tag parameter.
		</para>
		<para>
		This function can be used from REQUEST_ROUTE.
		</para>
		<example>
		<title><function>has_totag</function> usage</title>
		<programlisting format="linespecific">
...
if (has_totag()) {
	...
};
...
</programlisting>
		</example>
	</section>
	<section>
		<title>
		<function moreinfo="none">uri_param(param)</function>
		</title>
		<para>
		Find if Request URI has a given parameter with no value
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para><emphasis>param</emphasis> - parameter name to look for.
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE.
		</para>
		<example>
		<title><function>uri_param</function> usage</title>
		<programlisting format="linespecific">
...
if (uri_param("param1")) {
	...
};
...
</programlisting>
		</example>
	</section>
	<section>
		<title>
		<function moreinfo="none">uri_param(param,value)</function>
		</title>
		<para>
		Find if Request URI has a given parameter with matching value
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para><emphasis>param</emphasis> - parameter name to look for.
			</para>
		</listitem>
		<listitem>
			<para><emphasis>value</emphasis> - parameter value to match.
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE.
		</para>
		<example>
		<title><function>uri_param</function> usage</title>
		<programlisting format="linespecific">
...
if (uri_param("param1","value1")) {
	...
};
...
</programlisting>
		</example>
	</section>
	<section>
		<title>
		<function moreinfo="none">add_uri_param(param)</function>
		</title>
		<para>
		Add to RURI a parameter (name=value);
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para><emphasis>param</emphasis> - parameter to be appended in
			<quote>name=value</quote> format.
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE.
		</para>
		<example>
		<title><function>add_uri_param</function> usage</title>
		<programlisting format="linespecific">
...
add_uri_param("nat=yes");
...
</programlisting>
		</example>
	</section>
	<section>
		<title>
		<function moreinfo="none">tel2sip()</function>
		</title>
		<para>
		Converts RURI, if it is tel URI, to SIP URI.  Returns true, only if
		conversion succeeded or if no conversion was needed (like RURI
		was not tel URI.
		</para>
		<para>
		This function can be used from REQUEST_ROUTE.
		</para>
		<example>
		<title><function>tel2sip</function> usage</title>
		<programlisting format="linespecific">
...
tel2sip();
...
</programlisting>
		</example>
	</section>
	</section>
</chapter>

<!-- Keep this element at the end of the file
Local Variables:
sgml-parent-document: ("uri.sgml" "Book" "chapter")
End:
-->