]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_pjsip_aor/contact: Fix documentation for contact ID
authorGeorge Joseph <gjoseph@sangoma.com>
Sat, 9 Nov 2024 22:34:41 +0000 (15:34 -0700)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 14 Nov 2024 20:01:35 +0000 (20:01 +0000)
Clarified the use of the contact ID returned from PJSIP_AOR.

Resolves: #990
(cherry picked from commit a04e4f38fe7a61156c9e799df5bb568cf433bf51)

funcs/func_pjsip_aor.c
funcs/func_pjsip_contact.c

index 9ae51ed87b3293550dd2645050899782eb5a8e8c..1d241615171637a102170bdc4276399d0eaaaeda 100644 (file)
                                Supported options are those fields on the
                                <replaceable>aor</replaceable> object in
                                <filename>pjsip.conf</filename>.</para>
+                               <note><para>
+                                       When requested with this function, the <literal>contact</literal>
+                                       parameter will return both permanent and dynamic contacts.
+                               </para></note>
+                               <note><para>
+                                       The return value of the <literal>contact</literal> parameter is
+                                       one or more internal contact IDs separated by commans.
+                                       To get details about the contact itself, including the URI,
+                                       call the <literal>PJSIP_CONTACT</literal> dialplan function
+                                       with the contact ID and the desired contact parameter.
+                               </para></note>
+                               <para>
+                               </para>
+                               <para>
+                               Available Fields:
+                               </para>
                                <enumlist>
                                        <configOptionToEnum>
                                                <xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption)"/>
@@ -64,6 +80,9 @@
                                </enumlist>
                        </parameter>
                </syntax>
+               <see-also>
+                       <ref type="function">PJSIP_CONTACT</ref>
+               </see-also>
        </function>
 ***/
 
index 44272e1a0c3599a1cd4e72e80df50160f3b92c63..a8981eb5219c84867bb2443a9edbed033effce3a 100644 (file)
                </synopsis>
                <syntax>
                        <parameter name="name" required="true">
-                               <para>The name of the contact to query.</para>
+                               <para>
+                               Contact names are in the form of "aor_id@@hash" for dynamic contacts
+                               created by the registrar and permanent contacts defined
+                               in a <literal>contact</literal> parameter in an <literal>aor</literal>
+                               object.  You can get the "aor_id@@hash" contact ID by calling the
+                               <literal>PJSIP_AOR()</literal> dialplpan function with the AOR name
+                               and the <literal>contact</literal> field.  You can then pass the value
+                               returned to this function.
+                               </para>
                        </parameter>
                        <parameter name="field" required="true">
                                <para>The configuration option for the contact to query for.
@@ -69,6 +77,9 @@
                                </enumlist>
                        </parameter>
                </syntax>
+               <see-also>
+                       <ref type="function">PJSIP_AOR</ref>
+               </see-also>
        </function>
 ***/