af2f93749f04cf334d90df1ec082246d57450853
[asterisk/asterisk.git] / res / res_pjsip.c
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2013, Digium, Inc.
5  *
6  * Mark Michelson <mmichelson@digium.com>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18
19 #include "asterisk.h"
20
21 #include <pjsip.h>
22 /* Needed for SUBSCRIBE, NOTIFY, and PUBLISH method definitions */
23 #include <pjsip_simple.h>
24 #include <pjsip/sip_transaction.h>
25 #include <pj/timer.h>
26 #include <pjlib.h>
27 #include <pjmedia/errno.h>
28
29 #include "asterisk/res_pjsip.h"
30 #include "res_pjsip/include/res_pjsip_private.h"
31 #include "asterisk/linkedlists.h"
32 #include "asterisk/logger.h"
33 #include "asterisk/lock.h"
34 #include "asterisk/utils.h"
35 #include "asterisk/astobj2.h"
36 #include "asterisk/module.h"
37 #include "asterisk/threadpool.h"
38 #include "asterisk/taskprocessor.h"
39 #include "asterisk/uuid.h"
40 #include "asterisk/sorcery.h"
41 #include "asterisk/file.h"
42 #include "asterisk/cli.h"
43 #include "asterisk/res_pjsip_cli.h"
44 #include "asterisk/test.h"
45 #include "asterisk/res_pjsip_presence_xml.h"
46 #include "asterisk/res_pjproject.h"
47
48 /*** MODULEINFO
49         <depend>pjproject</depend>
50         <depend>res_pjproject</depend>
51         <depend>res_sorcery_config</depend>
52         <depend>res_sorcery_memory</depend>
53         <depend>res_sorcery_astdb</depend>
54         <support_level>core</support_level>
55  ***/
56
57 /*** DOCUMENTATION
58         <configInfo name="res_pjsip" language="en_US">
59                 <synopsis>SIP Resource using PJProject</synopsis>
60                 <configFile name="pjsip.conf">
61                         <configObject name="endpoint">
62                                 <synopsis>Endpoint</synopsis>
63                                 <description><para>
64                                         The <emphasis>Endpoint</emphasis> is the primary configuration object.
65                                         It contains the core SIP related options only, endpoints are <emphasis>NOT</emphasis>
66                                         dialable entries of their own. Communication with another SIP device is
67                                         accomplished via Addresses of Record (AoRs) which have one or more
68                                         contacts assicated with them. Endpoints <emphasis>NOT</emphasis> configured to
69                                         use a <literal>transport</literal> will default to first transport found
70                                         in <filename>pjsip.conf</filename> that matches its type.
71                                         </para>
72                                         <para>Example: An Endpoint has been configured with no transport.
73                                         When it comes time to call an AoR, PJSIP will find the
74                                         first transport that matches the type. A SIP URI of <literal>sip:5000@[11::33]</literal>
75                                         will use the first IPv6 transport and try to send the request.
76                                         </para>
77                                         <para>If the anonymous endpoint identifier is in use an endpoint with the name
78                                         "anonymous@domain" will be searched for as a last resort. If this is not found
79                                         it will fall back to searching for "anonymous". If neither endpoints are found
80                                         the anonymous endpoint identifier will not return an endpoint and anonymous
81                                         calling will not be possible.
82                                         </para>
83                                 </description>
84                                 <configOption name="100rel" default="yes">
85                                         <synopsis>Allow support for RFC3262 provisional ACK tags</synopsis>
86                                         <description>
87                                                 <enumlist>
88                                                         <enum name="no" />
89                                                         <enum name="required" />
90                                                         <enum name="yes" />
91                                                 </enumlist>
92                                         </description>
93                                 </configOption>
94                                 <configOption name="aggregate_mwi" default="yes">
95                                         <synopsis>Condense MWI notifications into a single NOTIFY.</synopsis>
96                                         <description><para>When enabled, <replaceable>aggregate_mwi</replaceable> condenses message
97                                         waiting notifications from multiple mailboxes into a single NOTIFY. If it is disabled,
98                                         individual NOTIFYs are sent for each mailbox.</para></description>
99                                 </configOption>
100                                 <configOption name="allow">
101                                         <synopsis>Media Codec(s) to allow</synopsis>
102                                 </configOption>
103                                 <configOption name="aors">
104                                         <synopsis>AoR(s) to be used with the endpoint</synopsis>
105                                         <description><para>
106                                                 List of comma separated AoRs that the endpoint should be associated with.
107                                         </para></description>
108                                 </configOption>
109                                 <configOption name="auth">
110                                         <synopsis>Authentication Object(s) associated with the endpoint</synopsis>
111                                         <description><para>
112                                                 This is a comma-delimited list of <replaceable>auth</replaceable> sections defined
113                                                 in <filename>pjsip.conf</filename> to be used to verify inbound connection attempts.
114                                                 </para><para>
115                                                 Endpoints without an <literal>authentication</literal> object
116                                                 configured will allow connections without vertification.
117                                         </para></description>
118                                 </configOption>
119                                 <configOption name="callerid">
120                                         <synopsis>CallerID information for the endpoint</synopsis>
121                                         <description><para>
122                                                 Must be in the format <literal>Name &lt;Number&gt;</literal>,
123                                                 or only <literal>&lt;Number&gt;</literal>.
124                                         </para></description>
125                                 </configOption>
126                                 <configOption name="callerid_privacy">
127                                         <synopsis>Default privacy level</synopsis>
128                                         <description>
129                                                 <enumlist>
130                                                         <enum name="allowed_not_screened" />
131                                                         <enum name="allowed_passed_screen" />
132                                                         <enum name="allowed_failed_screen" />
133                                                         <enum name="allowed" />
134                                                         <enum name="prohib_not_screened" />
135                                                         <enum name="prohib_passed_screen" />
136                                                         <enum name="prohib_failed_screen" />
137                                                         <enum name="prohib" />
138                                                         <enum name="unavailable" />
139                                                 </enumlist>
140                                         </description>
141                                 </configOption>
142                                 <configOption name="callerid_tag">
143                                         <synopsis>Internal id_tag for the endpoint</synopsis>
144                                 </configOption>
145                                 <configOption name="context">
146                                         <synopsis>Dialplan context for inbound sessions</synopsis>
147                                 </configOption>
148                                 <configOption name="direct_media_glare_mitigation" default="none">
149                                         <synopsis>Mitigation of direct media (re)INVITE glare</synopsis>
150                                         <description>
151                                                 <para>
152                                                 This setting attempts to avoid creating INVITE glare scenarios
153                                                 by disabling direct media reINVITEs in one direction thereby allowing
154                                                 designated servers (according to this option) to initiate direct
155                                                 media reINVITEs without contention and significantly reducing call
156                                                 setup time.
157                                                 </para>
158                                                 <para>
159                                                 A more detailed description of how this option functions can be found on
160                                                 the Asterisk wiki https://wiki.asterisk.org/wiki/display/AST/SIP+Direct+Media+Reinvite+Glare+Avoidance
161                                                 </para>
162                                                 <enumlist>
163                                                         <enum name="none" />
164                                                         <enum name="outgoing" />
165                                                         <enum name="incoming" />
166                                                 </enumlist>
167                                         </description>
168                                 </configOption>
169                                 <configOption name="direct_media_method" default="invite">
170                                         <synopsis>Direct Media method type</synopsis>
171                                         <description>
172                                                 <para>Method for setting up Direct Media between endpoints.</para>
173                                                 <enumlist>
174                                                         <enum name="invite" />
175                                                         <enum name="reinvite">
176                                                                 <para>Alias for the <literal>invite</literal> value.</para>
177                                                         </enum>
178                                                         <enum name="update" />
179                                                 </enumlist>
180                                         </description>
181                                 </configOption>
182                                 <configOption name="connected_line_method" default="invite">
183                                         <synopsis>Connected line method type</synopsis>
184                                         <description>
185                                                 <para>Method used when updating connected line information.</para>
186                                                 <enumlist>
187                                                         <enum name="invite" />
188                                                         <enum name="reinvite">
189                                                                 <para>Alias for the <literal>invite</literal> value.</para>
190                                                         </enum>
191                                                         <enum name="update" />
192                                                 </enumlist>
193                                         </description>
194                                 </configOption>
195                                 <configOption name="direct_media" default="yes">
196                                         <synopsis>Determines whether media may flow directly between endpoints.</synopsis>
197                                 </configOption>
198                                 <configOption name="disable_direct_media_on_nat" default="no">
199                                         <synopsis>Disable direct media session refreshes when NAT obstructs the media session</synopsis>
200                                 </configOption>
201                                 <configOption name="disallow">
202                                         <synopsis>Media Codec(s) to disallow</synopsis>
203                                 </configOption>
204                                 <configOption name="dtmf_mode" default="rfc4733">
205                                         <synopsis>DTMF mode</synopsis>
206                                         <description>
207                                                 <para>This setting allows to choose the DTMF mode for endpoint communication.</para>
208                                                 <enumlist>
209                                                         <enum name="rfc4733">
210                                                                 <para>DTMF is sent out of band of the main audio stream.  This
211                                                                 supercedes the older <emphasis>RFC-2833</emphasis> used within
212                                                                 the older <literal>chan_sip</literal>.</para>
213                                                         </enum>
214                                                         <enum name="inband">
215                                                                 <para>DTMF is sent as part of audio stream.</para>
216                                                         </enum>
217                                                         <enum name="info">
218                                                                 <para>DTMF is sent as SIP INFO packets.</para>
219                                                         </enum>
220                                                         <enum name="auto">
221                                                                 <para>DTMF is sent as RFC 4733 if the other side supports it or as INBAND if not.</para>
222                                                         </enum>
223
224                                                 </enumlist>
225                                         </description>
226                                 </configOption>
227                                 <configOption name="media_address">
228                                         <synopsis>IP address used in SDP for media handling</synopsis>
229                                         <description><para>
230                                                 At the time of SDP creation, the IP address defined here will be used as
231                                                 the media address for individual streams in the SDP.
232                                         </para>
233                                         <note><para>
234                                                 Be aware that the <literal>external_media_address</literal> option, set in Transport
235                                                 configuration, can also affect the final media address used in the SDP.
236                                         </para></note>
237                                         </description>
238                                 </configOption>
239                                 <configOption name="bind_rtp_to_media_address">
240                                         <synopsis>Bind the RTP instance to the media_address</synopsis>
241                                         <description><para>
242                                                 If media_address is specified, this option causes the RTP instance to be bound to the
243                                                 specified ip address which causes the packets to be sent from that address.
244                                         </para>
245                                         </description>
246                                 </configOption>
247                                 <configOption name="force_rport" default="yes">
248                                         <synopsis>Force use of return port</synopsis>
249                                 </configOption>
250                                 <configOption name="ice_support" default="no">
251                                         <synopsis>Enable the ICE mechanism to help traverse NAT</synopsis>
252                                 </configOption>
253                                 <configOption name="identify_by" default="username,location">
254                                         <synopsis>Way(s) for Endpoint to be identified</synopsis>
255                                         <description><para>
256                                                 Endpoints and aors can be identified in multiple ways. Currently, the supported
257                                                 options are <literal>username</literal>, which matches the endpoint or aor id based on
258                                                 the username and domain in the From header (or To header for aors), and
259                                                 <literal>auth_username</literal>, which matches the endpoint or aor id based on the
260                                                 username and realm in the Authentication header.  In all cases, if an exact match
261                                                 on both username and domain/realm fails, the match will be retried with just the username.
262                                                 </para>
263                                                 <note><para>
264                                                 Identification by auth_username has some security considerations because an
265                                                 Authentication header is not present on the first message of a dialog when
266                                                 digest authentication is used.  The client can't generate it until the server
267                                                 sends the challenge in a 401 response.  Since Asterisk normally sends a security
268                                                 event when an incoming request can't be matched to an endpoint, using auth_username
269                                                 requires that the security event be deferred until a request is received with
270                                                 the Authentication header and only generated if the username doesn't result in a
271                                                 match.  This may result in a delay before an attack is recognized.  You can control
272                                                 how many unmatched requests are received from a single ip address before a security
273                                                 event is generated using the unidentified_request parameters in the "global"
274                                                 configuration object.
275                                                 </para></note>
276                                                 <note><para>Endpoints can also be identified by IP address; however, that method
277                                                 of identification is not handled by this configuration option. See the documentation
278                                                 for the <literal>identify</literal> configuration section for more details on that
279                                                 method of endpoint identification. If this option is set and an <literal>identify</literal>
280                                                 configuration section exists for the endpoint, then the endpoint can be identified in
281                                                 multiple ways.</para></note>
282                                                 <enumlist>
283                                                         <enum name="username" />
284                                                         <enum name="auth_username" />
285                                                 </enumlist>
286                                         </description>
287                                 </configOption>
288                                 <configOption name="redirect_method">
289                                         <synopsis>How redirects received from an endpoint are handled</synopsis>
290                                         <description><para>
291                                                 When a redirect is received from an endpoint there are multiple ways it can be handled.
292                                                 If this option is set to <literal>user</literal> the user portion of the redirect target
293                                                 is treated as an extension within the dialplan and dialed using a Local channel. If this option
294                                                 is set to <literal>uri_core</literal> the target URI is returned to the dialing application
295                                                 which dials it using the PJSIP channel driver and endpoint originally used. If this option is
296                                                 set to <literal>uri_pjsip</literal> the redirect occurs within chan_pjsip itself and is not exposed
297                                                 to the core at all. The <literal>uri_pjsip</literal> option has the benefit of being more efficient
298                                                 and also supporting multiple potential redirect targets. The con is that since redirection occurs
299                                                 within chan_pjsip redirecting information is not forwarded and redirection can not be
300                                                 prevented.
301                                                 </para>
302                                                 <enumlist>
303                                                         <enum name="user" />
304                                                         <enum name="uri_core" />
305                                                         <enum name="uri_pjsip" />
306                                                 </enumlist>
307                                         </description>
308                                 </configOption>
309                                 <configOption name="mailboxes">
310                                         <synopsis>NOTIFY the endpoint when state changes for any of the specified mailboxes</synopsis>
311                                         <description><para>
312                                                 Asterisk will send unsolicited MWI NOTIFY messages to the endpoint when state
313                                                 changes happen for any of the specified mailboxes. More than one mailbox can be
314                                                 specified with a comma-delimited string. app_voicemail mailboxes must be specified
315                                                 as mailbox@context; for example: mailboxes=6001@default. For mailboxes provided by
316                                                 external sources, such as through the res_external_mwi module, you must specify
317                                                 strings supported by the external system.
318                                         </para><para>
319                                                 For endpoints that SUBSCRIBE for MWI, use the <literal>mailboxes</literal> option in your AOR
320                                                 configuration.
321                                         </para></description>
322                                 </configOption>
323                                 <configOption name="mwi_subscribe_replaces_unsolicited">
324                                         <synopsis>An MWI subscribe will replace sending unsolicited NOTIFYs</synopsis>
325                                 </configOption>
326                                 <configOption name="voicemail_extension">
327                                         <synopsis>The voicemail extension to send in the NOTIFY Message-Account header</synopsis>
328                                 </configOption>
329                                 <configOption name="moh_suggest" default="default">
330                                         <synopsis>Default Music On Hold class</synopsis>
331                                 </configOption>
332                                 <configOption name="outbound_auth">
333                                         <synopsis>Authentication object used for outbound requests</synopsis>
334                                 </configOption>
335                                 <configOption name="outbound_proxy">
336                                         <synopsis>Proxy through which to send requests, a full SIP URI must be provided</synopsis>
337                                 </configOption>
338                                 <configOption name="rewrite_contact">
339                                         <synopsis>Allow Contact header to be rewritten with the source IP address-port</synopsis>
340                                         <description><para>
341                                                 On inbound SIP messages from this endpoint, the Contact header or an appropriate Record-Route
342                                                 header will be changed to have the source IP address and port. This option does not affect
343                                                 outbound messages sent to this endpoint.
344                                         </para></description>
345                                 </configOption>
346                                 <configOption name="rtp_ipv6" default="no">
347                                         <synopsis>Allow use of IPv6 for RTP traffic</synopsis>
348                                 </configOption>
349                                 <configOption name="rtp_symmetric" default="no">
350                                         <synopsis>Enforce that RTP must be symmetric</synopsis>
351                                 </configOption>
352                                 <configOption name="send_diversion" default="yes">
353                                         <synopsis>Send the Diversion header, conveying the diversion
354                                         information to the called user agent</synopsis>
355                                 </configOption>
356                                 <configOption name="send_pai" default="no">
357                                         <synopsis>Send the P-Asserted-Identity header</synopsis>
358                                 </configOption>
359                                 <configOption name="send_rpid" default="no">
360                                         <synopsis>Send the Remote-Party-ID header</synopsis>
361                                 </configOption>
362                                 <configOption name="rpid_immediate" default="no">
363                                         <synopsis>Immediately send connected line updates on unanswered incoming calls.</synopsis>
364                                         <description>
365                                                 <para>When enabled, immediately send <emphasis>180 Ringing</emphasis>
366                                                 or <emphasis>183 Progress</emphasis> response messages to the
367                                                 caller if the connected line information is updated before
368                                                 the call is answered.  This can send a <emphasis>180 Ringing</emphasis>
369                                                 response before the call has even reached the far end.  The
370                                                 caller can start hearing ringback before the far end even gets
371                                                 the call.  Many phones tend to grab the first connected line
372                                                 information and refuse to update the display if it changes.  The
373                                                 first information is not likely to be correct if the call
374                                                 goes to an endpoint not under the control of this Asterisk
375                                                 box.</para>
376                                                 <para>When disabled, a connected line update must wait for
377                                                 another reason to send a message with the connected line
378                                                 information to the caller before the call is answered.  You can
379                                                 trigger the sending of the information by using an appropriate
380                                                 dialplan application such as <emphasis>Ringing</emphasis>.</para>
381                                         </description>
382                                 </configOption>
383                                 <configOption name="timers_min_se" default="90">
384                                         <synopsis>Minimum session timers expiration period</synopsis>
385                                         <description><para>
386                                                 Minimium session timer expiration period. Time in seconds.
387                                         </para></description>
388                                 </configOption>
389                                 <configOption name="timers" default="yes">
390                                         <synopsis>Session timers for SIP packets</synopsis>
391                                         <description>
392                                                 <enumlist>
393                                                         <enum name="no" />
394                                                         <enum name="yes" />
395                                                         <enum name="required" />
396                                                         <enum name="always" />
397                                                         <enum name="forced"><para>Alias of always</para></enum>
398                                                 </enumlist>
399                                         </description>
400                                 </configOption>
401                                 <configOption name="timers_sess_expires" default="1800">
402                                         <synopsis>Maximum session timer expiration period</synopsis>
403                                         <description><para>
404                                                 Maximium session timer expiration period. Time in seconds.
405                                         </para></description>
406                                 </configOption>
407                                 <configOption name="transport">
408                                         <synopsis>Desired transport configuration</synopsis>
409                                         <description><para>
410                                                 This will set the desired transport configuration to send SIP data through.
411                                                 </para>
412                                                 <warning><para>Not specifying a transport will <emphasis>DEFAULT</emphasis>
413                                                 to the first configured transport in <filename>pjsip.conf</filename> which is
414                                                 valid for the URI we are trying to contact.
415                                                 </para></warning>
416                                                 <warning><para>Transport configuration is not affected by reloads. In order to
417                                                 change transports, a full Asterisk restart is required</para></warning>
418                                         </description>
419                                 </configOption>
420                                 <configOption name="trust_id_inbound" default="no">
421                                         <synopsis>Accept identification information received from this endpoint</synopsis>
422                                         <description><para>This option determines whether Asterisk will accept
423                                         identification from the endpoint from headers such as P-Asserted-Identity
424                                         or Remote-Party-ID header. This option applies both to calls originating from the
425                                         endpoint and calls originating from Asterisk. If <literal>no</literal>, the
426                                         configured Caller-ID from pjsip.conf will always be used as the identity for
427                                         the endpoint.</para></description>
428                                 </configOption>
429                                 <configOption name="trust_id_outbound" default="no">
430                                         <synopsis>Send private identification details to the endpoint.</synopsis>
431                                         <description><para>This option determines whether res_pjsip will send private
432                                         identification information to the endpoint. If <literal>no</literal>,
433                                         private Caller-ID information will not be forwarded to the endpoint.
434                                         "Private" in this case refers to any method of restricting identification.
435                                         Example: setting <replaceable>callerid_privacy</replaceable> to any
436                                         <literal>prohib</literal> variation.
437                                         Example: If <replaceable>trust_id_inbound</replaceable> is set to
438                                         <literal>yes</literal>, the presence of a <literal>Privacy: id</literal>
439                                         header in a SIP request or response would indicate the identification
440                                         provided in the request is private.</para></description>
441                                 </configOption>
442                                 <configOption name="type">
443                                         <synopsis>Must be of type 'endpoint'.</synopsis>
444                                 </configOption>
445                                 <configOption name="use_ptime" default="no">
446                                         <synopsis>Use Endpoint's requested packetisation interval</synopsis>
447                                 </configOption>
448                                 <configOption name="use_avpf" default="no">
449                                         <synopsis>Determines whether res_pjsip will use and enforce usage of AVPF for this
450                                         endpoint.</synopsis>
451                                         <description><para>
452                                                 If set to <literal>yes</literal>, res_pjsip will use the AVPF or SAVPF RTP
453                                                 profile for all media offers on outbound calls and media updates and will
454                                                 decline media offers not using the AVPF or SAVPF profile.
455                                         </para><para>
456                                                 If set to <literal>no</literal>, res_pjsip will use the AVP or SAVP RTP
457                                                 profile for all media offers on outbound calls and media updates, and will
458                                                 decline media offers not using the AVP or SAVP profile.
459                                         </para></description>
460                                 </configOption>
461                                 <configOption name="force_avp" default="no">
462                                         <synopsis>Determines whether res_pjsip will use and enforce usage of AVP,
463                                         regardless of the RTP profile in use for this endpoint.</synopsis>
464                                         <description><para>
465                                                 If set to <literal>yes</literal>, res_pjsip will use the AVP, AVPF, SAVP, or
466                                                 SAVPF RTP profile for all media offers on outbound calls and media updates including
467                                                 those for DTLS-SRTP streams.
468                                         </para><para>
469                                                 If set to <literal>no</literal>, res_pjsip will use the respective RTP profile
470                                                 depending on configuration.
471                                         </para></description>
472                                 </configOption>
473                                 <configOption name="media_use_received_transport" default="no">
474                                         <synopsis>Determines whether res_pjsip will use the media transport received in the
475                                         offer SDP in the corresponding answer SDP.</synopsis>
476                                         <description><para>
477                                                 If set to <literal>yes</literal>, res_pjsip will use the received media transport.
478                                         </para><para>
479                                                 If set to <literal>no</literal>, res_pjsip will use the respective RTP profile
480                                                 depending on configuration.
481                                         </para></description>
482                                 </configOption>
483                                 <configOption name="media_encryption" default="no">
484                                         <synopsis>Determines whether res_pjsip will use and enforce usage of media encryption
485                                         for this endpoint.</synopsis>
486                                         <description>
487                                                 <enumlist>
488                                                         <enum name="no"><para>
489                                                                 res_pjsip will offer no encryption and allow no encryption to be setup.
490                                                         </para></enum>
491                                                         <enum name="sdes"><para>
492                                                                 res_pjsip will offer standard SRTP setup via in-SDP keys. Encrypted SIP
493                                                                 transport should be used in conjunction with this option to prevent
494                                                                 exposure of media encryption keys.
495                                                         </para></enum>
496                                                         <enum name="dtls"><para>
497                                                                 res_pjsip will offer DTLS-SRTP setup.
498                                                         </para></enum>
499                                                 </enumlist>
500                                         </description>
501                                 </configOption>
502                                 <configOption name="media_encryption_optimistic" default="no">
503                                         <synopsis>Determines whether encryption should be used if possible but does not terminate the
504                                         session if not achieved.</synopsis>
505                                         <description><para>
506                                                 This option only applies if <replaceable>media_encryption</replaceable> is
507                                                 set to <literal>sdes</literal> or <literal>dtls</literal>.
508                                         </para></description>
509                                 </configOption>
510                                 <configOption name="g726_non_standard" default="no">
511                                         <synopsis>Force g.726 to use AAL2 packing order when negotiating g.726 audio</synopsis>
512                                         <description><para>
513                                                 When set to "yes" and an endpoint negotiates g.726 audio then use g.726 for AAL2
514                                                 packing order instead of what is recommended by RFC3551. Since this essentially
515                                                 replaces the underlying 'g726' codec with 'g726aal2' then 'g726aal2' needs to be
516                                                 specified in the endpoint's allowed codec list.
517                                         </para></description>
518                                 </configOption>
519                                 <configOption name="inband_progress" default="no">
520                                         <synopsis>Determines whether chan_pjsip will indicate ringing using inband
521                                             progress.</synopsis>
522                                         <description><para>
523                                                 If set to <literal>yes</literal>, chan_pjsip will send a 183 Session Progress
524                                                 when told to indicate ringing and will immediately start sending ringing
525                                                 as audio.
526                                         </para><para>
527                                                 If set to <literal>no</literal>, chan_pjsip will send a 180 Ringing when told
528                                                 to indicate ringing and will NOT send it as audio.
529                                         </para></description>
530                                 </configOption>
531                                 <configOption name="call_group">
532                                         <synopsis>The numeric pickup groups for a channel.</synopsis>
533                                         <description><para>
534                                                 Can be set to a comma separated list of numbers or ranges between the values
535                                                 of 0-63 (maximum of 64 groups).
536                                         </para></description>
537                                 </configOption>
538                                 <configOption name="pickup_group">
539                                         <synopsis>The numeric pickup groups that a channel can pickup.</synopsis>
540                                         <description><para>
541                                                 Can be set to a comma separated list of numbers or ranges between the values
542                                                 of 0-63 (maximum of 64 groups).
543                                         </para></description>
544                                 </configOption>
545                                 <configOption name="named_call_group">
546                                         <synopsis>The named pickup groups for a channel.</synopsis>
547                                         <description><para>
548                                                 Can be set to a comma separated list of case sensitive strings limited by
549                                                 supported line length.
550                                         </para></description>
551                                 </configOption>
552                                 <configOption name="named_pickup_group">
553                                         <synopsis>The named pickup groups that a channel can pickup.</synopsis>
554                                         <description><para>
555                                                 Can be set to a comma separated list of case sensitive strings limited by
556                                                 supported line length.
557                                         </para></description>
558                                 </configOption>
559                                 <configOption name="device_state_busy_at" default="0">
560                                         <synopsis>The number of in-use channels which will cause busy to be returned as device state</synopsis>
561                                         <description><para>
562                                                 When the number of in-use channels for the endpoint matches the devicestate_busy_at setting the
563                                                 PJSIP channel driver will return busy as the device state instead of in use.
564                                         </para></description>
565                                 </configOption>
566                                 <configOption name="t38_udptl" default="no">
567                                         <synopsis>Whether T.38 UDPTL support is enabled or not</synopsis>
568                                         <description><para>
569                                                 If set to yes T.38 UDPTL support will be enabled, and T.38 negotiation requests will be accepted
570                                                 and relayed.
571                                         </para></description>
572                                 </configOption>
573                                 <configOption name="t38_udptl_ec" default="none">
574                                         <synopsis>T.38 UDPTL error correction method</synopsis>
575                                         <description>
576                                                 <enumlist>
577                                                         <enum name="none"><para>
578                                                                 No error correction should be used.
579                                                         </para></enum>
580                                                         <enum name="fec"><para>
581                                                                 Forward error correction should be used.
582                                                         </para></enum>
583                                                         <enum name="redundancy"><para>
584                                                                 Redundacy error correction should be used.
585                                                         </para></enum>
586                                                 </enumlist>
587                                         </description>
588                                 </configOption>
589                                 <configOption name="t38_udptl_maxdatagram" default="0">
590                                         <synopsis>T.38 UDPTL maximum datagram size</synopsis>
591                                         <description><para>
592                                                 This option can be set to override the maximum datagram of a remote endpoint for broken
593                                                 endpoints.
594                                         </para></description>
595                                 </configOption>
596                                 <configOption name="fax_detect" default="no">
597                                         <synopsis>Whether CNG tone detection is enabled</synopsis>
598                                         <description><para>
599                                                 This option can be set to send the session to the fax extension when a CNG tone is
600                                                 detected.
601                                         </para></description>
602                                 </configOption>
603                                 <configOption name="t38_udptl_nat" default="no">
604                                         <synopsis>Whether NAT support is enabled on UDPTL sessions</synopsis>
605                                         <description><para>
606                                                 When enabled the UDPTL stack will send UDPTL packets to the source address of
607                                                 received packets.
608                                         </para></description>
609                                 </configOption>
610                                 <configOption name="t38_udptl_ipv6" default="no">
611                                         <synopsis>Whether IPv6 is used for UDPTL Sessions</synopsis>
612                                         <description><para>
613                                                 When enabled the UDPTL stack will use IPv6.
614                                         </para></description>
615                                 </configOption>
616                                 <configOption name="tone_zone">
617                                         <synopsis>Set which country's indications to use for channels created for this endpoint.</synopsis>
618                                 </configOption>
619                                 <configOption name="language">
620                                         <synopsis>Set the default language to use for channels created for this endpoint.</synopsis>
621                                 </configOption>
622                                 <configOption name="one_touch_recording" default="no">
623                                         <synopsis>Determines whether one-touch recording is allowed for this endpoint.</synopsis>
624                                         <see-also>
625                                                 <ref type="configOption">record_on_feature</ref>
626                                                 <ref type="configOption">record_off_feature</ref>
627                                         </see-also>
628                                 </configOption>
629                                 <configOption name="record_on_feature" default="automixmon">
630                                         <synopsis>The feature to enact when one-touch recording is turned on.</synopsis>
631                                         <description>
632                                                 <para>When an INFO request for one-touch recording arrives with a Record header set to "on", this
633                                                 feature will be enabled for the channel. The feature designated here can be any built-in
634                                                 or dynamic feature defined in features.conf.</para>
635                                                 <note><para>This setting has no effect if the endpoint's one_touch_recording option is disabled</para></note>
636                                         </description>
637                                         <see-also>
638                                                 <ref type="configOption">one_touch_recording</ref>
639                                                 <ref type="configOption">record_off_feature</ref>
640                                         </see-also>
641                                 </configOption>
642                                 <configOption name="record_off_feature" default="automixmon">
643                                         <synopsis>The feature to enact when one-touch recording is turned off.</synopsis>
644                                         <description>
645                                                 <para>When an INFO request for one-touch recording arrives with a Record header set to "off", this
646                                                 feature will be enabled for the channel. The feature designated here can be any built-in
647                                                 or dynamic feature defined in features.conf.</para>
648                                                 <note><para>This setting has no effect if the endpoint's one_touch_recording option is disabled</para></note>
649                                         </description>
650                                         <see-also>
651                                                 <ref type="configOption">one_touch_recording</ref>
652                                                 <ref type="configOption">record_on_feature</ref>
653                                         </see-also>
654                                 </configOption>
655                                 <configOption name="rtp_engine" default="asterisk">
656                                         <synopsis>Name of the RTP engine to use for channels created for this endpoint</synopsis>
657                                 </configOption>
658                                 <configOption name="allow_transfer" default="yes">
659                                         <synopsis>Determines whether SIP REFER transfers are allowed for this endpoint</synopsis>
660                                 </configOption>
661                                 <configOption name="user_eq_phone" default="no">
662                                         <synopsis>Determines whether a user=phone parameter is placed into the request URI if the user is determined to be a phone number</synopsis>
663                                 </configOption>
664                                 <configOption name="moh_passthrough" default="no">
665                                         <synopsis>Determines whether hold and unhold will be passed through using re-INVITEs with recvonly and sendrecv to the remote side</synopsis>
666                                 </configOption>
667                                 <configOption name="sdp_owner" default="-">
668                                         <synopsis>String placed as the username portion of an SDP origin (o=) line.</synopsis>
669                                 </configOption>
670                                 <configOption name="sdp_session" default="Asterisk">
671                                         <synopsis>String used for the SDP session (s=) line.</synopsis>
672                                 </configOption>
673                                 <configOption name="tos_audio">
674                                         <synopsis>DSCP TOS bits for audio streams</synopsis>
675                                         <description><para>
676                                                 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
677                                         </para></description>
678                                 </configOption>
679                                 <configOption name="tos_video">
680                                         <synopsis>DSCP TOS bits for video streams</synopsis>
681                                         <description><para>
682                                                 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
683                                         </para></description>
684                                 </configOption>
685                                 <configOption name="cos_audio">
686                                         <synopsis>Priority for audio streams</synopsis>
687                                         <description><para>
688                                                 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
689                                         </para></description>
690                                 </configOption>
691                                 <configOption name="cos_video">
692                                         <synopsis>Priority for video streams</synopsis>
693                                         <description><para>
694                                                 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
695                                         </para></description>
696                                 </configOption>
697                                 <configOption name="allow_subscribe" default="yes">
698                                         <synopsis>Determines if endpoint is allowed to initiate subscriptions with Asterisk.</synopsis>
699                                 </configOption>
700                                 <configOption name="sub_min_expiry" default="60">
701                                         <synopsis>The minimum allowed expiry time for subscriptions initiated by the endpoint.</synopsis>
702                                 </configOption>
703                                 <configOption name="from_user">
704                                         <synopsis>Username to use in From header for requests to this endpoint.</synopsis>
705                                 </configOption>
706                                 <configOption name="mwi_from_user">
707                                         <synopsis>Username to use in From header for unsolicited MWI NOTIFYs to this endpoint.</synopsis>
708                                 </configOption>
709                                 <configOption name="from_domain">
710                                         <synopsis>Domain to user in From header for requests to this endpoint.</synopsis>
711                                 </configOption>
712                                 <configOption name="dtls_verify">
713                                         <synopsis>Verify that the provided peer certificate is valid</synopsis>
714                                         <description><para>
715                                                 This option only applies if <replaceable>media_encryption</replaceable> is
716                                                 set to <literal>dtls</literal>.
717                                         </para></description>
718                                 </configOption>
719                                 <configOption name="dtls_rekey">
720                                         <synopsis>Interval at which to renegotiate the TLS session and rekey the SRTP session</synopsis>
721                                         <description><para>
722                                                 This option only applies if <replaceable>media_encryption</replaceable> is
723                                                 set to <literal>dtls</literal>.
724                                         </para><para>
725                                                 If this is not set or the value provided is 0 rekeying will be disabled.
726                                         </para></description>
727                                 </configOption>
728                                 <configOption name="dtls_cert_file">
729                                         <synopsis>Path to certificate file to present to peer</synopsis>
730                                         <description><para>
731                                                 This option only applies if <replaceable>media_encryption</replaceable> is
732                                                 set to <literal>dtls</literal>.
733                                         </para></description>
734                                 </configOption>
735                                 <configOption name="dtls_private_key">
736                                         <synopsis>Path to private key for certificate file</synopsis>
737                                         <description><para>
738                                                 This option only applies if <replaceable>media_encryption</replaceable> is
739                                                 set to <literal>dtls</literal>.
740                                         </para></description>
741                                 </configOption>
742                                 <configOption name="dtls_cipher">
743                                         <synopsis>Cipher to use for DTLS negotiation</synopsis>
744                                         <description><para>
745                                                 This option only applies if <replaceable>media_encryption</replaceable> is
746                                                 set to <literal>dtls</literal>.
747                                         </para>
748                                         <para>Many options for acceptable ciphers. See link for more:</para>
749                                         <para>http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
750                                         </para></description>
751                                 </configOption>
752                                 <configOption name="dtls_ca_file">
753                                         <synopsis>Path to certificate authority certificate</synopsis>
754                                         <description><para>
755                                                 This option only applies if <replaceable>media_encryption</replaceable> is
756                                                 set to <literal>dtls</literal>.
757                                         </para></description>
758                                 </configOption>
759                                 <configOption name="dtls_ca_path">
760                                         <synopsis>Path to a directory containing certificate authority certificates</synopsis>
761                                         <description><para>
762                                                 This option only applies if <replaceable>media_encryption</replaceable> is
763                                                 set to <literal>dtls</literal>.
764                                         </para></description>
765                                 </configOption>
766                                 <configOption name="dtls_setup">
767                                         <synopsis>Whether we are willing to accept connections, connect to the other party, or both.</synopsis>
768                                         <description>
769                                                 <para>
770                                                         This option only applies if <replaceable>media_encryption</replaceable> is
771                                                         set to <literal>dtls</literal>.
772                                                 </para>
773                                                 <enumlist>
774                                                         <enum name="active"><para>
775                                                                 res_pjsip will make a connection to the peer.
776                                                         </para></enum>
777                                                         <enum name="passive"><para>
778                                                                 res_pjsip will accept connections from the peer.
779                                                         </para></enum>
780                                                         <enum name="actpass"><para>
781                                                                 res_pjsip will offer and accept connections from the peer.
782                                                         </para></enum>
783                                                 </enumlist>
784                                         </description>
785                                 </configOption>
786                                 <configOption name="dtls_fingerprint">
787                                         <synopsis>Type of hash to use for the DTLS fingerprint in the SDP.</synopsis>
788                                         <description>
789                                                 <para>
790                                                         This option only applies if <replaceable>media_encryption</replaceable> is
791                                                         set to <literal>dtls</literal>.
792                                                 </para>
793                                                 <enumlist>
794                                                         <enum name="SHA-256"></enum>
795                                                         <enum name="SHA-1"></enum>
796                                                 </enumlist>
797                                         </description>
798                                 </configOption>
799                                 <configOption name="srtp_tag_32">
800                                         <synopsis>Determines whether 32 byte tags should be used instead of 80 byte tags.</synopsis>
801                                         <description><para>
802                                                 This option only applies if <replaceable>media_encryption</replaceable> is
803                                                 set to <literal>sdes</literal> or <literal>dtls</literal>.
804                                         </para></description>
805                                 </configOption>
806                                 <configOption name="set_var">
807                                         <synopsis>Variable set on a channel involving the endpoint.</synopsis>
808                                         <description><para>
809                                                 When a new channel is created using the endpoint set the specified
810                                                 variable(s) on that channel. For multiple channel variables specify
811                                                 multiple 'set_var'(s).
812                                         </para></description>
813                                 </configOption>
814                                 <configOption name="message_context">
815                                         <synopsis>Context to route incoming MESSAGE requests to.</synopsis>
816                                         <description><para>
817                                                 If specified, incoming MESSAGE requests will be routed to the indicated
818                                                 dialplan context. If no <replaceable>message_context</replaceable> is
819                                                 specified, then the <replaceable>context</replaceable> setting is used.
820                                         </para></description>
821                                 </configOption>
822                                 <configOption name="accountcode">
823                                         <synopsis>An accountcode to set automatically on any channels created for this endpoint.</synopsis>
824                                         <description><para>
825                                                 If specified, any channel created for this endpoint will automatically
826                                                 have this accountcode set on it.
827                                         </para></description>
828                                 </configOption>
829                                 <configOption name="rtp_keepalive">
830                                         <synopsis>Number of seconds between RTP comfort noise keepalive packets.</synopsis>
831                                         <description><para>
832                                                 At the specified interval, Asterisk will send an RTP comfort noise frame. This may
833                                                 be useful for situations where Asterisk is behind a NAT or firewall and must keep
834                                                 a hole open in order to allow for media to arrive at Asterisk.
835                                         </para></description>
836                                 </configOption>
837                                 <configOption name="rtp_timeout" default="0">
838                                         <synopsis>Maximum number of seconds without receiving RTP (while off hold) before terminating call.</synopsis>
839                                         <description><para>
840                                                 This option configures the number of seconds without RTP (while off hold) before
841                                                 considering a channel as dead. When the number of seconds is reached the underlying
842                                                 channel is hung up. By default this option is set to 0, which means do not check.
843                                         </para></description>
844                                 </configOption>
845                                 <configOption name="rtp_timeout_hold" default="0">
846                                         <synopsis>Maximum number of seconds without receiving RTP (while on hold) before terminating call.</synopsis>
847                                         <description><para>
848                                                 This option configures the number of seconds without RTP (while on hold) before
849                                                 considering a channel as dead. When the number of seconds is reached the underlying
850                                                 channel is hung up. By default this option is set to 0, which means do not check.
851                                         </para></description>
852                                 </configOption>
853                                 <configOption name="acl">
854                                         <synopsis>List of IP ACL section names in acl.conf</synopsis>
855                                         <description><para>
856                                                 This matches sections configured in <literal>acl.conf</literal>. The value is
857                                                 defined as a list of comma-delimited section names.
858                                         </para></description>
859                                 </configOption>
860                                 <configOption name="deny">
861                                         <synopsis>List of IP addresses to deny access from</synopsis>
862                                         <description><para>
863                                                 The value is a comma-delimited list of IP addresses. IP addresses may
864                                                 have a subnet mask appended. The subnet mask may be written in either
865                                                 CIDR or dotted-decimal notation. Separate the IP address and subnet
866                                                 mask with a slash ('/')
867                                         </para></description>
868                                 </configOption>
869                                 <configOption name="permit">
870                                         <synopsis>List of IP addresses to permit access from</synopsis>
871                                         <description><para>
872                                                 The value is a comma-delimited list of IP addresses. IP addresses may
873                                                 have a subnet mask appended. The subnet mask may be written in either
874                                                 CIDR or dotted-decimal notation. Separate the IP address and subnet
875                                                 mask with a slash ('/')
876                                         </para></description>
877                                 </configOption>
878                                 <configOption name="contact_acl">
879                                         <synopsis>List of Contact ACL section names in acl.conf</synopsis>
880                                         <description><para>
881                                                 This matches sections configured in <literal>acl.conf</literal>. The value is
882                                                 defined as a list of comma-delimited section names.
883                                         </para></description>
884                                 </configOption>
885                                 <configOption name="contact_deny">
886                                         <synopsis>List of Contact header addresses to deny</synopsis>
887                                         <description><para>
888                                                 The value is a comma-delimited list of IP addresses. IP addresses may
889                                                 have a subnet mask appended. The subnet mask may be written in either
890                                                 CIDR or dotted-decimal notation. Separate the IP address and subnet
891                                                 mask with a slash ('/')
892                                         </para></description>
893                                 </configOption>
894                                 <configOption name="contact_permit">
895                                         <synopsis>List of Contact header addresses to permit</synopsis>
896                                         <description><para>
897                                                 The value is a comma-delimited list of IP addresses. IP addresses may
898                                                 have a subnet mask appended. The subnet mask may be written in either
899                                                 CIDR or dotted-decimal notation. Separate the IP address and subnet
900                                                 mask with a slash ('/')
901                                         </para></description>
902                                 </configOption>
903                                 <configOption name="subscribe_context">
904                                         <synopsis>Context for incoming MESSAGE requests.</synopsis>
905                                         <description><para>
906                                                 If specified, incoming SUBSCRIBE requests will be searched for the matching
907                                                 extension in the indicated context.
908                                                 If no <replaceable>subscribe_context</replaceable> is specified,
909                                                 then the <replaceable>context</replaceable> setting is used.
910                                         </para></description>
911                                 </configOption>
912                         </configObject>
913                         <configObject name="auth">
914                                 <synopsis>Authentication type</synopsis>
915                                 <description><para>
916                                         Authentication objects hold the authentication information for use
917                                         by other objects such as <literal>endpoints</literal> or <literal>registrations</literal>.
918                                         This also allows for multiple objects to use a single auth object. See
919                                         the <literal>auth_type</literal> config option for password style choices.
920                                 </para></description>
921                                 <configOption name="auth_type" default="userpass">
922                                         <synopsis>Authentication type</synopsis>
923                                         <description><para>
924                                                 This option specifies which of the password style config options should be read
925                                                 when trying to authenticate an endpoint inbound request. If set to <literal>userpass</literal>
926                                                 then we'll read from the 'password' option. For <literal>md5</literal> we'll read
927                                                 from 'md5_cred'.
928                                                 </para>
929                                                 <enumlist>
930                                                         <enum name="md5"/>
931                                                         <enum name="userpass"/>
932                                                 </enumlist>
933                                         </description>
934                                 </configOption>
935                                 <configOption name="nonce_lifetime" default="32">
936                                         <synopsis>Lifetime of a nonce associated with this authentication config.</synopsis>
937                                 </configOption>
938                                 <configOption name="md5_cred">
939                                         <synopsis>MD5 Hash used for authentication.</synopsis>
940                                         <description><para>Only used when auth_type is <literal>md5</literal>.</para></description>
941                                 </configOption>
942                                 <configOption name="password">
943                                         <synopsis>PlainText password used for authentication.</synopsis>
944                                         <description><para>Only used when auth_type is <literal>userpass</literal>.</para></description>
945                                 </configOption>
946                                 <configOption name="realm" default="asterisk">
947                                         <synopsis>SIP realm for endpoint</synopsis>
948                                 </configOption>
949                                 <configOption name="type">
950                                         <synopsis>Must be 'auth'</synopsis>
951                                 </configOption>
952                                 <configOption name="username">
953                                         <synopsis>Username to use for account</synopsis>
954                                 </configOption>
955                         </configObject>
956                         <configObject name="domain_alias">
957                                 <synopsis>Domain Alias</synopsis>
958                                 <description><para>
959                                         Signifies that a domain is an alias. If the domain on a session is
960                                         not found to match an AoR then this object is used to see if we have
961                                         an alias for the AoR to which the endpoint is binding. This objects
962                                         name as defined in configuration should be the domain alias and a
963                                         config option is provided to specify the domain to be aliased.
964                                 </para></description>
965                                 <configOption name="type">
966                                         <synopsis>Must be of type 'domain_alias'.</synopsis>
967                                 </configOption>
968                                 <configOption name="domain">
969                                         <synopsis>Domain to be aliased</synopsis>
970                                 </configOption>
971                         </configObject>
972                         <configObject name="transport">
973                                 <synopsis>SIP Transport</synopsis>
974                                 <description><para>
975                                         <emphasis>Transports</emphasis>
976                                         </para>
977                                         <para>There are different transports and protocol derivatives
978                                                 supported by <literal>res_pjsip</literal>. They are in order of
979                                                 preference: UDP, TCP, and WebSocket (WS).</para>
980                                         <note><para>Changes to transport configuration in pjsip.conf will only be
981                                                 effected on a complete restart of Asterisk. A module reload
982                                                 will not suffice.</para></note>
983                                 </description>
984                                 <configOption name="async_operations" default="1">
985                                         <synopsis>Number of simultaneous Asynchronous Operations</synopsis>
986                                 </configOption>
987                                 <configOption name="bind">
988                                         <synopsis>IP Address and optional port to bind to for this transport</synopsis>
989                                 </configOption>
990                                 <configOption name="ca_list_file">
991                                         <synopsis>File containing a list of certificates to read (TLS ONLY)</synopsis>
992                                 </configOption>
993                                 <configOption name="ca_list_path">
994                                         <synopsis>Path to directory containing a list of certificates to read (TLS ONLY)</synopsis>
995                                 </configOption>
996                                 <configOption name="cert_file">
997                                         <synopsis>Certificate file for endpoint (TLS ONLY)</synopsis>
998                                         <description><para>
999                                                 A path to a .crt or .pem file can be provided.  However, only
1000                                                 the certificate is read from the file, not the private key.
1001                                                 The <literal>priv_key_file</literal> option must supply a
1002                                                 matching key file.
1003                                         </para></description>
1004                                 </configOption>
1005                                 <configOption name="cipher">
1006                                         <synopsis>Preferred cryptography cipher names (TLS ONLY)</synopsis>
1007                                         <description>
1008                                         <para>Comma separated list of cipher names or numeric equivalents.
1009                                                 Numeric equivalents can be either decimal or hexadecimal (0xX).
1010                                         </para>
1011                                         <para>There are many cipher names.  Use the CLI command
1012                                                 <literal>pjsip list ciphers</literal> to see a list of cipher
1013                                                 names available for your installation.  See link for more:</para>
1014                                         <para>http://www.openssl.org/docs/apps/ciphers.html#CIPHER_SUITE_NAMES
1015                                         </para>
1016                                         </description>
1017                                 </configOption>
1018                                 <configOption name="domain">
1019                                         <synopsis>Domain the transport comes from</synopsis>
1020                                 </configOption>
1021                                 <configOption name="external_media_address">
1022                                         <synopsis>External IP address to use in RTP handling</synopsis>
1023                                         <description><para>
1024                                                 When a request or response is sent out, if the destination of the
1025                                                 message is outside the IP network defined in the option <literal>localnet</literal>,
1026                                                 and the media address in the SDP is within the localnet network, then the
1027                                                 media address in the SDP will be rewritten to the value defined for
1028                                                 <literal>external_media_address</literal>.
1029                                         </para></description>
1030                                 </configOption>
1031                                 <configOption name="external_signaling_address">
1032                                         <synopsis>External address for SIP signalling</synopsis>
1033                                 </configOption>
1034                                 <configOption name="external_signaling_port" default="0">
1035                                         <synopsis>External port for SIP signalling</synopsis>
1036                                 </configOption>
1037                                 <configOption name="method">
1038                                         <synopsis>Method of SSL transport (TLS ONLY)</synopsis>
1039                                         <description>
1040                                                 <enumlist>
1041                                                         <enum name="default">
1042                                                                 <para>The default as defined by PJSIP. This is currently TLSv1, but may change with future releases.</para>
1043                                                         </enum>
1044                                                         <enum name="unspecified">
1045                                                                 <para>This option is equivalent to setting 'default'</para>
1046                                                         </enum>
1047                                                         <enum name="tlsv1" />
1048                                                         <enum name="sslv2" />
1049                                                         <enum name="sslv3" />
1050                                                         <enum name="sslv23" />
1051                                                 </enumlist>
1052                                         </description>
1053                                 </configOption>
1054                                 <configOption name="local_net">
1055                                         <synopsis>Network to consider local (used for NAT purposes).</synopsis>
1056                                         <description><para>This must be in CIDR or dotted decimal format with the IP
1057                                         and mask separated with a slash ('/').</para></description>
1058                                 </configOption>
1059                                 <configOption name="password">
1060                                         <synopsis>Password required for transport</synopsis>
1061                                 </configOption>
1062                                 <configOption name="priv_key_file">
1063                                         <synopsis>Private key file (TLS ONLY)</synopsis>
1064                                 </configOption>
1065                                 <configOption name="protocol" default="udp">
1066                                         <synopsis>Protocol to use for SIP traffic</synopsis>
1067                                         <description>
1068                                                 <enumlist>
1069                                                         <enum name="udp" />
1070                                                         <enum name="tcp" />
1071                                                         <enum name="tls" />
1072                                                         <enum name="ws" />
1073                                                         <enum name="wss" />
1074                                                 </enumlist>
1075                                         </description>
1076                                 </configOption>
1077                                 <configOption name="require_client_cert" default="false">
1078                                         <synopsis>Require client certificate (TLS ONLY)</synopsis>
1079                                 </configOption>
1080                                 <configOption name="type">
1081                                         <synopsis>Must be of type 'transport'.</synopsis>
1082                                 </configOption>
1083                                 <configOption name="verify_client" default="false">
1084                                         <synopsis>Require verification of client certificate (TLS ONLY)</synopsis>
1085                                 </configOption>
1086                                 <configOption name="verify_server" default="false">
1087                                         <synopsis>Require verification of server certificate (TLS ONLY)</synopsis>
1088                                 </configOption>
1089                                 <configOption name="tos" default="false">
1090                                         <synopsis>Enable TOS for the signalling sent over this transport</synopsis>
1091                                         <description>
1092                                         <para>See <literal>https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service</literal>
1093                                         for more information on this parameter.</para>
1094                                         <note><para>This option does not apply to the <replaceable>ws</replaceable>
1095                                         or the <replaceable>wss</replaceable> protocols.</para></note>
1096                                         </description>
1097                                 </configOption>
1098                                 <configOption name="cos" default="false">
1099                                         <synopsis>Enable COS for the signalling sent over this transport</synopsis>
1100                                         <description>
1101                                         <para>See <literal>https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service</literal>
1102                                         for more information on this parameter.</para>
1103                                         <note><para>This option does not apply to the <replaceable>ws</replaceable>
1104                                         or the <replaceable>wss</replaceable> protocols.</para></note>
1105                                         </description>
1106                                 </configOption>
1107                                 <configOption name="websocket_write_timeout">
1108                                         <synopsis>The timeout (in milliseconds) to set on WebSocket connections.</synopsis>
1109                                         <description>
1110                                                 <para>If a websocket connection accepts input slowly, the timeout
1111                                                 for writes to it can be increased to keep it from being disconnected.
1112                                                 Value is in milliseconds; default is 100 ms.</para>
1113                                         </description>
1114                                 </configOption>
1115                                 <configOption name="allow_reload" default="no">
1116                                         <synopsis>Allow this transport to be reloaded.</synopsis>
1117                                         <description>
1118                                                 <para>Allow this transport to be reloaded when res_pjsip is reloaded.
1119                                                 This option defaults to "no" because reloading a transport may disrupt
1120                                                 in-progress calls.</para>
1121                                         </description>
1122                                 </configOption>
1123                         </configObject>
1124                         <configObject name="contact">
1125                                 <synopsis>A way of creating an aliased name to a SIP URI</synopsis>
1126                                 <description><para>
1127                                         Contacts are a way to hide SIP URIs from the dialplan directly.
1128                                         They are also used to make a group of contactable parties when
1129                                         in use with <literal>AoR</literal> lists.
1130                                 </para></description>
1131                                 <configOption name="type">
1132                                         <synopsis>Must be of type 'contact'.</synopsis>
1133                                 </configOption>
1134                                 <configOption name="uri">
1135                                         <synopsis>SIP URI to contact peer</synopsis>
1136                                 </configOption>
1137                                 <configOption name="expiration_time">
1138                                         <synopsis>Time to keep alive a contact</synopsis>
1139                                         <description><para>
1140                                                 Time to keep alive a contact. String style specification.
1141                                         </para></description>
1142                                 </configOption>
1143                                 <configOption name="qualify_frequency" default="0">
1144                                         <synopsis>Interval at which to qualify a contact</synopsis>
1145                                         <description><para>
1146                                                 Interval between attempts to qualify the contact for reachability.
1147                                                 If <literal>0</literal> never qualify. Time in seconds.
1148                                         </para></description>
1149                                 </configOption>
1150                                 <configOption name="qualify_timeout" default="3.0">
1151                                         <synopsis>Timeout for qualify</synopsis>
1152                                         <description><para>
1153                                                 If the contact doesn't repond to the OPTIONS request before the timeout,
1154                                                 the contact is marked unavailable.
1155                                                 If <literal>0</literal> no timeout. Time in fractional seconds.
1156                                         </para></description>
1157                                 </configOption>
1158                                 <configOption name="authenticate_qualify" default="no">
1159                                         <synopsis>Authenticates a qualify request if needed</synopsis>
1160                                         <description><para>
1161                                                 If true and a qualify request receives a challenge or authenticate response
1162                                                 authentication is attempted before declaring the contact available.
1163                                         </para></description>
1164                                 </configOption>
1165                                 <configOption name="outbound_proxy">
1166                                         <synopsis>Outbound proxy used when sending OPTIONS request</synopsis>
1167                                         <description><para>
1168                                                 If set the provided URI will be used as the outbound proxy when an
1169                                                 OPTIONS request is sent to a contact for qualify purposes.
1170                                         </para></description>
1171                                 </configOption>
1172                                 <configOption name="path">
1173                                         <synopsis>Stored Path vector for use in Route headers on outgoing requests.</synopsis>
1174                                 </configOption>
1175                                 <configOption name="user_agent">
1176                                         <synopsis>User-Agent header from registration.</synopsis>
1177                                         <description><para>
1178                                                 The User-Agent is automatically stored based on data present in incoming SIP
1179                                                 REGISTER requests and is not intended to be configured manually.
1180                                         </para></description>
1181                                 </configOption>
1182                                 <configOption name="endpoint">
1183                                         <synopsis>Endpoint name</synopsis>
1184                                         <description><para>
1185                                                 The name of the endpoint this contact belongs to
1186                                         </para></description>
1187                                 </configOption>
1188                                 <configOption name="reg_server">
1189                                         <synopsis>Asterisk Server name</synopsis>
1190                                         <description><para>
1191                                                 Asterisk Server name on which SIP endpoint registered.
1192                                         </para></description>
1193                                 </configOption>
1194                                 <configOption name="via_addr">
1195                                         <synopsis>IP-address of the last Via header from registration.</synopsis>
1196                                         <description><para>
1197                                                 The last Via header should contain the address of UA which sent the request.
1198                                                 The IP-address of the last Via header is automatically stored based on data present
1199                                                 in incoming SIP REGISTER requests and is not intended to be configured manually.
1200                                         </para></description>
1201                                 </configOption>
1202                                 <configOption name="via_port">
1203                                         <synopsis>IP-port of the last Via header from registration.</synopsis>
1204                                         <description><para>
1205                                                 The IP-port of the last Via header is automatically stored based on data present
1206                                                 in incoming SIP REGISTER requests and is not intended to be configured manually.
1207                                         </para></description>
1208                                 </configOption>
1209                                 <configOption name="call_id">
1210                                         <synopsis>Call-ID header from registration.</synopsis>
1211                                         <description><para>
1212                                                 The Call-ID header is automatically stored based on data present
1213                                                 in incoming SIP REGISTER requests and is not intended to be configured manually.
1214                                         </para></description>
1215                                 </configOption>
1216                         </configObject>
1217                         <configObject name="aor">
1218                                 <synopsis>The configuration for a location of an endpoint</synopsis>
1219                                 <description><para>
1220                                         An AoR is what allows Asterisk to contact an endpoint via res_pjsip. If no
1221                                         AoRs are specified, an endpoint will not be reachable by Asterisk.
1222                                         Beyond that, an AoR has other uses within Asterisk, such as inbound
1223                                         registration.
1224                                         </para><para>
1225                                         An <literal>AoR</literal> is a way to allow dialing a group
1226                                         of <literal>Contacts</literal> that all use the same
1227                                         <literal>endpoint</literal> for calls.
1228                                         </para><para>
1229                                         This can be used as another way of grouping a list of contacts to dial
1230                                         rather than specifing them each directly when dialing via the dialplan.
1231                                         This must be used in conjuction with the <literal>PJSIP_DIAL_CONTACTS</literal>.
1232                                         </para><para>
1233                                         Registrations: For Asterisk to match an inbound registration to an endpoint,
1234                                         the AoR object name must match the user portion of the SIP URI in the "To:"
1235                                         header of the inbound SIP registration. That will usually be equivalent
1236                                         to the "user name" set in your hard or soft phones configuration.
1237                                 </para></description>
1238                                 <configOption name="contact">
1239                                         <synopsis>Permanent contacts assigned to AoR</synopsis>
1240                                         <description><para>
1241                                                 Contacts specified will be called whenever referenced
1242                                                 by <literal>chan_pjsip</literal>.
1243                                                 </para><para>
1244                                                 Use a separate "contact=" entry for each contact required. Contacts
1245                                                 are specified using a SIP URI.
1246                                         </para></description>
1247                                 </configOption>
1248                                 <configOption name="default_expiration" default="3600">
1249                                         <synopsis>Default expiration time in seconds for contacts that are dynamically bound to an AoR.</synopsis>
1250                                 </configOption>
1251                                 <configOption name="mailboxes">
1252                                         <synopsis>Allow subscriptions for the specified mailbox(es)</synopsis>
1253                                         <description><para>This option applies when an external entity subscribes to an AoR
1254                                                 for Message Waiting Indications. The mailboxes specified will be subscribed to.
1255                                                 More than one mailbox can be specified with a comma-delimited string.
1256                                                 app_voicemail mailboxes must be specified as mailbox@context;
1257                                                 for example: mailboxes=6001@default. For mailboxes provided by external sources,
1258                                                 such as through the res_external_mwi module, you must specify strings supported by
1259                                                 the external system.
1260                                         </para><para>
1261                                                 For endpoints that cannot SUBSCRIBE for MWI, you can set the <literal>mailboxes</literal> option in your
1262                                                 endpoint configuration section to enable unsolicited MWI NOTIFYs to the endpoint.
1263                                         </para></description>
1264                                 </configOption>
1265                                 <configOption name="voicemail_extension">
1266                                         <synopsis>The voicemail extension to send in the NOTIFY Message-Account header</synopsis>
1267                                 </configOption>
1268                                 <configOption name="maximum_expiration" default="7200">
1269                                         <synopsis>Maximum time to keep an AoR</synopsis>
1270                                         <description><para>
1271                                                 Maximium time to keep a peer with explicit expiration. Time in seconds.
1272                                         </para></description>
1273                                 </configOption>
1274                                 <configOption name="max_contacts" default="0">
1275                                         <synopsis>Maximum number of contacts that can bind to an AoR</synopsis>
1276                                         <description><para>
1277                                                 Maximum number of contacts that can associate with this AoR. This value does
1278                                                 not affect the number of contacts that can be added with the "contact" option.
1279                                                 It only limits contacts added through external interaction, such as
1280                                                 registration.
1281                                                 </para>
1282                                                 <note><para>This should be set to <literal>1</literal> and
1283                                                 <replaceable>remove_existing</replaceable> set to <literal>yes</literal> if you
1284                                                 wish to stick with the older <literal>chan_sip</literal> behaviour.
1285                                                 </para></note>
1286                                         </description>
1287                                 </configOption>
1288                                 <configOption name="minimum_expiration" default="60">
1289                                         <synopsis>Minimum keep alive time for an AoR</synopsis>
1290                                         <description><para>
1291                                                 Minimum time to keep a peer with an explict expiration. Time in seconds.
1292                                         </para></description>
1293                                 </configOption>
1294                                 <configOption name="remove_existing" default="no">
1295                                         <synopsis>Determines whether new contacts replace existing ones.</synopsis>
1296                                         <description><para>
1297                                                 On receiving a new registration to the AoR should it remove
1298                                                 the existing contact that was registered against it?
1299                                                 </para>
1300                                                 <note><para>This should be set to <literal>yes</literal> and
1301                                                 <replaceable>max_contacts</replaceable> set to <literal>1</literal> if you
1302                                                 wish to stick with the older <literal>chan_sip</literal> behaviour.
1303                                                 </para></note>
1304                                         </description>
1305                                 </configOption>
1306                                 <configOption name="type">
1307                                         <synopsis>Must be of type 'aor'.</synopsis>
1308                                 </configOption>
1309                                 <configOption name="qualify_frequency" default="0">
1310                                         <synopsis>Interval at which to qualify an AoR</synopsis>
1311                                         <description><para>
1312                                                 Interval between attempts to qualify the AoR for reachability.
1313                                                 If <literal>0</literal> never qualify. Time in seconds.
1314                                         </para></description>
1315                                 </configOption>
1316                                 <configOption name="qualify_timeout" default="3.0">
1317                                         <synopsis>Timeout for qualify</synopsis>
1318                                         <description><para>
1319                                                 If the contact doesn't repond to the OPTIONS request before the timeout,
1320                                                 the contact is marked unavailable.
1321                                                 If <literal>0</literal> no timeout. Time in fractional seconds.
1322                                         </para></description>
1323                                 </configOption>
1324                                 <configOption name="authenticate_qualify" default="no">
1325                                         <synopsis>Authenticates a qualify request if needed</synopsis>
1326                                         <description><para>
1327                                                 If true and a qualify request receives a challenge or authenticate response
1328                                                 authentication is attempted before declaring the contact available.
1329                                         </para></description>
1330                                 </configOption>
1331                                 <configOption name="outbound_proxy">
1332                                         <synopsis>Outbound proxy used when sending OPTIONS request</synopsis>
1333                                         <description><para>
1334                                                 If set the provided URI will be used as the outbound proxy when an
1335                                                 OPTIONS request is sent to a contact for qualify purposes.
1336                                         </para></description>
1337                                 </configOption>
1338                                 <configOption name="support_path">
1339                                         <synopsis>Enables Path support for REGISTER requests and Route support for other requests.</synopsis>
1340                                         <description><para>
1341                                                 When this option is enabled, the Path headers in register requests will be saved
1342                                                 and its contents will be used in Route headers for outbound out-of-dialog requests
1343                                                 and in Path headers for outbound 200 responses. Path support will also be indicated
1344                                                 in the Supported header.
1345                                         </para></description>
1346                                 </configOption>
1347                         </configObject>
1348                         <configObject name="system">
1349                                 <synopsis>Options that apply to the SIP stack as well as other system-wide settings</synopsis>
1350                                 <description><para>
1351                                         The settings in this section are global. In addition to being global, the values will
1352                                         not be re-evaluated when a reload is performed. This is because the values must be set
1353                                         before the SIP stack is initialized. The only way to reset these values is to either
1354                                         restart Asterisk, or unload res_pjsip.so and then load it again.
1355                                 </para></description>
1356                                 <configOption name="timer_t1" default="500">
1357                                         <synopsis>Set transaction timer T1 value (milliseconds).</synopsis>
1358                                         <description><para>
1359                                                 Timer T1 is the base for determining how long to wait before retransmitting
1360                                                 requests that receive no response when using an unreliable transport (e.g. UDP).
1361                                                 For more information on this timer, see RFC 3261, Section 17.1.1.1.
1362                                         </para></description>
1363                                 </configOption>
1364                                 <configOption name="timer_b" default="32000">
1365                                         <synopsis>Set transaction timer B value (milliseconds).</synopsis>
1366                                         <description><para>
1367                                                 Timer B determines the maximum amount of time to wait after sending an INVITE
1368                                                 request before terminating the transaction. It is recommended that this be set
1369                                                 to 64 * Timer T1, but it may be set higher if desired. For more information on
1370                                                 this timer, see RFC 3261, Section 17.1.1.1.
1371                                         </para></description>
1372                                 </configOption>
1373                                 <configOption name="compact_headers" default="no">
1374                                         <synopsis>Use the short forms of common SIP header names.</synopsis>
1375                                 </configOption>
1376                                 <configOption name="threadpool_initial_size" default="0">
1377                                         <synopsis>Initial number of threads in the res_pjsip threadpool.</synopsis>
1378                                 </configOption>
1379                                 <configOption name="threadpool_auto_increment" default="5">
1380                                         <synopsis>The amount by which the number of threads is incremented when necessary.</synopsis>
1381                                 </configOption>
1382                                 <configOption name="threadpool_idle_timeout" default="60">
1383                                         <synopsis>Number of seconds before an idle thread should be disposed of.</synopsis>
1384                                 </configOption>
1385                                 <configOption name="threadpool_max_size" default="0">
1386                                         <synopsis>Maximum number of threads in the res_pjsip threadpool.
1387                                         A value of 0 indicates no maximum.</synopsis>
1388                                 </configOption>
1389                                 <configOption name="disable_tcp_switch" default="yes">
1390                                         <synopsis>Disable automatic switching from UDP to TCP transports.</synopsis>
1391                                         <description><para>
1392                                                 Disable automatic switching from UDP to TCP transports if outgoing
1393                                                 request is too large.  See RFC 3261 section 18.1.1.
1394                                         </para></description>
1395                                 </configOption>
1396                                 <configOption name="type">
1397                                         <synopsis>Must be of type 'system'.</synopsis>
1398                                 </configOption>
1399                         </configObject>
1400                         <configObject name="global">
1401                                 <synopsis>Options that apply globally to all SIP communications</synopsis>
1402                                 <description><para>
1403                                         The settings in this section are global. Unlike options in the <literal>system</literal>
1404                                         section, these options can be refreshed by performing a reload.
1405                                 </para></description>
1406                                 <configOption name="max_forwards" default="70">
1407                                         <synopsis>Value used in Max-Forwards header for SIP requests.</synopsis>
1408                                 </configOption>
1409                                 <configOption name="keep_alive_interval" default="0">
1410                                         <synopsis>The interval (in seconds) to send keepalives to active connection-oriented transports.</synopsis>
1411                                 </configOption>
1412                                 <configOption name="contact_expiration_check_interval" default="30">
1413                                         <synopsis>The interval (in seconds) to check for expired contacts.</synopsis>
1414                                 </configOption>
1415                                 <configOption name="disable_multi_domain" default="no">
1416                                         <synopsis>Disable Multi Domain support</synopsis>
1417                                         <description><para>
1418                                                 If disabled it can improve realtime performace by reducing number of database requsts.
1419                                         </para></description>
1420                                 </configOption>
1421                                 <configOption name="max_initial_qualify_time" default="0">
1422                                         <synopsis>The maximum amount of time from startup that qualifies should be attempted on all contacts.
1423                                         If greater than the qualify_frequency for an aor, qualify_frequency will be used instead.</synopsis>
1424                                 </configOption>
1425                                 <configOption name="unidentified_request_period" default="5">
1426                                         <synopsis>The number of seconds over which to accumulate unidentified requests.</synopsis>
1427                                         <description><para>
1428                                         If <literal>unidentified_request_count</literal> unidentified requests are received
1429                                         during <literal>unidentified_request_period</literal>, a security event will be generated.
1430                                         </para></description>
1431                                 </configOption>
1432                                 <configOption name="unidentified_request_count" default="5">
1433                                         <synopsis>The number of unidentified requests from a single IP to allow.</synopsis>
1434                                         <description><para>
1435                                         If <literal>unidentified_request_count</literal> unidentified requests are received
1436                                         during <literal>unidentified_request_period</literal>, a security event will be generated.
1437                                         </para></description>
1438                                 </configOption>
1439                                 <configOption name="unidentified_request_prune_interval" default="30">
1440                                         <synopsis>The interval at which unidentified requests are older than
1441                                         twice the unidentified_request_period are pruned.</synopsis>
1442                                 </configOption>
1443                                 <configOption name="type">
1444                                         <synopsis>Must be of type 'global'.</synopsis>
1445                                 </configOption>
1446                                 <configOption name="user_agent" default="Asterisk &lt;Asterisk Version&gt;">
1447                                         <synopsis>Value used in User-Agent header for SIP requests and Server header for SIP responses.</synopsis>
1448                                 </configOption>
1449                                 <configOption name="regcontext" default="">
1450                                         <synopsis>When set, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given
1451                                         peer who registers or unregisters with us.</synopsis>
1452                                 </configOption>
1453                                 <configOption name="default_outbound_endpoint" default="default_outbound_endpoint">
1454                                         <synopsis>Endpoint to use when sending an outbound request to a URI without a specified endpoint.</synopsis>
1455                                 </configOption>
1456                                 <configOption name="default_voicemail_extension">
1457                                         <synopsis>The voicemail extension to send in the NOTIFY Message-Account header if not specified on endpoint or aor</synopsis>
1458                                 </configOption>
1459                                 <configOption name="debug" default="no">
1460                                         <synopsis>Enable/Disable SIP debug logging.  Valid options include yes|no or
1461                                         a host address</synopsis>
1462                                 </configOption>
1463                                 <configOption name="endpoint_identifier_order" default="ip,username,anonymous">
1464                                         <synopsis>The order by which endpoint identifiers are processed and checked.
1465                                         Identifier names are usually derived from and can be found in the endpoint
1466                                         identifier module itself (res_pjsip_endpoint_identifier_*).
1467                                         You can use the CLI command "pjsip show identifiers" to see the
1468                                         identifiers currently available.</synopsis>
1469                     <description>
1470                                                 <note><para>
1471                                                 One of the identifiers is "auth_username" which matches on the username in
1472                                                 an Authentication header.  This method has some security considerations because an
1473                                                 Authentication header is not present on the first message of a dialog when
1474                                                 digest authentication is used.  The client can't generate it until the server
1475                                                 sends the challenge in a 401 response.  Since Asterisk normally sends a security
1476                                                 event when an incoming request can't be matched to an endpoint, using auth_username
1477                                                 requires that the security event be deferred until a request is received with
1478                                                 the Authentication header and only generated if the username doesn't result in a
1479                                                 match.  This may result in a delay before an attack is recognized.  You can control
1480                                                 how many unmatched requests are received from a single ip address before a security
1481                                                 event is generated using the unidentified_request parameters.
1482                                                 </para></note>
1483                     </description>
1484                                 </configOption>
1485                                 <configOption name="default_from_user" default="asterisk">
1486                                         <synopsis>When Asterisk generates an outgoing SIP request, the From header username will be
1487                                         set to this value if there is no better option (such as CallerID) to be
1488                                         used.</synopsis>
1489                                 </configOption>
1490                                 <configOption name="default_realm" default="asterisk">
1491                                         <synopsis>When Asterisk generates an challenge, the digest will be
1492                                         set to this value if there is no better option (such as auth/realm) to be
1493                                         used.</synopsis>
1494                                 </configOption>
1495                         </configObject>
1496                 </configFile>
1497         </configInfo>
1498         <manager name="PJSIPQualify" language="en_US">
1499                 <synopsis>
1500                         Qualify a chan_pjsip endpoint.
1501                 </synopsis>
1502                 <syntax>
1503                         <xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
1504                         <parameter name="Endpoint" required="true">
1505                                 <para>The endpoint you want to qualify.</para>
1506                         </parameter>
1507                 </syntax>
1508                 <description>
1509                         <para>Qualify a chan_pjsip endpoint.</para>
1510                 </description>
1511         </manager>
1512         <managerEvent language="en_US" name="IdentifyDetail">
1513                 <managerEventInstance class="EVENT_FLAG_COMMAND">
1514                         <synopsis>Provide details about an identify section.</synopsis>
1515                         <syntax>
1516                                 <parameter name="ObjectType">
1517                                         <para>The object's type. This will always be 'identify'.</para>
1518                                 </parameter>
1519                                 <parameter name="ObjectName">
1520                                         <para>The name of this object.</para>
1521                                 </parameter>
1522                                 <parameter name="Endpoint">
1523                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip_endpoint_identifier_ip']/configFile[@name='pjsip.conf']/configObject[@name='identify']/configOption[@name='endpoint']/synopsis/node())"/></para>
1524                                 </parameter>
1525                                 <parameter name="Match">
1526                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip_endpoint_identifier_ip']/configFile[@name='pjsip.conf']/configObject[@name='identify']/configOption[@name='match']/synopsis/node())"/></para>
1527                                 </parameter>
1528                                 <parameter name="EndpointName">
1529                                         <para>The name of the endpoint associated with this information.</para>
1530                                 </parameter>
1531                         </syntax>
1532                 </managerEventInstance>
1533         </managerEvent>
1534         <managerEvent language="en_US" name="AorDetail">
1535                 <managerEventInstance class="EVENT_FLAG_COMMAND">
1536                         <synopsis>Provide details about an Address of Record (AoR) section.</synopsis>
1537                         <syntax>
1538                                 <parameter name="ObjectType">
1539                                         <para>The object's type. This will always be 'aor'.</para>
1540                                 </parameter>
1541                                 <parameter name="ObjectName">
1542                                         <para>The name of this object.</para>
1543                                 </parameter>
1544                                 <parameter name="MinimumExpiration">
1545                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='minimum_expiration']/synopsis/node())"/></para>
1546                                 </parameter>
1547                                 <parameter name="MaximumExpiration">
1548                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='maximum_expiration']/synopsis/node())"/></para>
1549                                 </parameter>
1550                                 <parameter name="DefaultExpiration">
1551                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='default_expiration']/synopsis/node())"/></para>
1552                                 </parameter>
1553                                 <parameter name="QualifyFrequency">
1554                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='qualify_frequency']/synopsis/node())"/></para>
1555                                 </parameter>
1556                                 <parameter name="AuthenticateQualify">
1557                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='authenticate_qualify']/synopsis/node())"/></para>
1558                                 </parameter>
1559                                 <parameter name="MaxContacts">
1560                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='max_contacts']/synopsis/node())"/></para>
1561                                 </parameter>
1562                                 <parameter name="RemoveExisting">
1563                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='remove_existing']/synopsis/node())"/></para>
1564                                 </parameter>
1565                                 <parameter name="Mailboxes">
1566                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='mailboxes']/synopsis/node())"/></para>
1567                                 </parameter>
1568                                 <parameter name="OutboundProxy">
1569                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='outbound_proxy']/synopsis/node())"/></para>
1570                                 </parameter>
1571                                 <parameter name="SupportPath">
1572                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='support_path']/synopsis/node())"/></para>
1573                                 </parameter>
1574                                 <parameter name="TotalContacts">
1575                                         <para>The total number of contacts associated with this AoR.</para>
1576                                 </parameter>
1577                                 <parameter name="ContactsRegistered">
1578                                         <para>The number of non-permanent contacts associated with this AoR.</para>
1579                                 </parameter>
1580                                 <parameter name="EndpointName">
1581                                         <para>The name of the endpoint associated with this information.</para>
1582                                 </parameter>
1583                         </syntax>
1584                 </managerEventInstance>
1585         </managerEvent>
1586         <managerEvent language="en_US" name="AuthDetail">
1587                 <managerEventInstance class="EVENT_FLAG_COMMAND">
1588                         <synopsis>Provide details about an authentication section.</synopsis>
1589                         <syntax>
1590                                 <parameter name="ObjectType">
1591                                         <para>The object's type. This will always be 'auth'.</para>
1592                                 </parameter>
1593                                 <parameter name="ObjectName">
1594                                         <para>The name of this object.</para>
1595                                 </parameter>
1596                                 <parameter name="Username">
1597                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='username']/synopsis/node())"/></para>
1598                                 </parameter>
1599                                 <parameter name="Password">
1600                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='username']/synopsis/node())"/></para>
1601                                 </parameter>
1602                                 <parameter name="Md5Cred">
1603                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='md5_cred']/synopsis/node())"/></para>
1604                                 </parameter>
1605                                 <parameter name="Realm">
1606                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='realm']/synopsis/node())"/></para>
1607                                 </parameter>
1608                                 <parameter name="NonceLifetime">
1609                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='nonce_lifetime']/synopsis/node())"/></para>
1610                                 </parameter>
1611                                 <parameter name="AuthType">
1612                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='auth_type']/synopsis/node())"/></para>
1613                                 </parameter>
1614                                 <parameter name="EndpointName">
1615                                         <para>The name of the endpoint associated with this information.</para>
1616                                 </parameter>
1617                         </syntax>
1618                 </managerEventInstance>
1619         </managerEvent>
1620         <managerEvent language="en_US" name="TransportDetail">
1621                 <managerEventInstance class="EVENT_FLAG_COMMAND">
1622                         <synopsis>Provide details about an authentication section.</synopsis>
1623                         <syntax>
1624                                 <parameter name="ObjectType">
1625                                         <para>The object's type. This will always be 'transport'.</para>
1626                                 </parameter>
1627                                 <parameter name="ObjectName">
1628                                         <para>The name of this object.</para>
1629                                 </parameter>
1630                                 <parameter name="Protocol">
1631                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='protocol']/synopsis/node())"/></para>
1632                                 </parameter>
1633                                 <parameter name="Bind">
1634                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='bind']/synopsis/node())"/></para>
1635                                 </parameter>
1636                                 <parameter name="AsycOperations">
1637                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='async_operations']/synopsis/node())"/></para>
1638                                 </parameter>
1639                                 <parameter name="CaListFile">
1640                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='ca_list_file']/synopsis/node())"/></para>
1641                                 </parameter>
1642                                 <parameter name="CaListPath">
1643                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='ca_list_path']/synopsis/node())"/></para>
1644                                 </parameter>
1645                                 <parameter name="CertFile">
1646                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='cert_file']/synopsis/node())"/></para>
1647                                 </parameter>
1648                                 <parameter name="PrivKeyFile">
1649                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='priv_key_file']/synopsis/node())"/></para>
1650                                 </parameter>
1651                                 <parameter name="Password">
1652                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='password']/synopsis/node())"/></para>
1653                                 </parameter>
1654                                 <parameter name="ExternalSignalingAddress">
1655                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='external_signaling_address']/synopsis/node())"/></para>
1656                                 </parameter>
1657                                 <parameter name="ExternalSignalingPort">
1658                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='external_signaling_port']/synopsis/node())"/></para>
1659                                 </parameter>
1660                                 <parameter name="ExternalMediaAddress">
1661                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='external_media_address']/synopsis/node())"/></para>
1662                                 </parameter>
1663                                 <parameter name="Domain">
1664                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='domain']/synopsis/node())"/></para>
1665                                 </parameter>
1666                                 <parameter name="VerifyServer">
1667                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='verify_server']/synopsis/node())"/></para>
1668                                 </parameter>
1669                                 <parameter name="VerifyClient">
1670                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='verify_client']/synopsis/node())"/></para>
1671                                 </parameter>
1672                                 <parameter name="RequireClientCert">
1673                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='require_client_cert']/synopsis/node())"/></para>
1674                                 </parameter>
1675                                 <parameter name="Method">
1676                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='method']/synopsis/node())"/></para>
1677                                 </parameter>
1678                                 <parameter name="Cipher">
1679                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='cipher']/synopsis/node())"/></para>
1680                                 </parameter>
1681                                 <parameter name="LocalNet">
1682                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='local_net']/synopsis/node())"/></para>
1683                                 </parameter>
1684                                 <parameter name="Tos">
1685                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='tos']/synopsis/node())"/></para>
1686                                 </parameter>
1687                                 <parameter name="Cos">
1688                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='cos']/synopsis/node())"/></para>
1689                                 </parameter>
1690                                 <parameter name="WebsocketWriteTimeout">
1691                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='websocket_write_timeout']/synopsis/node())"/></para>
1692                                 </parameter>
1693                                 <parameter name="EndpointName">
1694                                         <para>The name of the endpoint associated with this information.</para>
1695                                 </parameter>
1696                         </syntax>
1697                 </managerEventInstance>
1698         </managerEvent>
1699         <managerEvent language="en_US" name="EndpointDetail">
1700                 <managerEventInstance class="EVENT_FLAG_COMMAND">
1701                         <synopsis>Provide details about an endpoint section.</synopsis>
1702                         <syntax>
1703                                 <parameter name="ObjectType">
1704                                         <para>The object's type. This will always be 'endpoint'.</para>
1705                                 </parameter>
1706                                 <parameter name="ObjectName">
1707                                         <para>The name of this object.</para>
1708                                 </parameter>
1709                                 <parameter name="Context">
1710                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='context']/synopsis/node())"/></para>
1711                                 </parameter>
1712                                 <parameter name="Disallow">
1713                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='disallow']/synopsis/node())"/></para>
1714                                 </parameter>
1715                                 <parameter name="Allow">
1716                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='allow']/synopsis/node())"/></para>
1717                                 </parameter>
1718                                 <parameter name="DtmfMode">
1719                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtmf_mode']/synopsis/node())"/></para>
1720                                 </parameter>
1721                                 <parameter name="RtpIpv6">
1722                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rtp_ipv6']/synopsis/node())"/></para>
1723                                 </parameter>
1724                                 <parameter name="RtpSymmetric">
1725                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rtp_symmetric']/synopsis/node())"/></para>
1726                                 </parameter>
1727                                 <parameter name="IceSupport">
1728                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='ice_support']/synopsis/node())"/></para>
1729                                 </parameter>
1730                                 <parameter name="UsePtime">
1731                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='use_ptime']/synopsis/node())"/></para>
1732                                 </parameter>
1733                                 <parameter name="ForceRport">
1734                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='force_rport']/synopsis/node())"/></para>
1735                                 </parameter>
1736                                 <parameter name="RewriteContact">
1737                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rewrite_contact']/synopsis/node())"/></para>
1738                                 </parameter>
1739                                 <parameter name="Transport">
1740                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='transport']/synopsis/node())"/></para>
1741                                 </parameter>
1742                                 <parameter name="OutboundProxy">
1743                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='outbound_proxy']/synopsis/node())"/></para>
1744                                 </parameter>
1745                                 <parameter name="MohSuggest">
1746                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='moh_suggest']/synopsis/node())"/></para>
1747                                 </parameter>
1748                                 <parameter name="100rel">
1749                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='100rel']/synopsis/node())"/></para>
1750                                 </parameter>
1751                                 <parameter name="Timers">
1752                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='timers']/synopsis/node())"/></para>
1753                                 </parameter>
1754                                 <parameter name="TimersMinSe">
1755                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='timers_min_se']/synopsis/node())"/></para>
1756                                 </parameter>
1757                                 <parameter name="TimersSessExpires">
1758                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='timers_sess_expires']/synopsis/node())"/></para>
1759                                 </parameter>
1760                                 <parameter name="Auth">
1761                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='auth']/synopsis/node())"/></para>
1762                                 </parameter>
1763                                 <parameter name="OutboundAuth">
1764                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='outbound_auth']/synopsis/node())"/></para>
1765                                 </parameter>
1766                                 <parameter name="Aors">
1767                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='aors']/synopsis/node())"/></para>
1768                                 </parameter>
1769                                 <parameter name="MediaAddress">
1770                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='media_address']/synopsis/node())"/></para>
1771                                 </parameter>
1772                                 <parameter name="IdentifyBy">
1773                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='identify_by']/synopsis/node())"/></para>
1774                                 </parameter>
1775                                 <parameter name="DirectMedia">
1776                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='direct_media']/synopsis/node())"/></para>
1777                                 </parameter>
1778                                 <parameter name="DirectMediaMethod">
1779                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='direct_media_method']/synopsis/node())"/></para>
1780                                 </parameter>
1781                                 <parameter name="ConnectedLineMethod">
1782                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='connected_line_method']/synopsis/node())"/></para>
1783                                 </parameter>
1784                                 <parameter name="DirectMediaGlareMitigation">
1785                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='direct_media_glare_mitigation']/synopsis/node())"/></para>
1786                                 </parameter>
1787                                 <parameter name="DisableDirectMediaOnNat">
1788                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='disable_direct_media_on_nat']/synopsis/node())"/></para>
1789                                 </parameter>
1790                                 <parameter name="Callerid">
1791                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='callerid']/synopsis/node())"/></para>
1792                                 </parameter>
1793                                 <parameter name="CalleridPrivacy">
1794                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='callerid_privacy']/synopsis/node())"/></para>
1795                                 </parameter>
1796                                 <parameter name="CalleridTag">
1797                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='callerid_tag']/synopsis/node())"/></para>
1798                                 </parameter>
1799                                 <parameter name="TrustIdInbound">
1800                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='trust_id_inbound']/synopsis/node())"/></para>
1801                                 </parameter>
1802                                 <parameter name="TrustIdOutbound">
1803                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='trust_id_outbound']/synopsis/node())"/></para>
1804                                 </parameter>
1805                                 <parameter name="SendPai">
1806                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='send_pai']/synopsis/node())"/></para>
1807                                 </parameter>
1808                                 <parameter name="SendRpid">
1809                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='send_rpid']/synopsis/node())"/></para>
1810                                 </parameter>
1811                                 <parameter name="SendDiversion">
1812                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='send_diversion']/synopsis/node())"/></para>
1813                                 </parameter>
1814                                 <parameter name="Mailboxes">
1815                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='mailboxes']/synopsis/node())"/></para>
1816                                 </parameter>
1817                                 <parameter name="AggregateMwi">
1818                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='aggregate_mwi']/synopsis/node())"/></para>
1819                                 </parameter>
1820                                 <parameter name="MediaEncryption">
1821                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='media_encryption']/synopsis/node())"/></para>
1822                                 </parameter>
1823                                 <parameter name="MediaEncryptionOptimistic">
1824                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='media_encryption_optimistic']/synopsis/node())"/></para>
1825                                 </parameter>
1826                                 <parameter name="UseAvpf">
1827                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='use_avpf']/synopsis/node())"/></para>
1828                                 </parameter>
1829                                 <parameter name="ForceAvp">
1830                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='force_avp']/synopsis/node())"/></para>
1831                                 </parameter>
1832                                 <parameter name="MediaUseReceivedTransport">
1833                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='media_use_received_transport']/synopsis/node())"/></para>
1834                                 </parameter>
1835                                 <parameter name="OneTouchRecording">
1836                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='one_touch_recording']/synopsis/node())"/></para>
1837                                 </parameter>
1838                                 <parameter name="InbandProgress">
1839                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='inband_progress']/synopsis/node())"/></para>
1840                                 </parameter>
1841                                 <parameter name="CallGroup">
1842                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='call_group']/synopsis/node())"/></para>
1843                                 </parameter>
1844                                 <parameter name="PickupGroup">
1845                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='pickup_group']/synopsis/node())"/></para>
1846                                 </parameter>
1847                                 <parameter name="NamedCallGroup">
1848                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='named_call_group']/synopsis/node())"/></para>
1849                                 </parameter>
1850                                 <parameter name="NamedPickupGroup">
1851                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='named_pickup_group']/synopsis/node())"/></para>
1852                                 </parameter>
1853                                 <parameter name="DeviceStateBusyAt">
1854                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='device_state_busy_at']/synopsis/node())"/></para>
1855                                 </parameter>
1856                                 <parameter name="T38Udptl">
1857                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='t38_udptl']/synopsis/node())"/></para>
1858                                 </parameter>
1859                                 <parameter name="T38UdptlEc">
1860                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='t38_udptl_ec']/synopsis/node())"/></para>
1861                                 </parameter>
1862                                 <parameter name="T38UdptlMaxdatagram">
1863                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='t38_udptl_maxdatagram']/synopsis/node())"/></para>
1864                                 </parameter>
1865                                 <parameter name="FaxDetect">
1866                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='fax_detect']/synopsis/node())"/></para>
1867                                 </parameter>
1868                                 <parameter name="T38UdptlNat">
1869                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='t38_udptl_nat']/synopsis/node())"/></para>
1870                                 </parameter>
1871                                 <parameter name="T38UdptlIpv6">
1872                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='t38_udptl_ipv6']/synopsis/node())"/></para>
1873                                 </parameter>
1874                                 <parameter name="ToneZone">
1875                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='tone_zone']/synopsis/node())"/></para>
1876                                 </parameter>
1877                                 <parameter name="Language">
1878                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='language']/synopsis/node())"/></para>
1879                                 </parameter>
1880                                 <parameter name="RecordOnFeature">
1881                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='record_on_feature']/synopsis/node())"/></para>
1882                                 </parameter>
1883                                 <parameter name="RecordOffFeature">
1884                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='record_off_feature']/synopsis/node())"/></para>
1885                                 </parameter>
1886                                 <parameter name="AllowTransfer">
1887                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='allow_transfer']/synopsis/node())"/></para>
1888                                 </parameter>
1889                                 <parameter name="UserEqPhone">
1890                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='user_eq_phone']/synopsis/node())"/></para>
1891                                 </parameter>
1892                                 <parameter name="MohPassthrough">
1893                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='moh_passthrough']/synopsis/node())"/></para>
1894                                 </parameter>
1895                                 <parameter name="SdpOwner">
1896                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='sdp_owner']/synopsis/node())"/></para>
1897                                 </parameter>
1898                                 <parameter name="SdpSession">
1899                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='sdp_session']/synopsis/node())"/></para>
1900                                 </parameter>
1901                                 <parameter name="TosAudio">
1902                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='tos_audio']/synopsis/node())"/></para>
1903                                 </parameter>
1904                                 <parameter name="TosVideo">
1905                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='tos_video']/synopsis/node())"/></para>
1906                                 </parameter>
1907                                 <parameter name="CosAudio">
1908                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='cos_audio']/synopsis/node())"/></para>
1909                                 </parameter>
1910                                 <parameter name="CosVideo">
1911                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='cos_video']/synopsis/node())"/></para>
1912                                 </parameter>
1913                                 <parameter name="AllowSubscribe">
1914                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='allow_subscribe']/synopsis/node())"/></para>
1915                                 </parameter>
1916                                 <parameter name="SubMinExpiry">
1917                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='sub_min_expiry']/synopsis/node())"/></para>
1918                                 </parameter>
1919                                 <parameter name="FromUser">
1920                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='from_user']/synopsis/node())"/></para>
1921                                 </parameter>
1922                                 <parameter name="FromDomain">
1923                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='from_domain']/synopsis/node())"/></para>
1924                                 </parameter>
1925                                 <parameter name="MwiFromUser">
1926                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='mwi_from_user']/synopsis/node())"/></para>
1927                                 </parameter>
1928                                 <parameter name="RtpEngine">
1929                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rtp_engine']/synopsis/node())"/></para>
1930                                 </parameter>
1931                                 <parameter name="DtlsVerify">
1932                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_verify']/synopsis/node())"/></para>
1933                                 </parameter>
1934                                 <parameter name="DtlsRekey">
1935                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_rekey']/synopsis/node())"/></para>
1936                                 </parameter>
1937                                 <parameter name="DtlsCertFile">
1938                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_cert_file']/synopsis/node())"/></para>
1939                                 </parameter>
1940                                 <parameter name="DtlsPrivateKey">
1941                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_private_key']/synopsis/node())"/></para>
1942                                 </parameter>
1943                                 <parameter name="DtlsCipher">
1944                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_cipher']/synopsis/node())"/></para>
1945                                 </parameter>
1946                                 <parameter name="DtlsCaFile">
1947                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_ca_file']/synopsis/node())"/></para>
1948                                 </parameter>
1949                                 <parameter name="DtlsCaPath">
1950                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_ca_path']/synopsis/node())"/></para>
1951                                 </parameter>
1952                                 <parameter name="DtlsSetup">
1953                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_setup']/synopsis/node())"/></para>
1954                                 </parameter>
1955                                 <parameter name="SrtpTag32">
1956                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='srtp_tag_32']/synopsis/node())"/></para>
1957                                 </parameter>
1958                                 <parameter name="RedirectMethod">
1959                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='redirect_method']/synopsis/node())"/></para>
1960                                 </parameter>
1961                                 <parameter name="SetVar">
1962                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='set_var']/synopsis/node())"/></para>
1963                                 </parameter>
1964                                 <parameter name="MessageContext">
1965                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='message_context']/synopsis/node())"/></para>
1966                                 </parameter>
1967                                 <parameter name="Accountcode">
1968                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='accountcode']/synopsis/node())"/></para>
1969                                 </parameter>
1970                                 <parameter name="DeviceState">
1971                                         <para>The aggregate device state for this endpoint.</para>
1972                                 </parameter>
1973                                 <parameter name="ActiveChannels">
1974                                         <para>The number of active channels associated with this endpoint.</para>
1975                                 </parameter>
1976                                 <parameter name="SubscribeContext">
1977                                         <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='subscribe_context']/synopsis/node())"/></para>
1978                                 </parameter>
1979                         </syntax>
1980                 </managerEventInstance>
1981         </managerEvent>
1982         <managerEvent language="en_US" name="ContactStatusDetail">
1983                 <managerEventInstance class="EVENT_FLAG_COMMAND">
1984                         <synopsis>Provide details about a contact's status.</synopsis>
1985                         <syntax>
1986                                 <parameter name="AOR">
1987                                         <para>The AoR that owns this contact.</para>
1988                                 </parameter>
1989                                 <parameter name="URI">
1990                                         <para>This contact's URI.</para>
1991                                 </parameter>
1992                                 <parameter name="Status">
1993                                         <para>This contact's status.</para>
1994                                         <enumlist>
1995                                                 <enum name="Reachable"/>
1996                                                 <enum name="Unreachable"/>
1997                                         </enumlist>
1998                                 </parameter>
1999                                 <parameter name="RoundtripUsec">
2000                                         <para>The round trip time in microseconds.</para>
2001                                 </parameter>
2002                                 <parameter name="EndpointName">
2003                                         <para>The name of the endpoint associated with this information.</para>
2004                                 </parameter>
2005                                 <parameter name="UserAgent">
2006                                         <para>Content of the User-Agent header in REGISTER request</para>
2007                                 </parameter>
2008                                 <parameter name="RegExpire">
2009                                         <para>Absolute time that this contact is no longer valid after</para>
2010                                 </parameter>
2011                                 <parameter name="ViaAddress">
2012                                         <para>IP address:port of the last Via header in REGISTER request</para>
2013                                 </parameter>
2014                                 <parameter name="CallID">
2015                                         <para>Content of the Call-ID header in REGISTER request</para>
2016                                 </parameter>
2017                         </syntax>
2018                 </managerEventInstance>
2019         </managerEvent>
2020         <managerEvent language="en_US" name="EndpointList">
2021                 <managerEventInstance class="EVENT_FLAG_COMMAND">
2022                         <synopsis>Provide details about a contact's status.</synopsis>
2023                         <syntax>
2024                                 <parameter name="ObjectType">
2025                                         <para>The object's type. This will always be 'endpoint'.</para>
2026                                 </parameter>
2027                                 <parameter name="ObjectName">
2028                                         <para>The name of this object.</para>
2029                                 </parameter>
2030                                 <parameter name="Transport">
2031                                         <para>The transport configurations associated with this endpoint.</para>
2032                                 </parameter>
2033                                 <parameter name="Aor">
2034                                         <para>The aor configurations associated with this endpoint.</para>
2035                                 </parameter>
2036                                 <parameter name="Auths">
2037                                         <para>The inbound authentication configurations associated with this endpoint.</para>
2038                                 </parameter>
2039                                 <parameter name="OutboundAuths">
2040                                         <para>The outbound authentication configurations associated with this endpoint.</para>
2041                                 </parameter>
2042                                 <parameter name="DeviceState">
2043                                         <para>The aggregate device state for this endpoint.</para>
2044                                 </parameter>
2045                                 <parameter name="ActiveChannels">
2046                                         <para>The number of active channels associated with this endpoint.</para>
2047                                 </parameter>
2048                         </syntax>
2049                 </managerEventInstance>
2050         </managerEvent>
2051         <manager name="PJSIPShowEndpoints" language="en_US">
2052                 <synopsis>
2053                         Lists PJSIP endpoints.
2054                 </synopsis>
2055                 <syntax />
2056                 <description>
2057                         <para>
2058                         Provides a listing of all endpoints.  For each endpoint an <literal>EndpointList</literal> event
2059                         is raised that contains relevant attributes and status information.  Once all
2060                         endpoints have been listed an <literal>EndpointListComplete</literal> event is issued.
2061                         </para>
2062                 </description>
2063                 <responses>
2064                         <list-elements>
2065                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='EndpointList'])" />
2066                         </list-elements>
2067                         <managerEvent language="en_US" name="EndpointListComplete">
2068                                 <managerEventInstance class="EVENT_FLAG_COMMAND">
2069                                         <synopsis>Provide final information about an endpoint list.</synopsis>
2070                                         <syntax>
2071                                                 <parameter name="EventList"/>
2072                                                 <parameter name="ListItems"/>
2073                                         </syntax>
2074                                 </managerEventInstance>
2075                         </managerEvent>
2076                 </responses>
2077         </manager>
2078         <manager name="PJSIPShowEndpoint" language="en_US">
2079                 <synopsis>
2080                         Detail listing of an endpoint and its objects.
2081                 </synopsis>
2082                 <syntax>
2083                         <xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
2084                         <parameter name="Endpoint" required="true">
2085                                 <para>The endpoint to list.</para>
2086                         </parameter>
2087                 </syntax>
2088                 <description>
2089                         <para>
2090                         Provides a detailed listing of options for a given endpoint.  Events are issued
2091                         showing the configuration and status of the endpoint and associated objects.  These
2092                         events include <literal>EndpointDetail</literal>, <literal>AorDetail</literal>,
2093                         <literal>AuthDetail</literal>, <literal>TransportDetail</literal>, and
2094                         <literal>IdentifyDetail</literal>.  Some events may be listed multiple times if multiple objects are
2095                         associated (for instance AoRs).  Once all detail events have been raised a final
2096                         <literal>EndpointDetailComplete</literal> event is issued.
2097                         </para>
2098                 </description>
2099                 <responses>
2100                         <list-elements>
2101                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='EndpointDetail'])" />
2102                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='IdentifyDetail'])" />
2103                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='ContactStatusDetail'])" />
2104                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='AuthDetail'])" />
2105                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='TransportDetail'])" />
2106                                 <xi:include xpointer="xpointer(/docs/managerEvent[@name='AorDetail'])" />
2107                         </list-elements>
2108                         <managerEvent language="en_US" name="EndpointDetailComplete">
2109                                 <managerEventInstance class="EVENT_FLAG_COMMAND">
2110                                         <synopsis>Provide final information about endpoint details.</synopsis>
2111                                         <syntax>
2112                                                 <parameter name="EventList"/>
2113                                                 <parameter name="ListItems"/>
2114                                         </syntax>
2115                                 </managerEventInstance>
2116                         </managerEvent>
2117                 </responses>
2118         </manager>
2119  ***/
2120
2121 #define MOD_DATA_CONTACT "contact"
2122
2123 /*! Number of serializers in pool if one not supplied. */
2124 #define SERIALIZER_POOL_SIZE            8
2125
2126 /*! Next serializer pool index to use. */
2127 static int serializer_pool_pos;
2128
2129 /*! Pool of serializers to use if not supplied. */
2130 static struct ast_taskprocessor *serializer_pool[SERIALIZER_POOL_SIZE];
2131
2132 static pjsip_endpoint *ast_pjsip_endpoint;
2133
2134 static struct ast_threadpool *sip_threadpool;
2135
2136 /*! Local host address for IPv4 */
2137 static pj_sockaddr host_ip_ipv4;
2138
2139 /*! Local host address for IPv4 (string form) */
2140 static char host_ip_ipv4_string[PJ_INET6_ADDRSTRLEN + 2];
2141
2142 /*! Local host address for IPv6 */
2143 static pj_sockaddr host_ip_ipv6;
2144
2145 /*! Local host address for IPv6 (string form) */
2146 static char host_ip_ipv6_string[PJ_INET6_ADDRSTRLEN + 2];
2147
2148 static int register_service_noref(void *data)
2149 {
2150         pjsip_module **module = data;
2151         if (!ast_pjsip_endpoint) {
2152                 ast_log(LOG_ERROR, "There is no PJSIP endpoint. Unable to register services\n");
2153                 return -1;
2154         }
2155         if (pjsip_endpt_register_module(ast_pjsip_endpoint, *module) != PJ_SUCCESS) {
2156                 ast_log(LOG_ERROR, "Unable to register module %.*s\n", (int) pj_strlen(&(*module)->name), pj_strbuf(&(*module)->name));
2157                 return -1;
2158         }
2159         ast_debug(1, "Registered SIP service %.*s (%p)\n", (int) pj_strlen(&(*module)->name), pj_strbuf(&(*module)->name), *module);
2160         return 0;
2161 }
2162
2163 static int register_service(void *data)
2164 {
2165         int res;
2166
2167         if (!(res = register_service_noref(data))) {
2168                 ast_module_ref(ast_module_info->self);
2169         }
2170
2171         return res;
2172 }
2173
2174 int internal_sip_register_service(pjsip_module *module)
2175 {
2176         return ast_sip_push_task_synchronous(NULL, register_service_noref, &module);
2177 }
2178
2179 int ast_sip_register_service(pjsip_module *module)
2180 {
2181         return ast_sip_push_task_synchronous(NULL, register_service, &module);
2182 }
2183
2184 static int unregister_service_noref(void *data)
2185 {
2186         pjsip_module **module = data;
2187         if (!ast_pjsip_endpoint) {
2188                 return -1;
2189         }
2190         pjsip_endpt_unregister_module(ast_pjsip_endpoint, *module);
2191         ast_debug(1, "Unregistered SIP service %.*s\n", (int) pj_strlen(&(*module)->name), pj_strbuf(&(*module)->name));
2192         return 0;
2193 }
2194
2195 static int unregister_service(void *data)
2196 {
2197         int res;
2198
2199         if (!(res = unregister_service_noref(data))) {
2200                 ast_module_unref(ast_module_info->self);
2201         }
2202
2203         return res;
2204 }
2205
2206 int internal_sip_unregister_service(pjsip_module *module)
2207 {
2208         return ast_sip_push_task_synchronous(NULL, unregister_service_noref, &module);
2209 }
2210
2211 void ast_sip_unregister_service(pjsip_module *module)
2212 {
2213         ast_sip_push_task_synchronous(NULL, unregister_service, &module);
2214 }
2215
2216 static struct ast_sip_authenticator *registered_authenticator;
2217
2218 int ast_sip_register_authenticator(struct ast_sip_authenticator *auth)
2219 {
2220         if (registered_authenticator) {
2221                 ast_log(LOG_WARNING, "Authenticator %p is already registered. Cannot register a new one\n", registered_authenticator);
2222                 return -1;
2223         }
2224         registered_authenticator = auth;
2225         ast_debug(1, "Registered SIP authenticator module %p\n", auth);
2226         ast_module_ref(ast_module_info->self);
2227         return 0;
2228 }
2229
2230 void ast_sip_unregister_authenticator(struct ast_sip_authenticator *auth)
2231 {
2232         if (registered_authenticator != auth) {
2233                 ast_log(LOG_WARNING, "Trying to unregister authenticator %p but authenticator %p registered\n",
2234                                 auth, registered_authenticator);
2235                 return;
2236         }
2237         registered_authenticator = NULL;
2238         ast_debug(1, "Unregistered SIP authenticator %p\n", auth);
2239         ast_module_unref(ast_module_info->self);
2240 }
2241
2242 int ast_sip_requires_authentication(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata)
2243 {
2244         if (!registered_authenticator) {
2245                 ast_log(LOG_WARNING, "No SIP authenticator registered. Assuming authentication is not required\n");
2246                 return 0;
2247         }
2248
2249         return registered_authenticator->requires_authentication(endpoint, rdata);
2250 }
2251
2252 enum ast_sip_check_auth_result ast_sip_check_authentication(struct ast_sip_endpoint *endpoint,
2253                 pjsip_rx_data *rdata, pjsip_tx_data *tdata)
2254 {
2255         if (!registered_authenticator) {
2256                 ast_log(LOG_WARNING, "No SIP authenticator registered. Assuming authentication is successful\n");
2257                 return 0;
2258         }
2259         return registered_authenticator->check_authentication(endpoint, rdata, tdata);
2260 }
2261
2262 static struct ast_sip_outbound_authenticator *registered_outbound_authenticator;
2263
2264 int ast_sip_register_outbound_authenticator(struct ast_sip_outbound_authenticator *auth)
2265 {
2266         if (registered_outbound_authenticator) {
2267                 ast_log(LOG_WARNING, "Outbound authenticator %p is already registered. Cannot register a new one\n", registered_outbound_authenticator);
2268                 return -1;
2269         }
2270         registered_outbound_authenticator = auth;
2271         ast_debug(1, "Registered SIP outbound authenticator module %p\n", auth);
2272         ast_module_ref(ast_module_info->self);
2273         return 0;
2274 }
2275
2276 void ast_sip_unregister_outbound_authenticator(struct ast_sip_outbound_authenticator *auth)
2277 {
2278         if (registered_outbound_authenticator != auth) {
2279                 ast_log(LOG_WARNING, "Trying to unregister outbound authenticator %p but outbound authenticator %p registered\n",
2280                                 auth, registered_outbound_authenticator);
2281                 return;
2282         }
2283         registered_outbound_authenticator = NULL;
2284         ast_debug(1, "Unregistered SIP outbound authenticator %p\n", auth);
2285         ast_module_unref(ast_module_info->self);
2286 }
2287
2288 int ast_sip_create_request_with_auth(const struct ast_sip_auth_vector *auths, pjsip_rx_data *challenge,
2289                 pjsip_tx_data *old_request, pjsip_tx_data **new_request)
2290 {
2291         if (!registered_outbound_authenticator) {
2292                 ast_log(LOG_WARNING, "No SIP outbound authenticator registered. Cannot respond to authentication challenge\n");
2293                 return -1;
2294         }
2295         return registered_outbound_authenticator->create_request_with_auth(auths, challenge, old_request, new_request);
2296 }
2297
2298 struct endpoint_identifier_list {
2299         const char *name;
2300         unsigned int priority;
2301         struct ast_sip_endpoint_identifier *identifier;
2302         AST_RWLIST_ENTRY(endpoint_identifier_list) list;
2303 };
2304
2305 static AST_RWLIST_HEAD_STATIC(endpoint_identifiers, endpoint_identifier_list);
2306