Browse code

registrar: docs for lookup_xavp(...)

Daniel-Constantin Mierla authored on 12/05/2022 16:41:32
Showing 1 changed files
... ...
@@ -1450,6 +1450,84 @@ lookup_branches("location");
1450 1450
 		</example>
1451 1451
 	</section>
1452 1452
 
1453
+	<section id="registrar.f.lookup_xavp">
1454
+		<title>
1455
+		<function moreinfo="none">lookup_xavp(ultable, uri, rxname, cxname)</function>
1456
+		</title>
1457
+		<para>
1458
+			Similar to lookup(...), but store the location record attributes
1459
+			in XAVPs. Note that not all contact record fields are stored
1460
+		</para>
1461
+		<para>Meaning of the parameters:</para>
1462
+		<itemizedlist>
1463
+		<listitem>
1464
+			<para>
1465
+			<emphasis>ultable</emphasis> - name of the usrloc table that is used
1466
+			for the lookup.
1467
+			</para>
1468
+		<listitem>
1469
+		</listitem>
1470
+			<para>
1471
+			<emphasis>uri</emphasis> - the URI to be searched in location table.
1472
+			</para>
1473
+		</listitem>
1474
+		<listitem>
1475
+			<para>
1476
+				<emphasis>rxname</emphasis> - name of the XAVP to store record
1477
+				attributes. These are:
1478
+			</para>
1479
+			<itemizedlist>
1480
+			<listitem>
1481
+				<para>
1482
+				<emphasis>aor</emphasis> - the address of record.
1483
+				</para>
1484
+			</listitem>
1485
+			</itemizedlist>
1486
+		</listitem>
1487
+		<listitem>
1488
+			<para>
1489
+				<emphasis>cxname</emphasis> - name of the XAVP to store content
1490
+				attributes, name mapping is done from the perspective of using
1491
+				them to send out SIP requests. These are:
1492
+			</para>
1493
+			<itemizedlist>
1494
+			<listitem>
1495
+				<para>
1496
+				<emphasis>uri</emphasis> - the contact address.
1497
+				</para>
1498
+			</listitem>
1499
+			<listitem>
1500
+				<para>
1501
+				<emphasis>socket</emphasis> - the socket of the contact record.
1502
+				</para>
1503
+			</listitem>
1504
+			<listitem>
1505
+				<para>
1506
+				<emphasis>dsturi</emphasis> - the destination uri of the contact
1507
+				record (the received field in location contact).
1508
+				</para>
1509
+			</listitem>
1510
+			</itemizedlist>
1511
+			</itemizedlist>
1512
+		</listitem>
1513
+		</itemizedlist>
1514
+		<para>
1515
+		This function can be used from ANY_ROUTE.
1516
+		</para>
1517
+		<example>
1518
+		<title><function>lookup_xavp</function> usage</title>
1519
+		<programlisting format="linespecific">
1520
+...
1521
+lookup_xavp("location", "$fu", "rul", "cul");
1522
+xinfo("aor: $xavp(rul=&gt;aor)\n");
1523
+xinfo("number of contacts: $xavp(rul&gt;count)\n");
1524
+xinfo("first contact record - uri: $xavp(cul&gt;uri)\n");
1525
+xinfo("first contact record - socket: $xavp(cul&gt;socket)\n");
1526
+...
1527
+</programlisting>
1528
+		</example>
1529
+	</section>
1530
+
1453 1531
 	<section id="registrar.f.registered">
1454 1532
 		<title>
1455 1533
 		<function moreinfo="none">registered(domain [, uri [, match_option [, match_action]]])</function>