2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 2013, Digium, Inc.
6 * Mark Michelson <mmichelson@digium.com>
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.
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.
22 /* Needed for SUBSCRIBE, NOTIFY, and PUBLISH method definitions */
23 #include <pjsip_simple.h>
26 #include "asterisk/res_pjsip.h"
27 #include "res_pjsip/include/res_pjsip_private.h"
28 #include "asterisk/linkedlists.h"
29 #include "asterisk/logger.h"
30 #include "asterisk/lock.h"
31 #include "asterisk/utils.h"
32 #include "asterisk/astobj2.h"
33 #include "asterisk/module.h"
34 #include "asterisk/threadpool.h"
35 #include "asterisk/taskprocessor.h"
36 #include "asterisk/uuid.h"
37 #include "asterisk/sorcery.h"
40 <depend>pjproject</depend>
41 <depend>res_sorcery_config</depend>
42 <support_level>core</support_level>
46 <configInfo name="res_pjsip" language="en_US">
47 <synopsis>SIP Resource using PJProject</synopsis>
48 <configFile name="pjsip.conf">
49 <configObject name="endpoint">
50 <synopsis>Endpoint</synopsis>
52 The <emphasis>Endpoint</emphasis> is the primary configuration object.
53 It contains the core SIP related options only, endpoints are <emphasis>NOT</emphasis>
54 dialable entries of their own. Communication with another SIP device is
55 accomplished via Addresses of Record (AoRs) which have one or more
56 contacts assicated with them. Endpoints <emphasis>NOT</emphasis> configured to
57 use a <literal>transport</literal> will default to first transport found
58 in <filename>pjsip.conf</filename> that matches its type.
60 <para>Example: An Endpoint has been configured with no transport.
61 When it comes time to call an AoR, PJSIP will find the
62 first transport that matches the type. A SIP URI of <literal>sip:5000@[11::33]</literal>
63 will use the first IPv6 transport and try to send the request.
65 <para>If the anonymous endpoint identifier is in use an endpoint with the name
66 "anonymous@domain" will be searched for as a last resort. If this is not found
67 it will fall back to searching for "anonymous". If neither endpoints are found
68 the anonymous endpoint identifier will not return an endpoint and anonymous
69 calling will not be possible.
72 <configOption name="100rel" default="yes">
73 <synopsis>Allow support for RFC3262 provisional ACK tags</synopsis>
77 <enum name="required" />
82 <configOption name="aggregate_mwi" default="yes">
83 <synopsis>Condense MWI notifications into a single NOTIFY.</synopsis>
84 <description><para>When enabled, <replaceable>aggregate_mwi</replaceable> condenses message
85 waiting notifications from multiple mailboxes into a single NOTIFY. If it is disabled,
86 individual NOTIFYs are sent for each mailbox.</para></description>
88 <configOption name="allow">
89 <synopsis>Media Codec(s) to allow</synopsis>
91 <configOption name="aors">
92 <synopsis>AoR(s) to be used with the endpoint</synopsis>
94 List of comma separated AoRs that the endpoint should be associated with.
97 <configOption name="auth">
98 <synopsis>Authentication Object(s) associated with the endpoint</synopsis>
100 This is a comma-delimited list of <replaceable>auth</replaceable> sections defined
101 in <filename>pjsip.conf</filename> to be used to verify inbound connection attempts.
103 Endpoints without an <literal>authentication</literal> object
104 configured will allow connections without vertification.
105 </para></description>
107 <configOption name="callerid">
108 <synopsis>CallerID information for the endpoint</synopsis>
110 Must be in the format <literal>Name <Number></literal>,
111 or only <literal><Number></literal>.
112 </para></description>
114 <configOption name="callerid_privacy">
115 <synopsis>Default privacy level</synopsis>
118 <enum name="allowed_not_screened" />
119 <enum name="allowed_passed_screen" />
120 <enum name="allowed_failed_screen" />
121 <enum name="allowed" />
122 <enum name="prohib_not_screened" />
123 <enum name="prohib_passed_screen" />
124 <enum name="prohib_failed_screen" />
125 <enum name="prohib" />
126 <enum name="unavailable" />
130 <configOption name="callerid_tag">
131 <synopsis>Internal id_tag for the endpoint</synopsis>
133 <configOption name="context">
134 <synopsis>Dialplan context for inbound sessions</synopsis>
136 <configOption name="direct_media_glare_mitigation" default="none">
137 <synopsis>Mitigation of direct media (re)INVITE glare</synopsis>
140 This setting attempts to avoid creating INVITE glare scenarios
141 by disabling direct media reINVITEs in one direction thereby allowing
142 designated servers (according to this option) to initiate direct
143 media reINVITEs without contention and significantly reducing call
147 A more detailed description of how this option functions can be found on
148 the Asterisk wiki https://wiki.asterisk.org/wiki/display/AST/SIP+Direct+Media+Reinvite+Glare+Avoidance
152 <enum name="outgoing" />
153 <enum name="incoming" />
157 <configOption name="direct_media_method" default="invite">
158 <synopsis>Direct Media method type</synopsis>
160 <para>Method for setting up Direct Media between endpoints.</para>
162 <enum name="invite" />
163 <enum name="reinvite">
164 <para>Alias for the <literal>invite</literal> value.</para>
166 <enum name="update" />
170 <configOption name="connected_line_method" default="invite">
171 <synopsis>Connected line method type</synopsis>
173 <para>Method used when updating connected line information.</para>
175 <enum name="invite" />
176 <enum name="reinvite">
177 <para>Alias for the <literal>invite</literal> value.</para>
179 <enum name="update" />
183 <configOption name="direct_media" default="yes">
184 <synopsis>Determines whether media may flow directly between endpoints.</synopsis>
186 <configOption name="disable_direct_media_on_nat" default="no">
187 <synopsis>Disable direct media session refreshes when NAT obstructs the media session</synopsis>
189 <configOption name="disallow">
190 <synopsis>Media Codec(s) to disallow</synopsis>
192 <configOption name="dtmf_mode" default="rfc4733">
193 <synopsis>DTMF mode</synopsis>
195 <para>This setting allows to choose the DTMF mode for endpoint communication.</para>
197 <enum name="rfc4733">
198 <para>DTMF is sent out of band of the main audio stream.This
199 supercedes the older <emphasis>RFC-2833</emphasis> used within
200 the older <literal>chan_sip</literal>.</para>
203 <para>DTMF is sent as part of audio stream.</para>
206 <para>DTMF is sent as SIP INFO packets.</para>
211 <configOption name="media_address">
212 <synopsis>IP address used in SDP for media handling</synopsis>
214 At the time of SDP creation, the IP address defined here will be used as
215 the media address for individual streams in the SDP.
218 Be aware that the <literal>external_media_address</literal> option, set in Transport
219 configuration, can also affect the final media address used in the SDP.
223 <configOption name="force_rport" default="yes">
224 <synopsis>Force use of return port</synopsis>
226 <configOption name="ice_support" default="no">
227 <synopsis>Enable the ICE mechanism to help traverse NAT</synopsis>
229 <configOption name="identify_by" default="username,location">
230 <synopsis>Way(s) for Endpoint to be identified</synopsis>
232 An endpoint can be identified in multiple ways. Currently, the only supported
233 option is <literal>username</literal>, which matches the endpoint based on the
234 username in the From header.
236 <note><para>Endpoints can also be identified by IP address; however, that method
237 of identification is not handled by this configuration option. See the documentation
238 for the <literal>identify</literal> configuration section for more details on that
239 method of endpoint identification. If this option is set to <literal>username</literal>
240 and an <literal>identify</literal> configuration section exists for the endpoint, then
241 the endpoint can be identified in multiple ways.</para></note>
243 <enum name="username" />
247 <configOption name="redirect_method">
248 <synopsis>How redirects received from an endpoint are handled</synopsis>
250 When a redirect is received from an endpoint there are multiple ways it can be handled.
251 If this option is set to <literal>user</literal> the user portion of the redirect target
252 is treated as an extension within the dialplan and dialed using a Local channel. If this option
253 is set to <literal>uri_core</literal> the target URI is returned to the dialing application
254 which dials it using the PJSIP channel driver and endpoint originally used. If this option is
255 set to <literal>uri_pjsip</literal> the redirect occurs within chan_pjsip itself and is not exposed
256 to the core at all. The <literal>uri_pjsip</literal> option has the benefit of being more efficient
257 and also supporting multiple potential redirect targets. The con is that since redirection occurs
258 within chan_pjsip redirecting information is not forwarded and redirection can not be
263 <enum name="uri_core" />
264 <enum name="uri_pjsip" />
268 <configOption name="mailboxes">
269 <synopsis>NOTIFY the endpoint when state changes for any of the specified mailboxes</synopsis>
271 Asterisk will send unsolicited MWI NOTIFY messages to the endpoint when state
272 changes happen for any of the specified mailboxes. More than one mailbox can be
273 specified with a comma-delimited string. app_voicemail mailboxes must be specified
274 as mailbox@context; for example: mailboxes=6001@default. For mailboxes provided by
275 external sources, such as through the res_external_mwi module, you must specify
276 strings supported by the external system.
278 For endpoints that SUBSCRIBE for MWI, use the <literal>mailboxes</literal> option in your AOR
280 </para></description>
282 <configOption name="moh_suggest" default="default">
283 <synopsis>Default Music On Hold class</synopsis>
285 <configOption name="outbound_auth">
286 <synopsis>Authentication object used for outbound requests</synopsis>
288 <configOption name="outbound_proxy">
289 <synopsis>Proxy through which to send requests, a full SIP URI must be provided</synopsis>
291 <configOption name="rewrite_contact">
292 <synopsis>Allow Contact header to be rewritten with the source IP address-port</synopsis>
294 On inbound SIP messages from this endpoint, the Contact header will be changed to have the
295 source IP address and port. This option does not affect outbound messages send to this
297 </para></description>
299 <configOption name="rtp_ipv6" default="no">
300 <synopsis>Allow use of IPv6 for RTP traffic</synopsis>
302 <configOption name="rtp_symmetric" default="no">
303 <synopsis>Enforce that RTP must be symmetric</synopsis>
305 <configOption name="send_diversion" default="yes">
306 <synopsis>Send the Diversion header, conveying the diversion
307 information to the called user agent</synopsis>
309 <configOption name="send_pai" default="no">
310 <synopsis>Send the P-Asserted-Identity header</synopsis>
312 <configOption name="send_rpid" default="no">
313 <synopsis>Send the Remote-Party-ID header</synopsis>
315 <configOption name="timers_min_se" default="90">
316 <synopsis>Minimum session timers expiration period</synopsis>
318 Minimium session timer expiration period. Time in seconds.
319 </para></description>
321 <configOption name="timers" default="yes">
322 <synopsis>Session timers for SIP packets</synopsis>
325 <enum name="forced" />
327 <enum name="required" />
332 <configOption name="timers_sess_expires" default="1800">
333 <synopsis>Maximum session timer expiration period</synopsis>
335 Maximium session timer expiration period. Time in seconds.
336 </para></description>
338 <configOption name="transport">
339 <synopsis>Desired transport configuration</synopsis>
341 This will set the desired transport configuration to send SIP data through.
343 <warning><para>Not specifying a transport will <emphasis>DEFAULT</emphasis>
344 to the first configured transport in <filename>pjsip.conf</filename> which is
345 valid for the URI we are trying to contact.
347 <warning><para>Transport configuration is not affected by reloads. In order to
348 change transports, a full Asterisk restart is required</para></warning>
351 <configOption name="trust_id_inbound" default="no">
352 <synopsis>Accept identification information received from this endpoint</synopsis>
353 <description><para>This option determines whether Asterisk will accept
354 identification from the endpoint from headers such as P-Asserted-Identity
355 or Remote-Party-ID header. This option applies both to calls originating from the
356 endpoint and calls originating from Asterisk. If <literal>no</literal>, the
357 configured Caller-ID from pjsip.conf will always be used as the identity for
358 the endpoint.</para></description>
360 <configOption name="trust_id_outbound" default="no">
361 <synopsis>Send private identification details to the endpoint.</synopsis>
362 <description><para>This option determines whether res_pjsip will send private
363 identification information to the endpoint. If <literal>no</literal>,
364 private Caller-ID information will not be forwarded to the endpoint.
365 "Private" in this case refers to any method of restricting identification.
366 Example: setting <replaceable>callerid_privacy</replaceable> to any
367 <literal>prohib</literal> variation.
368 Example: If <replaceable>trust_id_inbound</replaceable> is set to
369 <literal>yes</literal>, the presence of a <literal>Privacy: id</literal>
370 header in a SIP request or response would indicate the identification
371 provided in the request is private.</para></description>
373 <configOption name="type">
374 <synopsis>Must be of type 'endpoint'.</synopsis>
376 <configOption name="use_ptime" default="no">
377 <synopsis>Use Endpoint's requested packetisation interval</synopsis>
379 <configOption name="use_avpf" default="no">
380 <synopsis>Determines whether res_pjsip will use and enforce usage of AVPF for this
383 If set to <literal>yes</literal>, res_pjsip will use the AVPF or SAVPF RTP
384 profile for all media offers on outbound calls and media updates and will
385 decline media offers not using the AVPF or SAVPF profile.
387 If set to <literal>no</literal>, res_pjsip will use the AVP or SAVP RTP
388 profile for all media offers on outbound calls and media updates, but will
389 accept either the AVP/AVPF or SAVP/SAVPF RTP profile for all inbound
391 </para></description>
393 <configOption name="force_avp" default="no">
394 <synopsis>Determines whether res_pjsip will use and enforce usage of AVP,
395 regardless of the RTP profile in use for this endpoint.</synopsis>
397 If set to <literal>yes</literal>, res_pjsip will use the AVP, AVPF, SAVP, or
398 SAVPF RTP profile for all media offers on outbound calls and media updates including
399 those for DTLS-SRTP streams.
401 If set to <literal>no</literal>, res_pjsip will use the respective RTP profile
402 depending on configuration.
403 </para></description>
405 <configOption name="media_use_received_transport" default="no">
406 <synopsis>Determines whether res_pjsip will use the media transport received in the
407 offer SDP in the corresponding answer SDP.</synopsis>
409 If set to <literal>yes</literal>, res_pjsip will use the received media transport.
411 If set to <literal>no</literal>, res_pjsip will use the respective RTP profile
412 depending on configuration.
413 </para></description>
415 <configOption name="media_encryption" default="no">
416 <synopsis>Determines whether res_pjsip will use and enforce usage of media encryption
417 for this endpoint.</synopsis>
420 <enum name="no"><para>
421 res_pjsip will offer no encryption and allow no encryption to be setup.
423 <enum name="sdes"><para>
424 res_pjsip will offer standard SRTP setup via in-SDP keys. Encrypted SIP
425 transport should be used in conjunction with this option to prevent
426 exposure of media encryption keys.
428 <enum name="dtls"><para>
429 res_pjsip will offer DTLS-SRTP setup.
434 <configOption name="inband_progress" default="no">
435 <synopsis>Determines whether chan_pjsip will indicate ringing using inband
438 If set to <literal>yes</literal>, chan_pjsip will send a 183 Session Progress
439 when told to indicate ringing and will immediately start sending ringing
442 If set to <literal>no</literal>, chan_pjsip will send a 180 Ringing when told
443 to indicate ringing and will NOT send it as audio.
444 </para></description>
446 <configOption name="call_group">
447 <synopsis>The numeric pickup groups for a channel.</synopsis>
449 Can be set to a comma separated list of numbers or ranges between the values
450 of 0-63 (maximum of 64 groups).
451 </para></description>
453 <configOption name="pickup_group">
454 <synopsis>The numeric pickup groups that a channel can pickup.</synopsis>
456 Can be set to a comma separated list of numbers or ranges between the values
457 of 0-63 (maximum of 64 groups).
458 </para></description>
460 <configOption name="named_call_group">
461 <synopsis>The named pickup groups for a channel.</synopsis>
463 Can be set to a comma separated list of case sensitive strings limited by
464 supported line length.
465 </para></description>
467 <configOption name="named_pickup_group">
468 <synopsis>The named pickup groups that a channel can pickup.</synopsis>
470 Can be set to a comma separated list of case sensitive strings limited by
471 supported line length.
472 </para></description>
474 <configOption name="device_state_busy_at" default="0">
475 <synopsis>The number of in-use channels which will cause busy to be returned as device state</synopsis>
477 When the number of in-use channels for the endpoint matches the devicestate_busy_at setting the
478 PJSIP channel driver will return busy as the device state instead of in use.
479 </para></description>
481 <configOption name="t38_udptl" default="no">
482 <synopsis>Whether T.38 UDPTL support is enabled or not</synopsis>
484 If set to yes T.38 UDPTL support will be enabled, and T.38 negotiation requests will be accepted
486 </para></description>
488 <configOption name="t38_udptl_ec" default="none">
489 <synopsis>T.38 UDPTL error correction method</synopsis>
492 <enum name="none"><para>
493 No error correction should be used.
495 <enum name="fec"><para>
496 Forward error correction should be used.
498 <enum name="redundancy"><para>
499 Redundacy error correction should be used.
504 <configOption name="t38_udptl_maxdatagram" default="0">
505 <synopsis>T.38 UDPTL maximum datagram size</synopsis>
507 This option can be set to override the maximum datagram of a remote endpoint for broken
509 </para></description>
511 <configOption name="fax_detect" default="no">
512 <synopsis>Whether CNG tone detection is enabled</synopsis>
514 This option can be set to send the session to the fax extension when a CNG tone is
516 </para></description>
518 <configOption name="t38_udptl_nat" default="no">
519 <synopsis>Whether NAT support is enabled on UDPTL sessions</synopsis>
521 When enabled the UDPTL stack will send UDPTL packets to the source address of
523 </para></description>
525 <configOption name="t38_udptl_ipv6" default="no">
526 <synopsis>Whether IPv6 is used for UDPTL Sessions</synopsis>
528 When enabled the UDPTL stack will use IPv6.
529 </para></description>
531 <configOption name="tone_zone">
532 <synopsis>Set which country's indications to use for channels created for this endpoint.</synopsis>
534 <configOption name="language">
535 <synopsis>Set the default language to use for channels created for this endpoint.</synopsis>
537 <configOption name="one_touch_recording" default="no">
538 <synopsis>Determines whether one-touch recording is allowed for this endpoint.</synopsis>
540 <ref type="configOption">record_on_feature</ref>
541 <ref type="configOption">record_off_feature</ref>
544 <configOption name="record_on_feature" default="automixmon">
545 <synopsis>The feature to enact when one-touch recording is turned on.</synopsis>
547 <para>When an INFO request for one-touch recording arrives with a Record header set to "on", this
548 feature will be enabled for the channel. The feature designated here can be any built-in
549 or dynamic feature defined in features.conf.</para>
550 <note><para>This setting has no effect if the endpoint's one_touch_recording option is disabled</para></note>
553 <ref type="configOption">one_touch_recording</ref>
554 <ref type="configOption">record_off_feature</ref>
557 <configOption name="record_off_feature" default="automixmon">
558 <synopsis>The feature to enact when one-touch recording is turned off.</synopsis>
560 <para>When an INFO request for one-touch recording arrives with a Record header set to "off", this
561 feature will be enabled for the channel. The feature designated here can be any built-in
562 or dynamic feature defined in features.conf.</para>
563 <note><para>This setting has no effect if the endpoint's one_touch_recording option is disabled</para></note>
566 <ref type="configOption">one_touch_recording</ref>
567 <ref type="configOption">record_on_feature</ref>
570 <configOption name="rtp_engine" default="asterisk">
571 <synopsis>Name of the RTP engine to use for channels created for this endpoint</synopsis>
573 <configOption name="allow_transfer" default="yes">
574 <synopsis>Determines whether SIP REFER transfers are allowed for this endpoint</synopsis>
576 <configOption name="sdp_owner" default="-">
577 <synopsis>String placed as the username portion of an SDP origin (o=) line.</synopsis>
579 <configOption name="sdp_session" default="Asterisk">
580 <synopsis>String used for the SDP session (s=) line.</synopsis>
582 <configOption name="tos_audio">
583 <synopsis>DSCP TOS bits for audio streams</synopsis>
585 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
586 </para></description>
588 <configOption name="tos_video">
589 <synopsis>DSCP TOS bits for video streams</synopsis>
591 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
592 </para></description>
594 <configOption name="cos_audio">
595 <synopsis>Priority for audio streams</synopsis>
597 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
598 </para></description>
600 <configOption name="cos_video">
601 <synopsis>Priority for video streams</synopsis>
603 See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings
604 </para></description>
606 <configOption name="allow_subscribe" default="yes">
607 <synopsis>Determines if endpoint is allowed to initiate subscriptions with Asterisk.</synopsis>
609 <configOption name="sub_min_expiry" default="60">
610 <synopsis>The minimum allowed expiry time for subscriptions initiated by the endpoint.</synopsis>
612 <configOption name="from_user">
613 <synopsis>Username to use in From header for requests to this endpoint.</synopsis>
615 <configOption name="mwi_from_user">
616 <synopsis>Username to use in From header for unsolicited MWI NOTIFYs to this endpoint.</synopsis>
618 <configOption name="from_domain">
619 <synopsis>Domain to user in From header for requests to this endpoint.</synopsis>
621 <configOption name="dtls_verify">
622 <synopsis>Verify that the provided peer certificate is valid</synopsis>
624 This option only applies if <replaceable>media_encryption</replaceable> is
625 set to <literal>dtls</literal>.
626 </para></description>
628 <configOption name="dtls_rekey">
629 <synopsis>Interval at which to renegotiate the TLS session and rekey the SRTP session</synopsis>
631 This option only applies if <replaceable>media_encryption</replaceable> is
632 set to <literal>dtls</literal>.
634 If this is not set or the value provided is 0 rekeying will be disabled.
635 </para></description>
637 <configOption name="dtls_cert_file">
638 <synopsis>Path to certificate file to present to peer</synopsis>
640 This option only applies if <replaceable>media_encryption</replaceable> is
641 set to <literal>dtls</literal>.
642 </para></description>
644 <configOption name="dtls_private_key">
645 <synopsis>Path to private key for certificate file</synopsis>
647 This option only applies if <replaceable>media_encryption</replaceable> is
648 set to <literal>dtls</literal>.
649 </para></description>
651 <configOption name="dtls_cipher">
652 <synopsis>Cipher to use for DTLS negotiation</synopsis>
654 This option only applies if <replaceable>media_encryption</replaceable> is
655 set to <literal>dtls</literal>.
657 Many options for acceptable ciphers. See link for more:
658 http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
659 </para></description>
661 <configOption name="dtls_ca_file">
662 <synopsis>Path to certificate authority certificate</synopsis>
664 This option only applies if <replaceable>media_encryption</replaceable> is
665 set to <literal>dtls</literal>.
666 </para></description>
668 <configOption name="dtls_ca_path">
669 <synopsis>Path to a directory containing certificate authority certificates</synopsis>
671 This option only applies if <replaceable>media_encryption</replaceable> is
672 set to <literal>dtls</literal>.
673 </para></description>
675 <configOption name="dtls_setup">
676 <synopsis>Whether we are willing to accept connections, connect to the other party, or both.</synopsis>
679 This option only applies if <replaceable>media_encryption</replaceable> is
680 set to <literal>dtls</literal>.
683 <enum name="active"><para>
684 res_pjsip will make a connection to the peer.
686 <enum name="passive"><para>
687 res_pjsip will accept connections from the peer.
689 <enum name="actpass"><para>
690 res_pjsip will offer and accept connections from the peer.
695 <configOption name="srtp_tag_32">
696 <synopsis>Determines whether 32 byte tags should be used instead of 80 byte tags.</synopsis>
698 This option only applies if <replaceable>media_encryption</replaceable> is
699 set to <literal>sdes</literal> or <literal>dtls</literal>.
700 </para></description>
702 <configOption name="set_var">
703 <synopsis>Variable set on a channel involving the endpoint.</synopsis>
705 When a new channel is created using the endpoint set the specified
706 variable(s) on that channel. For multiple channel variables specify
707 multiple 'set_var'(s).
708 </para></description>
710 <configOption name="message_context">
711 <synopsis>Context to route incoming MESSAGE requests to.</synopsis>
713 If specified, incoming MESSAGE requests will be routed to the indicated
714 dialplan context. If no <replaceable>message_context</replaceable> is
715 specified, then the <replaceable>context</replaceable> setting is used.
716 </para></description>
718 <configOption name="accountcode">
719 <synopsis>An accountcode to set automatically on any channels created for this endpoint.</synopsis>
721 If specified, any channel created for this endpoint will automatically
722 have this accountcode set on it.
723 </para></description>
726 <configObject name="auth">
727 <synopsis>Authentication type</synopsis>
729 Authentication objects hold the authentication information for use
730 by other objects such as <literal>endpoints</literal> or <literal>registrations</literal>.
731 This also allows for multiple objects to use a single auth object. See
732 the <literal>auth_type</literal> config option for password style choices.
733 </para></description>
734 <configOption name="auth_type" default="userpass">
735 <synopsis>Authentication type</synopsis>
737 This option specifies which of the password style config options should be read
738 when trying to authenticate an endpoint inbound request. If set to <literal>userpass</literal>
739 then we'll read from the 'password' option. For <literal>md5</literal> we'll read
744 <enum name="userpass"/>
748 <configOption name="nonce_lifetime" default="32">
749 <synopsis>Lifetime of a nonce associated with this authentication config.</synopsis>
751 <configOption name="md5_cred">
752 <synopsis>MD5 Hash used for authentication.</synopsis>
753 <description><para>Only used when auth_type is <literal>md5</literal>.</para></description>
755 <configOption name="password">
756 <synopsis>PlainText password used for authentication.</synopsis>
757 <description><para>Only used when auth_type is <literal>userpass</literal>.</para></description>
759 <configOption name="realm" default="asterisk">
760 <synopsis>SIP realm for endpoint</synopsis>
762 <configOption name="type">
763 <synopsis>Must be 'auth'</synopsis>
765 <configOption name="username">
766 <synopsis>Username to use for account</synopsis>
769 <configObject name="domain_alias">
770 <synopsis>Domain Alias</synopsis>
772 Signifies that a domain is an alias. If the domain on a session is
773 not found to match an AoR then this object is used to see if we have
774 an alias for the AoR to which the endpoint is binding. This objects
775 name as defined in configuration should be the domain alias and a
776 config option is provided to specify the domain to be aliased.
777 </para></description>
778 <configOption name="type">
779 <synopsis>Must be of type 'domain_alias'.</synopsis>
781 <configOption name="domain">
782 <synopsis>Domain to be aliased</synopsis>
785 <configObject name="transport">
786 <synopsis>SIP Transport</synopsis>
788 <emphasis>Transports</emphasis>
790 <para>There are different transports and protocol derivatives
791 supported by <literal>res_pjsip</literal>. They are in order of
792 preference: UDP, TCP, and WebSocket (WS).</para>
793 <note><para>Changes to transport configuration in pjsip.conf will only be
794 effected on a complete restart of Asterisk. A module reload
795 will not suffice.</para></note>
797 <configOption name="async_operations" default="1">
798 <synopsis>Number of simultaneous Asynchronous Operations</synopsis>
800 <configOption name="bind">
801 <synopsis>IP Address and optional port to bind to for this transport</synopsis>
803 <configOption name="ca_list_file">
804 <synopsis>File containing a list of certificates to read (TLS ONLY)</synopsis>
806 <configOption name="cert_file">
807 <synopsis>Certificate file for endpoint (TLS ONLY)</synopsis>
809 <configOption name="cipher">
810 <synopsis>Preferred Cryptography Cipher (TLS ONLY)</synopsis>
812 Many options for acceptable ciphers see link for more:
813 http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
814 </para></description>
816 <configOption name="domain">
817 <synopsis>Domain the transport comes from</synopsis>
819 <configOption name="external_media_address">
820 <synopsis>External IP address to use in RTP handling</synopsis>
822 When a request or response is sent out, if the destination of the
823 message is outside the IP network defined in the option <literal>localnet</literal>,
824 and the media address in the SDP is within the localnet network, then the
825 media address in the SDP will be rewritten to the value defined for
826 <literal>external_media_address</literal>.
827 </para></description>
829 <configOption name="external_signaling_address">
830 <synopsis>External address for SIP signalling</synopsis>
832 <configOption name="external_signaling_port" default="0">
833 <synopsis>External port for SIP signalling</synopsis>
835 <configOption name="method">
836 <synopsis>Method of SSL transport (TLS ONLY)</synopsis>
839 <enum name="default" />
840 <enum name="unspecified" />
841 <enum name="tlsv1" />
842 <enum name="sslv2" />
843 <enum name="sslv3" />
844 <enum name="sslv23" />
848 <configOption name="local_net">
849 <synopsis>Network to consider local (used for NAT purposes).</synopsis>
850 <description><para>This must be in CIDR or dotted decimal format with the IP
851 and mask separated with a slash ('/').</para></description>
853 <configOption name="password">
854 <synopsis>Password required for transport</synopsis>
856 <configOption name="priv_key_file">
857 <synopsis>Private key file (TLS ONLY)</synopsis>
859 <configOption name="protocol" default="udp">
860 <synopsis>Protocol to use for SIP traffic</synopsis>
871 <configOption name="require_client_cert" default="false">
872 <synopsis>Require client certificate (TLS ONLY)</synopsis>
874 <configOption name="type">
875 <synopsis>Must be of type 'transport'.</synopsis>
877 <configOption name="verify_client" default="false">
878 <synopsis>Require verification of client certificate (TLS ONLY)</synopsis>
880 <configOption name="verify_server" default="false">
881 <synopsis>Require verification of server certificate (TLS ONLY)</synopsis>
883 <configOption name="tos" default="false">
884 <synopsis>Enable TOS for the signalling sent over this transport</synopsis>
886 <para>See <literal>https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service</literal>
887 for more information on this parameter.</para>
888 <note><para>This option does not apply to the <replaceable>ws</replaceable>
889 or the <replaceable>wss</replaceable> protocols.</para></note>
892 <configOption name="cos" default="false">
893 <synopsis>Enable COS for the signalling sent over this transport</synopsis>
895 <para>See <literal>https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service</literal>
896 for more information on this parameter.</para>
897 <note><para>This option does not apply to the <replaceable>ws</replaceable>
898 or the <replaceable>wss</replaceable> protocols.</para></note>
901 <configOption name="websocket_write_timeout">
902 <synopsis>The timeout (in milliseconds) to set on WebSocket connections.</synopsis>
904 <para>If a websocket connection accepts input slowly, the timeout
905 for writes to it can be increased to keep it from being disconnected.
906 Value is in milliseconds; default is 100 ms.</para>
910 <configObject name="contact">
911 <synopsis>A way of creating an aliased name to a SIP URI</synopsis>
913 Contacts are a way to hide SIP URIs from the dialplan directly.
914 They are also used to make a group of contactable parties when
915 in use with <literal>AoR</literal> lists.
916 </para></description>
917 <configOption name="type">
918 <synopsis>Must be of type 'contact'.</synopsis>
920 <configOption name="uri">
921 <synopsis>SIP URI to contact peer</synopsis>
923 <configOption name="expiration_time">
924 <synopsis>Time to keep alive a contact</synopsis>
926 Time to keep alive a contact. String style specification.
927 </para></description>
929 <configOption name="qualify_frequency" default="0">
930 <synopsis>Interval at which to qualify a contact</synopsis>
932 Interval between attempts to qualify the contact for reachability.
933 If <literal>0</literal> never qualify. Time in seconds.
934 </para></description>
936 <configOption name="outbound_proxy">
937 <synopsis>Outbound proxy used when sending OPTIONS request</synopsis>
939 If set the provided URI will be used as the outbound proxy when an
940 OPTIONS request is sent to a contact for qualify purposes.
941 </para></description>
943 <configOption name="path">
944 <synopsis>Stored Path vector for use in Route headers on outgoing requests.</synopsis>
946 <configOption name="user_agent">
947 <synopsis>User-Agent header from registration.</synopsis>
949 The User-Agent is automatically stored based on data present in incoming SIP
950 REGISTER requests and is not intended to be configured manually.
951 </para></description>
954 <configObject name="aor">
955 <synopsis>The configuration for a location of an endpoint</synopsis>
957 An AoR is what allows Asterisk to contact an endpoint via res_pjsip. If no
958 AoRs are specified, an endpoint will not be reachable by Asterisk.
959 Beyond that, an AoR has other uses within Asterisk, such as inbound
962 An <literal>AoR</literal> is a way to allow dialing a group
963 of <literal>Contacts</literal> that all use the same
964 <literal>endpoint</literal> for calls.
966 This can be used as another way of grouping a list of contacts to dial
967 rather than specifing them each directly when dialing via the dialplan.
968 This must be used in conjuction with the <literal>PJSIP_DIAL_CONTACTS</literal>.
970 Registrations: For Asterisk to match an inbound registration to an endpoint,
971 the AoR object name must match the user portion of the SIP URI in the "To:"
972 header of the inbound SIP registration. That will usually be equivalent
973 to the "user name" set in your hard or soft phones configuration.
974 </para></description>
975 <configOption name="contact">
976 <synopsis>Permanent contacts assigned to AoR</synopsis>
978 Contacts specified will be called whenever referenced
979 by <literal>chan_pjsip</literal>.
981 Use a separate "contact=" entry for each contact required. Contacts
982 are specified using a SIP URI.
983 </para></description>
985 <configOption name="default_expiration" default="3600">
986 <synopsis>Default expiration time in seconds for contacts that are dynamically bound to an AoR.</synopsis>
988 <configOption name="mailboxes">
989 <synopsis>Allow subscriptions for the specified mailbox(es)</synopsis>
990 <description><para>This option applies when an external entity subscribes to an AoR
991 for Message Waiting Indications. The mailboxes specified will be subscribed to.
992 More than one mailbox can be specified with a comma-delimited string.
993 app_voicemail mailboxes must be specified as mailbox@context;
994 for example: mailboxes=6001@default. For mailboxes provided by external sources,
995 such as through the res_external_mwi module, you must specify strings supported by
998 For endpoints that cannot SUBSCRIBE for MWI, you can set the <literal>mailboxes</literal> option in your
999 endpoint configuration section to enable unsolicited MWI NOTIFYs to the endpoint.
1000 </para></description>
1002 <configOption name="maximum_expiration" default="7200">
1003 <synopsis>Maximum time to keep an AoR</synopsis>
1005 Maximium time to keep a peer with explicit expiration. Time in seconds.
1006 </para></description>
1008 <configOption name="max_contacts" default="0">
1009 <synopsis>Maximum number of contacts that can bind to an AoR</synopsis>
1011 Maximum number of contacts that can associate with this AoR. This value does
1012 not affect the number of contacts that can be added with the "contact" option.
1013 It only limits contacts added through external interaction, such as
1016 <note><para>This should be set to <literal>1</literal> and
1017 <replaceable>remove_existing</replaceable> set to <literal>yes</literal> if you
1018 wish to stick with the older <literal>chan_sip</literal> behaviour.
1022 <configOption name="minimum_expiration" default="60">
1023 <synopsis>Minimum keep alive time for an AoR</synopsis>
1025 Minimum time to keep a peer with an explict expiration. Time in seconds.
1026 </para></description>
1028 <configOption name="remove_existing" default="no">
1029 <synopsis>Determines whether new contacts replace existing ones.</synopsis>
1031 On receiving a new registration to the AoR should it remove
1032 the existing contact that was registered against it?
1034 <note><para>This should be set to <literal>yes</literal> and
1035 <replaceable>max_contacts</replaceable> set to <literal>1</literal> if you
1036 wish to stick with the older <literal>chan_sip</literal> behaviour.
1040 <configOption name="type">
1041 <synopsis>Must be of type 'aor'.</synopsis>
1043 <configOption name="qualify_frequency" default="0">
1044 <synopsis>Interval at which to qualify an AoR</synopsis>
1046 Interval between attempts to qualify the AoR for reachability.
1047 If <literal>0</literal> never qualify. Time in seconds.
1048 </para></description>
1050 <configOption name="authenticate_qualify" default="no">
1051 <synopsis>Authenticates a qualify request if needed</synopsis>
1053 If true and a qualify request receives a challenge or authenticate response
1054 authentication is attempted before declaring the contact available.
1055 </para></description>
1057 <configOption name="outbound_proxy">
1058 <synopsis>Outbound proxy used when sending OPTIONS request</synopsis>
1060 If set the provided URI will be used as the outbound proxy when an
1061 OPTIONS request is sent to a contact for qualify purposes.
1062 </para></description>
1064 <configOption name="support_path">
1065 <synopsis>Enables Path support for REGISTER requests and Route support for other requests.</synopsis>
1067 When this option is enabled, the Path headers in register requests will be saved
1068 and its contents will be used in Route headers for outbound out-of-dialog requests
1069 and in Path headers for outbound 200 responses. Path support will also be indicated
1070 in the Supported header.
1071 </para></description>
1074 <configObject name="system">
1075 <synopsis>Options that apply to the SIP stack as well as other system-wide settings</synopsis>
1077 The settings in this section are global. In addition to being global, the values will
1078 not be re-evaluated when a reload is performed. This is because the values must be set
1079 before the SIP stack is initialized. The only way to reset these values is to either
1080 restart Asterisk, or unload res_pjsip.so and then load it again.
1081 </para></description>
1082 <configOption name="timer_t1" default="500">
1083 <synopsis>Set transaction timer T1 value (milliseconds).</synopsis>
1085 Timer T1 is the base for determining how long to wait before retransmitting
1086 requests that receive no response when using an unreliable transport (e.g. UDP).
1087 For more information on this timer, see RFC 3261, Section 17.1.1.1.
1088 </para></description>
1090 <configOption name="timer_b" default="32000">
1091 <synopsis>Set transaction timer B value (milliseconds).</synopsis>
1093 Timer B determines the maximum amount of time to wait after sending an INVITE
1094 request before terminating the transaction. It is recommended that this be set
1095 to 64 * Timer T1, but it may be set higher if desired. For more information on
1096 this timer, see RFC 3261, Section 17.1.1.1.
1097 </para></description>
1099 <configOption name="compact_headers" default="no">
1100 <synopsis>Use the short forms of common SIP header names.</synopsis>
1102 <configOption name="threadpool_initial_size" default="0">
1103 <synopsis>Initial number of threads in the res_pjsip threadpool.</synopsis>
1105 <configOption name="threadpool_auto_increment" default="5">
1106 <synopsis>The amount by which the number of threads is incremented when necessary.</synopsis>
1108 <configOption name="threadpool_idle_timeout" default="60">
1109 <synopsis>Number of seconds before an idle thread should be disposed of.</synopsis>
1111 <configOption name="threadpool_max_size" default="0">
1112 <synopsis>Maximum number of threads in the res_pjsip threadpool.
1113 A value of 0 indicates no maximum.</synopsis>
1115 <configOption name="type">
1116 <synopsis>Must be of type 'system'.</synopsis>
1119 <configObject name="global">
1120 <synopsis>Options that apply globally to all SIP communications</synopsis>
1122 The settings in this section are global. Unlike options in the <literal>system</literal>
1123 section, these options can be refreshed by performing a reload.
1124 </para></description>
1125 <configOption name="max_forwards" default="70">
1126 <synopsis>Value used in Max-Forwards header for SIP requests.</synopsis>
1128 <configOption name="type">
1129 <synopsis>Must be of type 'global'.</synopsis>
1131 <configOption name="user_agent" default="Asterisk <Asterisk Version>">
1132 <synopsis>Value used in User-Agent header for SIP requests and Server header for SIP responses.</synopsis>
1134 <configOption name="default_outbound_endpoint" default="default_outbound_endpoint">
1135 <synopsis>Endpoint to use when sending an outbound request to a URI without a specified endpoint.</synopsis>
1137 <configOption name="debug" default="no">
1138 <synopsis>Enable/Disable SIP debug logging. Valid options include yes|no or
1139 a host address</synopsis>
1144 <manager name="PJSIPQualify" language="en_US">
1146 Qualify a chan_pjsip endpoint.
1149 <xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
1150 <parameter name="Endpoint" required="true">
1151 <para>The endpoint you want to qualify.</para>
1155 <para>Qualify a chan_pjsip endpoint.</para>
1158 <managerEvent language="en_US" name="IdentifyDetail">
1159 <managerEventInstance class="EVENT_FLAG_COMMAND">
1160 <synopsis>Provide details about an identify section.</synopsis>
1162 <parameter name="ObjectType">
1163 <para>The object's type. This will always be 'identify'.</para>
1165 <parameter name="ObjectName">
1166 <para>The name of this object.</para>
1168 <parameter name="Endpoint">
1169 <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>
1171 <parameter name="Match">
1172 <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>
1174 <parameter name="EndpointName">
1175 <para>The name of the endpoint associated with this information.</para>
1178 </managerEventInstance>
1180 <managerEvent language="en_US" name="AorDetail">
1181 <managerEventInstance class="EVENT_FLAG_COMMAND">
1182 <synopsis>Provide details about an Address of Record (AoR) section.</synopsis>
1184 <parameter name="ObjectType">
1185 <para>The object's type. This will always be 'aor'.</para>
1187 <parameter name="ObjectName">
1188 <para>The name of this object.</para>
1190 <parameter name="MinimumExpiration">
1191 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='minimum_expiration']/synopsis/node())"/></para>
1193 <parameter name="MaximumExpiration">
1194 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='maximum_expiration']/synopsis/node())"/></para>
1196 <parameter name="DefaultExpiration">
1197 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='default_expiration']/synopsis/node())"/></para>
1199 <parameter name="QualifyFrequency">
1200 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='qualify_frequency']/synopsis/node())"/></para>
1202 <parameter name="AuthenticateQualify">
1203 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='authenticate_qualify']/synopsis/node())"/></para>
1205 <parameter name="MaxContacts">
1206 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='max_contacts']/synopsis/node())"/></para>
1208 <parameter name="RemoveExisting">
1209 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='remove_existing']/synopsis/node())"/></para>
1211 <parameter name="Mailboxes">
1212 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='mailboxes']/synopsis/node())"/></para>
1214 <parameter name="OutboundProxy">
1215 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='outbound_proxy']/synopsis/node())"/></para>
1217 <parameter name="SupportPath">
1218 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='aor']/configOption[@name='support_path']/synopsis/node())"/></para>
1220 <parameter name="TotalContacts">
1221 <para>The total number of contacts associated with this AoR.</para>
1223 <parameter name="ContactsRegistered">
1224 <para>The number of non-permanent contacts associated with this AoR.</para>
1226 <parameter name="EndpointName">
1227 <para>The name of the endpoint associated with this information.</para>
1230 </managerEventInstance>
1232 <managerEvent language="en_US" name="AuthDetail">
1233 <managerEventInstance class="EVENT_FLAG_COMMAND">
1234 <synopsis>Provide details about an authentication section.</synopsis>
1236 <parameter name="ObjectType">
1237 <para>The object's type. This will always be 'auth'.</para>
1239 <parameter name="ObjectName">
1240 <para>The name of this object.</para>
1242 <parameter name="Username">
1243 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='username']/synopsis/node())"/></para>
1245 <parameter name="Password">
1246 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='username']/synopsis/node())"/></para>
1248 <parameter name="Md5Cred">
1249 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='md5_cred']/synopsis/node())"/></para>
1251 <parameter name="Realm">
1252 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='realm']/synopsis/node())"/></para>
1254 <parameter name="NonceLifetime">
1255 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='nonce_lifetime']/synopsis/node())"/></para>
1257 <parameter name="AuthType">
1258 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='auth']/configOption[@name='auth_type']/synopsis/node())"/></para>
1260 <parameter name="EndpointName">
1261 <para>The name of the endpoint associated with this information.</para>
1264 </managerEventInstance>
1266 <managerEvent language="en_US" name="TransportDetail">
1267 <managerEventInstance class="EVENT_FLAG_COMMAND">
1268 <synopsis>Provide details about an authentication section.</synopsis>
1270 <parameter name="ObjectType">
1271 <para>The object's type. This will always be 'transport'.</para>
1273 <parameter name="ObjectName">
1274 <para>The name of this object.</para>
1276 <parameter name="Protocol">
1277 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='protocol']/synopsis/node())"/></para>
1279 <parameter name="Bind">
1280 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='bind']/synopsis/node())"/></para>
1282 <parameter name="AsycOperations">
1283 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='async_operations']/synopsis/node())"/></para>
1285 <parameter name="CaListFile">
1286 <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>
1288 <parameter name="CertFile">
1289 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='cert_file']/synopsis/node())"/></para>
1291 <parameter name="PrivKeyFile">
1292 <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>
1294 <parameter name="Password">
1295 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='password']/synopsis/node())"/></para>
1297 <parameter name="ExternalSignalingAddress">
1298 <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>
1300 <parameter name="ExternalSignalingPort">
1301 <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>
1303 <parameter name="ExternalMediaAddress">
1304 <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>
1306 <parameter name="Domain">
1307 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='domain']/synopsis/node())"/></para>
1309 <parameter name="VerifyServer">
1310 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='verify_server']/synopsis/node())"/></para>
1312 <parameter name="VerifyClient">
1313 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='verify_client']/synopsis/node())"/></para>
1315 <parameter name="RequireClientCert">
1316 <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>
1318 <parameter name="Method">
1319 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='method']/synopsis/node())"/></para>
1321 <parameter name="Cipher">
1322 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='cipher']/synopsis/node())"/></para>
1324 <parameter name="LocalNet">
1325 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='local_net']/synopsis/node())"/></para>
1327 <parameter name="Tos">
1328 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='tos']/synopsis/node())"/></para>
1330 <parameter name="Cos">
1331 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='transport']/configOption[@name='cos']/synopsis/node())"/></para>
1333 <parameter name="WebsocketWriteTimeout">
1334 <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>
1336 <parameter name="EndpointName">
1337 <para>The name of the endpoint associated with this information.</para>
1340 </managerEventInstance>
1342 <managerEvent language="en_US" name="EndpointDetail">
1343 <managerEventInstance class="EVENT_FLAG_COMMAND">
1344 <synopsis>Provide details about an endpoint section.</synopsis>
1346 <parameter name="ObjectType">
1347 <para>The object's type. This will always be 'endpoint'.</para>
1349 <parameter name="ObjectName">
1350 <para>The name of this object.</para>
1352 <parameter name="Context">
1353 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='context']/synopsis/node())"/></para>
1355 <parameter name="Disallow">
1356 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='disallow']/synopsis/node())"/></para>
1358 <parameter name="Allow">
1359 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='allow']/synopsis/node())"/></para>
1361 <parameter name="DtmfMode">
1362 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtmf_mode']/synopsis/node())"/></para>
1364 <parameter name="RtpIpv6">
1365 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rtp_ipv6']/synopsis/node())"/></para>
1367 <parameter name="RtpSymmetric">
1368 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rtp_symmetric']/synopsis/node())"/></para>
1370 <parameter name="IceSupport">
1371 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='ice_support']/synopsis/node())"/></para>
1373 <parameter name="UsePtime">
1374 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='use_ptime']/synopsis/node())"/></para>
1376 <parameter name="ForceRport">
1377 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='force_rport']/synopsis/node())"/></para>
1379 <parameter name="RewriteContact">
1380 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rewrite_contact']/synopsis/node())"/></para>
1382 <parameter name="Transport">
1383 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='transport']/synopsis/node())"/></para>
1385 <parameter name="OutboundProxy">
1386 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='outbound_proxy']/synopsis/node())"/></para>
1388 <parameter name="MohSuggest">
1389 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='moh_suggest']/synopsis/node())"/></para>
1391 <parameter name="100rel">
1392 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='100rel']/synopsis/node())"/></para>
1394 <parameter name="Timers">
1395 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='timers']/synopsis/node())"/></para>
1397 <parameter name="TimersMinSe">
1398 <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>
1400 <parameter name="TimersSessExpires">
1401 <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>
1403 <parameter name="Auth">
1404 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='auth']/synopsis/node())"/></para>
1406 <parameter name="OutboundAuth">
1407 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='outbound_auth']/synopsis/node())"/></para>
1409 <parameter name="Aors">
1410 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='aors']/synopsis/node())"/></para>
1412 <parameter name="MediaAddress">
1413 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='media_address']/synopsis/node())"/></para>
1415 <parameter name="IdentifyBy">
1416 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='identify_by']/synopsis/node())"/></para>
1418 <parameter name="DirectMedia">
1419 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='direct_media']/synopsis/node())"/></para>
1421 <parameter name="DirectMediaMethod">
1422 <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>
1424 <parameter name="ConnectedLineMethod">
1425 <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>
1427 <parameter name="DirectMediaGlareMitigation">
1428 <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>
1430 <parameter name="DisableDirectMediaOnNat">
1431 <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>
1433 <parameter name="Callerid">
1434 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='callerid']/synopsis/node())"/></para>
1436 <parameter name="CalleridPrivacy">
1437 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='callerid_privacy']/synopsis/node())"/></para>
1439 <parameter name="CalleridTag">
1440 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='callerid_tag']/synopsis/node())"/></para>
1442 <parameter name="TrustIdInbound">
1443 <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>
1445 <parameter name="TrustIdOutbound">
1446 <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>
1448 <parameter name="SendPai">
1449 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='send_pai']/synopsis/node())"/></para>
1451 <parameter name="SendRpid">
1452 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='send_rpid']/synopsis/node())"/></para>
1454 <parameter name="SendDiversion">
1455 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='send_diversion']/synopsis/node())"/></para>
1457 <parameter name="Mailboxes">
1458 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='mailboxes']/synopsis/node())"/></para>
1460 <parameter name="AggregateMwi">
1461 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='aggregate_mwi']/synopsis/node())"/></para>
1463 <parameter name="MediaEncryption">
1464 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='media_encryption']/synopsis/node())"/></para>
1466 <parameter name="UseAvpf">
1467 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='use_avpf']/synopsis/node())"/></para>
1469 <parameter name="ForceAvp">
1470 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='force_avp']/synopsis/node())"/></para>
1472 <parameter name="MediaUseReceivedTransport">
1473 <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>
1475 <parameter name="OneTouchRecording">
1476 <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>
1478 <parameter name="InbandProgress">
1479 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='inband_progress']/synopsis/node())"/></para>
1481 <parameter name="CallGroup">
1482 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='call_group']/synopsis/node())"/></para>
1484 <parameter name="PickupGroup">
1485 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='pickup_group']/synopsis/node())"/></para>
1487 <parameter name="NamedCallGroup">
1488 <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>
1490 <parameter name="NamedPickupGroup">
1491 <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>
1493 <parameter name="DeviceStateBusyAt">
1494 <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>
1496 <parameter name="T38Udptl">
1497 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='t38_udptl']/synopsis/node())"/></para>
1499 <parameter name="T38UdptlEc">
1500 <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>
1502 <parameter name="T38UdptlMaxdatagram">
1503 <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>
1505 <parameter name="FaxDetect">
1506 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='fax_detect']/synopsis/node())"/></para>
1508 <parameter name="T38UdptlNat">
1509 <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>
1511 <parameter name="T38UdptlIpv6">
1512 <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>
1514 <parameter name="ToneZone">
1515 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='tone_zone']/synopsis/node())"/></para>
1517 <parameter name="Language">
1518 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='language']/synopsis/node())"/></para>
1520 <parameter name="RecordOnFeature">
1521 <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>
1523 <parameter name="RecordOffFeature">
1524 <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>
1526 <parameter name="AllowTransfer">
1527 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='allow_transfer']/synopsis/node())"/></para>
1529 <parameter name="SdpOwner">
1530 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='sdp_owner']/synopsis/node())"/></para>
1532 <parameter name="SdpSession">
1533 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='sdp_session']/synopsis/node())"/></para>
1535 <parameter name="TosAudio">
1536 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='tos_audio']/synopsis/node())"/></para>
1538 <parameter name="TosVideo">
1539 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='tos_video']/synopsis/node())"/></para>
1541 <parameter name="CosAudio">
1542 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='cos_audio']/synopsis/node())"/></para>
1544 <parameter name="CosVideo">
1545 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='cos_video']/synopsis/node())"/></para>
1547 <parameter name="AllowSubscribe">
1548 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='allow_subscribe']/synopsis/node())"/></para>
1550 <parameter name="SubMinExpiry">
1551 <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>
1553 <parameter name="FromUser">
1554 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='from_user']/synopsis/node())"/></para>
1556 <parameter name="FromDomain">
1557 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='from_domain']/synopsis/node())"/></para>
1559 <parameter name="MwiFromUser">
1560 <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>
1562 <parameter name="RtpEngine">
1563 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='rtp_engine']/synopsis/node())"/></para>
1565 <parameter name="DtlsVerify">
1566 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_verify']/synopsis/node())"/></para>
1568 <parameter name="DtlsRekey">
1569 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_rekey']/synopsis/node())"/></para>
1571 <parameter name="DtlsCertFile">
1572 <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>
1574 <parameter name="DtlsPrivateKey">
1575 <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>
1577 <parameter name="DtlsCipher">
1578 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_cipher']/synopsis/node())"/></para>
1580 <parameter name="DtlsCaFile">
1581 <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>
1583 <parameter name="DtlsCaPath">
1584 <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>
1586 <parameter name="DtlsSetup">
1587 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='dtls_setup']/synopsis/node())"/></para>
1589 <parameter name="SrtpTag32">
1590 <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>
1592 <parameter name="RedirectMethod">
1593 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='redirect_method']/synopsis/node())"/></para>
1595 <parameter name="SetVar">
1596 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='set_var']/synopsis/node())"/></para>
1598 <parameter name="MessageContext">
1599 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='message_context']/synopsis/node())"/></para>
1601 <parameter name="Accountcode">
1602 <para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='accountcode']/synopsis/node())"/></para>
1604 <parameter name="DeviceState">
1605 <para>The aggregate device state for this endpoint.</para>
1607 <parameter name="ActiveChannels">
1608 <para>The number of active channels associated with this endpoint.</para>
1611 </managerEventInstance>
1613 <managerEvent language="en_US" name="ContactStatusDetail">
1614 <managerEventInstance class="EVENT_FLAG_COMMAND">
1615 <synopsis>Provide details about a contact's status.</synopsis>
1617 <parameter name="AOR">
1618 <para>The AoR that owns this contact.</para>
1620 <parameter name="URI">
1621 <para>This contact's URI.</para>
1623 <parameter name="Status">
1624 <para>This contact's status.</para>
1626 <enum name="Reachable"/>
1627 <enum name="Unreachable"/>
1630 <parameter name="RoundtripUsec">
1631 <para>The round trip time in microseconds.</para>
1633 <parameter name="EndpointName">
1634 <para>The name of the endpoint associated with this information.</para>
1637 </managerEventInstance>
1639 <managerEvent language="en_US" name="EndpointList">
1640 <managerEventInstance class="EVENT_FLAG_COMMAND">
1641 <synopsis>Provide details about a contact's status.</synopsis>
1643 <parameter name="ObjectType">
1644 <para>The object's type. This will always be 'endpoint'.</para>
1646 <parameter name="ObjectName">
1647 <para>The name of this object.</para>
1649 <parameter name="Transport">
1650 <para>The transport configurations associated with this endpoint.</para>
1652 <parameter name="Aor">
1653 <para>The aor configurations associated with this endpoint.</para>
1655 <parameter name="Auths">
1656 <para>The inbound authentication configurations associated with this endpoint.</para>
1658 <parameter name="OutboundAuths">
1659 <para>The outbound authentication configurations associated with this endpoint.</para>
1661 <parameter name="DeviceState">
1662 <para>The aggregate device state for this endpoint.</para>
1664 <parameter name="ActiveChannels">
1665 <para>The number of active channels associated with this endpoint.</para>
1668 </managerEventInstance>
1670 <manager name="PJSIPShowEndpoints" language="en_US">
1672 Lists PJSIP endpoints.
1677 Provides a listing of all endpoints. For each endpoint an <literal>EndpointList</literal> event
1678 is raised that contains relevant attributes and status information. Once all
1679 endpoints have been listed an <literal>EndpointListComplete</literal> event is issued.
1684 <xi:include xpointer="xpointer(/docs/managerEvent[@name='EndpointList'])" />
1686 <managerEvent language="en_US" name="EndpointListComplete">
1687 <managerEventInstance class="EVENT_FLAG_COMMAND">
1688 <synopsis>Provide final information about an endpoint list.</synopsis>
1690 <parameter name="EventList"/>
1691 <parameter name="ListItems"/>
1693 </managerEventInstance>
1697 <manager name="PJSIPShowEndpoint" language="en_US">
1699 Detail listing of an endpoint and its objects.
1702 <xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
1703 <parameter name="Endpoint" required="true">
1704 <para>The endpoint to list.</para>
1709 Provides a detailed listing of options for a given endpoint. Events are issued
1710 showing the configuration and status of the endpoint and associated objects. These
1711 events include <literal>EndpointDetail</literal>, <literal>AorDetail</literal>,
1712 <literal>AuthDetail</literal>, <literal>TransportDetail</literal>, and
1713 <literal>IdentifyDetail</literal>. Some events may be listed multiple times if multiple objects are
1714 associated (for instance AoRs). Once all detail events have been raised a final
1715 <literal>EndpointDetailComplete</literal> event is issued.
1720 <xi:include xpointer="xpointer(/docs/managerEvent[@name='EndpointDetail'])" />
1721 <xi:include xpointer="xpointer(/docs/managerEvent[@name='IdentifyDetail'])" />
1722 <xi:include xpointer="xpointer(/docs/managerEvent[@name='ContactStatusDetail'])" />
1723 <xi:include xpointer="xpointer(/docs/managerEvent[@name='AuthDetail'])" />
1724 <xi:include xpointer="xpointer(/docs/managerEvent[@name='TransportDetail'])" />
1725 <xi:include xpointer="xpointer(/docs/managerEvent[@name='AorDetail'])" />
1727 <managerEvent language="en_US" name="EndpointDetailComplete">
1728 <managerEventInstance class="EVENT_FLAG_COMMAND">
1729 <synopsis>Provide final information about endpoint details.</synopsis>
1731 <parameter name="EventList"/>
1732 <parameter name="ListItems"/>
1734 </managerEventInstance>
1740 #define MOD_DATA_CONTACT "contact"
1742 static pjsip_endpoint *ast_pjsip_endpoint;
1744 static struct ast_threadpool *sip_threadpool;
1746 static int register_service(void *data)
1748 pjsip_module **module = data;
1749 if (!ast_pjsip_endpoint) {
1750 ast_log(LOG_ERROR, "There is no PJSIP endpoint. Unable to register services\n");
1753 if (pjsip_endpt_register_module(ast_pjsip_endpoint, *module) != PJ_SUCCESS) {
1754 ast_log(LOG_ERROR, "Unable to register module %.*s\n", (int) pj_strlen(&(*module)->name), pj_strbuf(&(*module)->name));
1757 ast_debug(1, "Registered SIP service %.*s (%p)\n", (int) pj_strlen(&(*module)->name), pj_strbuf(&(*module)->name), *module);
1758 ast_module_ref(ast_module_info->self);
1762 int ast_sip_register_service(pjsip_module *module)
1764 return ast_sip_push_task_synchronous(NULL, register_service, &module);
1767 static int unregister_service(void *data)
1769 pjsip_module **module = data;
1770 ast_module_unref(ast_module_info->self);
1771 if (!ast_pjsip_endpoint) {
1774 pjsip_endpt_unregister_module(ast_pjsip_endpoint, *module);
1775 ast_debug(1, "Unregistered SIP service %.*s\n", (int) pj_strlen(&(*module)->name), pj_strbuf(&(*module)->name));
1779 void ast_sip_unregister_service(pjsip_module *module)
1781 ast_sip_push_task_synchronous(NULL, unregister_service, &module);
1784 static struct ast_sip_authenticator *registered_authenticator;
1786 int ast_sip_register_authenticator(struct ast_sip_authenticator *auth)
1788 if (registered_authenticator) {
1789 ast_log(LOG_WARNING, "Authenticator %p is already registered. Cannot register a new one\n", registered_authenticator);
1792 registered_authenticator = auth;
1793 ast_debug(1, "Registered SIP authenticator module %p\n", auth);
1794 ast_module_ref(ast_module_info->self);
1798 void ast_sip_unregister_authenticator(struct ast_sip_authenticator *auth)
1800 if (registered_authenticator != auth) {
1801 ast_log(LOG_WARNING, "Trying to unregister authenticator %p but authenticator %p registered\n",
1802 auth, registered_authenticator);
1805 registered_authenticator = NULL;
1806 ast_debug(1, "Unregistered SIP authenticator %p\n", auth);
1807 ast_module_unref(ast_module_info->self);
1810 int ast_sip_requires_authentication(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata)
1812 if (!registered_authenticator) {
1813 ast_log(LOG_WARNING, "No SIP authenticator registered. Assuming authentication is not required\n");
1817 return registered_authenticator->requires_authentication(endpoint, rdata);
1820 enum ast_sip_check_auth_result ast_sip_check_authentication(struct ast_sip_endpoint *endpoint,
1821 pjsip_rx_data *rdata, pjsip_tx_data *tdata)
1823 if (!registered_authenticator) {
1824 ast_log(LOG_WARNING, "No SIP authenticator registered. Assuming authentication is successful\n");
1827 return registered_authenticator->check_authentication(endpoint, rdata, tdata);
1830 static struct ast_sip_outbound_authenticator *registered_outbound_authenticator;
1832 int ast_sip_register_outbound_authenticator(struct ast_sip_outbound_authenticator *auth)
1834 if (registered_outbound_authenticator) {
1835 ast_log(LOG_WARNING, "Outbound authenticator %p is already registered. Cannot register a new one\n", registered_outbound_authenticator);
1838 registered_outbound_authenticator = auth;
1839 ast_debug(1, "Registered SIP outbound authenticator module %p\n", auth);
1840 ast_module_ref(ast_module_info->self);
1844 void ast_sip_unregister_outbound_authenticator(struct ast_sip_outbound_authenticator *auth)
1846 if (registered_outbound_authenticator != auth) {
1847 ast_log(LOG_WARNING, "Trying to unregister outbound authenticator %p but outbound authenticator %p registered\n",
1848 auth, registered_outbound_authenticator);
1851 registered_outbound_authenticator = NULL;
1852 ast_debug(1, "Unregistered SIP outbound authenticator %p\n", auth);
1853 ast_module_unref(ast_module_info->self);
1856 int ast_sip_create_request_with_auth(const struct ast_sip_auth_vector *auths, pjsip_rx_data *challenge,
1857 pjsip_transaction *tsx, pjsip_tx_data **new_request)
1859 if (!registered_outbound_authenticator) {
1860 ast_log(LOG_WARNING, "No SIP outbound authenticator registered. Cannot respond to authentication challenge\n");
1863 return registered_outbound_authenticator->create_request_with_auth(auths, challenge, tsx, new_request);
1866 struct endpoint_identifier_list {
1867 struct ast_sip_endpoint_identifier *identifier;
1868 AST_RWLIST_ENTRY(endpoint_identifier_list) list;
1871 static AST_RWLIST_HEAD_STATIC(endpoint_identifiers, endpoint_identifier_list);
1873 int ast_sip_register_endpoint_identifier(struct ast_sip_endpoint_identifier *identifier)
1875 struct endpoint_identifier_list *id_list_item;
1876 SCOPED_LOCK(lock, &endpoint_identifiers, AST_RWLIST_WRLOCK, AST_RWLIST_UNLOCK);
1878 id_list_item = ast_calloc(1, sizeof(*id_list_item));
1879 if (!id_list_item) {
1880 ast_log(LOG_ERROR, "Unabled to add endpoint identifier. Out of memory.\n");
1883 id_list_item->identifier = identifier;
1885 AST_RWLIST_INSERT_TAIL(&endpoint_identifiers, id_list_item, list);
1886 ast_debug(1, "Registered endpoint identifier %p\n", identifier);
1888 ast_module_ref(ast_module_info->self);
1892 void ast_sip_unregister_endpoint_identifier(struct ast_sip_endpoint_identifier *identifier)
1894 struct endpoint_identifier_list *iter;
1895 SCOPED_LOCK(lock, &endpoint_identifiers, AST_RWLIST_WRLOCK, AST_RWLIST_UNLOCK);
1896 AST_RWLIST_TRAVERSE_SAFE_BEGIN(&endpoint_identifiers, iter, list) {
1897 if (iter->identifier == identifier) {
1898 AST_RWLIST_REMOVE_CURRENT(list);
1900 ast_debug(1, "Unregistered endpoint identifier %p\n", identifier);
1901 ast_module_unref(ast_module_info->self);
1905 AST_RWLIST_TRAVERSE_SAFE_END;
1908 struct ast_sip_endpoint *ast_sip_identify_endpoint(pjsip_rx_data *rdata)
1910 struct endpoint_identifier_list *iter;
1911 struct ast_sip_endpoint *endpoint = NULL;
1912 SCOPED_LOCK(lock, &endpoint_identifiers, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK);
1913 AST_RWLIST_TRAVERSE(&endpoint_identifiers, iter, list) {
1914 ast_assert(iter->identifier->identify_endpoint != NULL);
1915 endpoint = iter->identifier->identify_endpoint(rdata);
1923 AST_RWLIST_HEAD_STATIC(endpoint_formatters, ast_sip_endpoint_formatter);
1925 int ast_sip_register_endpoint_formatter(struct ast_sip_endpoint_formatter *obj)
1927 SCOPED_LOCK(lock, &endpoint_formatters, AST_RWLIST_WRLOCK, AST_RWLIST_UNLOCK);
1928 AST_RWLIST_INSERT_TAIL(&endpoint_formatters, obj, next);
1929 ast_module_ref(ast_module_info->self);
1933 void ast_sip_unregister_endpoint_formatter(struct ast_sip_endpoint_formatter *obj)
1935 struct ast_sip_endpoint_formatter *i;
1936 SCOPED_LOCK(lock, &endpoint_formatters, AST_RWLIST_WRLOCK, AST_RWLIST_UNLOCK);
1937 AST_RWLIST_TRAVERSE_SAFE_BEGIN(&endpoint_formatters, i, next) {
1939 AST_RWLIST_REMOVE_CURRENT(next);
1940 ast_module_unref(ast_module_info->self);
1944 AST_RWLIST_TRAVERSE_SAFE_END;
1947 int ast_sip_format_endpoint_ami(struct ast_sip_endpoint *endpoint,
1948 struct ast_sip_ami *ami, int *count)
1951 struct ast_sip_endpoint_formatter *i;
1952 SCOPED_LOCK(lock, &endpoint_formatters, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK);
1954 AST_RWLIST_TRAVERSE(&endpoint_formatters, i, next) {
1955 if (i->format_ami && ((res = i->format_ami(endpoint, ami)) < 0)) {
1966 pjsip_endpoint *ast_sip_get_pjsip_endpoint(void)
1968 return ast_pjsip_endpoint;
1971 static int sip_dialog_create_from(pj_pool_t *pool, pj_str_t *from, const char *user, const char *domain, const pj_str_t *target, pjsip_tpselector *selector)
1973 pj_str_t tmp, local_addr;
1975 pjsip_sip_uri *sip_uri;
1976 pjsip_transport_type_e type = PJSIP_TRANSPORT_UNSPECIFIED;
1978 char uuid_str[AST_UUID_STR_LEN];
1980 if (ast_strlen_zero(user)) {
1981 RAII_VAR(struct ast_uuid *, uuid, ast_uuid_generate(), ast_free_ptr);
1985 user = ast_uuid_to_str(uuid, uuid_str, sizeof(uuid_str));
1988 /* Parse the provided target URI so we can determine what transport it will end up using */
1989 pj_strdup_with_null(pool, &tmp, target);
1991 if (!(uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0)) ||
1992 (!PJSIP_URI_SCHEME_IS_SIP(uri) && !PJSIP_URI_SCHEME_IS_SIPS(uri))) {
1996 sip_uri = pjsip_uri_get_uri(uri);
1998 /* Determine the transport type to use */
1999 if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri)) {
2000 type = PJSIP_TRANSPORT_TLS;
2001 } else if (!sip_uri->transport_param.slen) {
2002 type = PJSIP_TRANSPORT_UDP;
2004 type = pjsip_transport_get_type_from_name(&sip_uri->transport_param);
2007 if (type == PJSIP_TRANSPORT_UNSPECIFIED) {
2011 /* If the host is IPv6 turn the transport into an IPv6 version */
2012 if (pj_strchr(&sip_uri->host, ':') && type < PJSIP_TRANSPORT_START_OTHER) {
2013 type = (pjsip_transport_type_e)(((int)type) + PJSIP_TRANSPORT_IPV6);
2016 if (!ast_strlen_zero(domain)) {
2017 from->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
2018 from->slen = pj_ansi_snprintf(from->ptr, PJSIP_MAX_URL_SIZE,
2022 (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? ";transport=" : "",
2023 (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? pjsip_transport_get_type_name(type) : "");
2027 /* Get the local bound address for the transport that will be used when communicating with the provided URI */
2028 if (pjsip_tpmgr_find_local_addr(pjsip_endpt_get_tpmgr(ast_sip_get_pjsip_endpoint()), pool, type, selector,
2029 &local_addr, &local_port) != PJ_SUCCESS) {
2031 /* If no local address can be retrieved using the transport manager use the host one */
2032 pj_strdup(pool, &local_addr, pj_gethostname());
2033 local_port = pjsip_transport_get_default_port_for_type(PJSIP_TRANSPORT_UDP);
2036 /* If IPv6 was specified in the transport, set the proper type */
2037 if (pj_strchr(&local_addr, ':') && type < PJSIP_TRANSPORT_START_OTHER) {
2038 type = (pjsip_transport_type_e)(((int)type) + PJSIP_TRANSPORT_IPV6);
2041 from->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
2042 from->slen = pj_ansi_snprintf(from->ptr, PJSIP_MAX_URL_SIZE,
2043 "<sip:%s@%s%.*s%s:%d%s%s>",
2045 (type & PJSIP_TRANSPORT_IPV6) ? "[" : "",
2046 (int)local_addr.slen,
2048 (type & PJSIP_TRANSPORT_IPV6) ? "]" : "",
2050 (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? ";transport=" : "",
2051 (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? pjsip_transport_get_type_name(type) : "");
2056 static int sip_get_tpselector_from_endpoint(const struct ast_sip_endpoint *endpoint, pjsip_tpselector *selector)
2058 RAII_VAR(struct ast_sip_transport *, transport, NULL, ao2_cleanup);
2059 const char *transport_name = endpoint->transport;
2061 if (ast_strlen_zero(transport_name)) {
2065 transport = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "transport", transport_name);
2067 if (!transport || !transport->state) {
2068 ast_log(LOG_ERROR, "Unable to retrieve PJSIP transport '%s' for endpoint '%s'\n",
2069 transport_name, ast_sorcery_object_get_id(endpoint));
2073 if (transport->state->transport) {
2074 selector->type = PJSIP_TPSELECTOR_TRANSPORT;
2075 selector->u.transport = transport->state->transport;
2076 } else if (transport->state->factory) {
2077 selector->type = PJSIP_TPSELECTOR_LISTENER;
2078 selector->u.listener = transport->state->factory;
2079 } else if (transport->type == AST_TRANSPORT_WS || transport->type == AST_TRANSPORT_WSS) {
2080 /* The WebSocket transport has no factory as it can not create outgoing connections, so
2081 * even if an endpoint is locked to a WebSocket transport we let the PJSIP logic
2082 * find the existing connection if available and use it.
2092 pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint, const char *uri, const char *request_user)
2094 char enclosed_uri[PJSIP_MAX_URL_SIZE];
2095 pj_str_t local_uri = { "sip:temp@temp", 13 }, remote_uri, target_uri;
2096 pjsip_dialog *dlg = NULL;
2097 const char *outbound_proxy = endpoint->outbound_proxy;
2098 pjsip_tpselector selector = { .type = PJSIP_TPSELECTOR_NONE, };
2099 static const pj_str_t HCONTACT = { "Contact", 7 };
2101 snprintf(enclosed_uri, sizeof(enclosed_uri), "<%s>", uri);
2102 pj_cstr(&remote_uri, enclosed_uri);
2104 pj_cstr(&target_uri, uri);
2106 if (pjsip_dlg_create_uac(pjsip_ua_instance(), &local_uri, NULL, &remote_uri, &target_uri, &dlg) != PJ_SUCCESS) {
2110 if (sip_get_tpselector_from_endpoint(endpoint, &selector)) {
2111 pjsip_dlg_terminate(dlg);
2115 if (sip_dialog_create_from(dlg->pool, &local_uri, endpoint->fromuser, endpoint->fromdomain, &remote_uri, &selector)) {
2116 pjsip_dlg_terminate(dlg);
2120 /* Update the dialog with the new local URI, we do it afterwards so we can use the dialog pool for construction */
2121 pj_strdup_with_null(dlg->pool, &dlg->local.info_str, &local_uri);
2122 dlg->local.info->uri = pjsip_parse_uri(dlg->pool, dlg->local.info_str.ptr, dlg->local.info_str.slen, 0);
2123 dlg->local.contact = pjsip_parse_hdr(dlg->pool, &HCONTACT, local_uri.ptr, local_uri.slen, NULL);
2125 /* If a request user has been specified and we are permitted to change it, do so */
2126 if (!ast_strlen_zero(request_user)) {
2127 pjsip_sip_uri *sip_uri;
2129 if (PJSIP_URI_SCHEME_IS_SIP(dlg->target) || PJSIP_URI_SCHEME_IS_SIPS(dlg->target)) {
2130 sip_uri = pjsip_uri_get_uri(dlg->target);
2131 pj_strdup2(dlg->pool, &sip_uri->user, request_user);
2133 if (PJSIP_URI_SCHEME_IS_SIP(dlg->remote.info->uri) || PJSIP_URI_SCHEME_IS_SIPS(dlg->remote.info->uri)) {
2134 sip_uri = pjsip_uri_get_uri(dlg->remote.info->uri);
2135 pj_strdup2(dlg->pool, &sip_uri->user, request_user);
2139 /* We have to temporarily bump up the sess_count here so the dialog is not prematurely destroyed */
2142 pjsip_dlg_set_transport(dlg, &selector);
2144 if (!ast_strlen_zero(outbound_proxy)) {
2145 pjsip_route_hdr route_set, *route;
2146 static const pj_str_t ROUTE_HNAME = { "Route", 5 };
2149 pj_list_init(&route_set);
2151 pj_strdup2_with_null(dlg->pool, &tmp, outbound_proxy);
2152 if (!(route = pjsip_parse_hdr(dlg->pool, &ROUTE_HNAME, tmp.ptr, tmp.slen, NULL))) {
2154 pjsip_dlg_terminate(dlg);
2157 pj_list_insert_nodes_before(&route_set, route);
2159 pjsip_dlg_set_route_set(dlg, &route_set);
2167 pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata)
2171 pjsip_transport_type_e type = rdata->tp_info.transport->key.type;
2174 contact.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE);
2175 contact.slen = pj_ansi_snprintf(contact.ptr, PJSIP_MAX_URL_SIZE,
2176 "<sip:%s%.*s%s:%d%s%s>",
2177 (type & PJSIP_TRANSPORT_IPV6) ? "[" : "",
2178 (int)rdata->tp_info.transport->local_name.host.slen,
2179 rdata->tp_info.transport->local_name.host.ptr,
2180 (type & PJSIP_TRANSPORT_IPV6) ? "]" : "",
2181 rdata->tp_info.transport->local_name.port,
2182 (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? ";transport=" : "",
2183 (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? pjsip_transport_get_type_name(type) : "");
2185 status = pjsip_dlg_create_uas(pjsip_ua_instance(), rdata, &contact, &dlg);
2186 if (status != PJ_SUCCESS) {
2187 char err[PJ_ERR_MSG_SIZE];
2189 pj_strerror(status, err, sizeof(err));
2190 ast_log(LOG_ERROR, "Could not create dialog with endpoint %s. %s\n",
2191 ast_sorcery_object_get_id(endpoint), err);
2198 int ast_sip_create_rdata(pjsip_rx_data *rdata, char *packet, const char *src_name, int src_port,
2199 char *transport_type, const char *local_name, int local_port)
2203 rdata->tp_info.transport = PJ_POOL_ZALLOC_T(rdata->tp_info.pool, pjsip_transport);
2204 if (!rdata->tp_info.transport) {
2208 ast_copy_string(rdata->pkt_info.packet, packet, sizeof(rdata->pkt_info.packet));
2209 ast_copy_string(rdata->pkt_info.src_name, src_name, sizeof(rdata->pkt_info.src_name));
2210 rdata->pkt_info.src_port = src_port;
2212 pjsip_parse_rdata(packet, strlen(packet), rdata);
2213 if (!rdata->msg_info.msg) {
2217 pj_strdup2(rdata->tp_info.pool, &rdata->msg_info.via->recvd_param, rdata->pkt_info.src_name);
2218 rdata->msg_info.via->rport_param = -1;
2220 rdata->tp_info.transport->key.type = pjsip_transport_get_type_from_name(pj_cstr(&tmp, transport_type));
2221 rdata->tp_info.transport->type_name = transport_type;
2222 pj_strdup2(rdata->tp_info.pool, &rdata->tp_info.transport->local_name.host, local_name);
2223 rdata->tp_info.transport->local_name.port = local_port;
2228 /* PJSIP doesn't know about the INFO method, so we have to def