Browse code

phonenum: docs - updated pv names to match c code

Daniel-Constantin Mierla authored on 21/03/2018 13:59:00
Showing 1 changed files
... ...
@@ -111,8 +111,13 @@ modparam("phonenum", "smode", 0)
111 111
 		<title><function>phonenum_match</function> usage</title>
112 112
 		<programlisting format="linespecific">
113 113
 ...
114
-if(phonenum_match("1-484-555-8888", "src"))
115
-    xlog("number normalized to: $phn(src=&gt;num)\n");
114
+if(phonenum_match("1-484-555-8888", "src")) {
115
+    if($phn(src=&gt;valid)==1) {
116
+        xlog("number normalized to: $phn(src=&gt;normalized)\n");
117
+    } else {
118
+        xlog("number normalization error: $phn(src=&gt;error)\n");
119
+    }
120
+}
116 121
 ...
117 122
 </programlisting>
118 123
 	    </example>
... ...
@@ -131,16 +136,27 @@ if(phonenum_match("1-484-555-8888", "src"))
131 136
 				</para>
132 137
 			<itemizedlist>
133 138
 				<listitem><para>
134
-					<emphasis>number</emphasis> - normalized phone number
139
+					<emphasis>number</emphasis> - phone number that is matched
135 140
 				</para></listitem>
136 141
 				<listitem><para>
137
-					<emphasis>country</emphasis> - country for phone number
142
+					<emphasis>valid</emphasis> - 1 if the matched number has a
143
+					valid result; 0 otherwise
138 144
 				</para></listitem>
139 145
 				<listitem><para>
140
-					<emphasis>region</emphasis> - region for phone number
146
+					<emphasis>normalized</emphasis> - normalized phone number
141 147
 				</para></listitem>
142 148
 				<listitem><para>
143
-					<emphasis>operator</emphasis> - operator for phone number
149
+					<emphasis>cctel</emphasis> - country code for phone number
150
+				</para></listitem>
151
+				<listitem><para>
152
+					<emphasis>ltype</emphasis> - local network type
153
+				</para></listitem>
154
+				<listitem><para>
155
+					<emphasis>ndesc</emphasis> - phone number description
156
+				</para></listitem>
157
+				<listitem><para>
158
+					<emphasis>error</emphasis> - error string if phone number
159
+					matching fails.
144 160
 				</para></listitem>
145 161
 			</itemizedlist>
146 162
 			</listitem>