[sr-dev] git:master:cf828521: secsipid: docs for secsipid_build_identity(...) function

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 17 16:36:42 CEST 2021


Module: kamailio
Branch: master
Commit: cf82852199f1fee7ee01e4a25d5e79a2ab1bbf8d
URL: https://github.com/kamailio/kamailio/commit/cf82852199f1fee7ee01e4a25d5e79a2ab1bbf8d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-17T16:35:55+02:00

secsipid: docs for secsipid_build_identity(...) function

---

Modified: src/modules/secsipid/doc/secsipid_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/cf82852199f1fee7ee01e4a25d5e79a2ab1bbf8d.diff
Patch: https://github.com/kamailio/kamailio/commit/cf82852199f1fee7ee01e4a25d5e79a2ab1bbf8d.patch

---

diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml
index 527db1aecf..bc1a8ac332 100644
--- a/src/modules/secsipid/doc/secsipid_admin.xml
+++ b/src/modules/secsipid/doc/secsipid_admin.xml
@@ -322,6 +322,42 @@ request_route {
     ...
 }
 ...
+</programlisting>
+		</example>
+	</section>
+	<section id="secsipid.f.secsipid_build_identity">
+		<title>
+		<function moreinfo="none">secsipid_build_identity(origTN, destTN, attest, origID, x5u, keyPath)</function>
+		</title>
+		<para>
+			Build Identity value using the key specified by "keyPath" to sign the JWT body.
+			If origID is empty, a UUID string is generated to fill the field. The origTN
+			represents the origination telephone number; destTN represents the destination
+			telephone number; x5u is the HTTP URL referencing to the public key that
+			should be used to verify the signature; attest represents the attestation
+			level (should be "A", "B" or "C"). On success, the Indentity value is
+			stored in variable $secsipid(val). It also sets $secsipid(ret) to
+			the return value of the libsecsipid functions.
+		</para>
+		<para>
+		The parameters can contain pseudo-variables.
+		</para>
+		<para>
+		This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>secsipid_build_identity</function> usage</title>
+		<programlisting format="linespecific">
+...
+request_route {
+    ...
+    if(secsipid_build_identity("$fU", "$rU", "A", "",
+            "https://kamailio.org/stir/$rd/cert.pem", "/secsipid/$rd/key.pem")) {
+        xinfo("Identity value: $secsipid(val)\n");
+    }
+    ...
+}
+...
 </programlisting>
 		</example>
 	</section>




More information about the sr-dev mailing list