pjsip.conf
[endpoint]
Endpoint
100rel- Allow support for RFC3262 provisional ACK tagsaggregate_mwi- Condense MWI notifications into a single NOTIFY.allow- Media Codec(s) to allowcodec_prefs_incoming_offer- Codec negotiation prefs for incoming offers.codec_prefs_outgoing_offer- Codec negotiation prefs for outgoing offers.codec_prefs_incoming_answer- Codec negotiation prefs for incoming answers.codec_prefs_outgoing_answer- Codec negotiation prefs for outgoing answers.allow_overlap- Enable RFC3578 overlap dialing support.overlap_context- Dialplan context to use for RFC3578 overlap dialing.aors- AoR(s) to be used with the endpoint-
auth- Authentication Object(s) associated with the endpointNote
Using the same auth section for inbound and outbound authentication is not recommended. There is a difference in meaning for an empty realm setting between inbound and outbound authentication uses. See the auth realm description for details.
-
callerid- CallerID information for the endpoint callerid_privacy- Default privacy levelcallerid_tag- Internal id_tag for the endpointcontext- Dialplan context for inbound sessionsdirect_media_glare_mitigation- Mitigation of direct media (re)INVITE glaredirect_media_method- Direct Media method typetrust_connected_line- Accept Connected Line updates from this endpointsend_connected_line- Send Connected Line updates to this endpointconnected_line_method- Connected line method typedirect_media- Determines whether media may flow directly between endpoints.disable_direct_media_on_nat- Disable direct media session refreshes when NAT obstructs the media sessiondisallow- Media Codec(s) to disallowdtmf_mode- DTMF mode-
media_address- IP address used in SDP for media handlingNote
Be aware that the
external_media_addressoption, set in Transport configuration, can also affect the final media address used in the SDP. -
bind_rtp_to_media_address- Bind the RTP instance to the media_address force_rport- Force use of return portice_support- Enable the ICE mechanism to help traverse NAT-
identify_by- Way(s) for the endpoint to be identifiedNote
This option controls both how an endpoint is matched for incoming traffic and also how an AOR is determined if a registration occurs. You must list at least one method that also matches for AORs or the registration will fail.
-
redirect_method- How redirects received from an endpoint are handled follow_redirect_methods- Follow 3XX redirect responses for the defined SIP methods.mailboxes- NOTIFY the endpoint when state changes for any of the specified mailboxesmwi_subscribe_replaces_unsolicited- An MWI subscribe will replace sending unsolicited NOTIFYsvoicemail_extension- The voicemail extension to send in the NOTIFY Message-Account headermoh_suggest- Default Music On Hold class-
outbound_auth- Authentication object(s) used for outbound requestsNote
Using the same auth section for inbound and outbound authentication is not recommended. There is a difference in meaning for an empty realm setting between inbound and outbound authentication uses. See the auth realm description for details.
-
outbound_proxy- Full SIP URI of the outbound proxy used to send requests rewrite_contact- Allow Contact header to be rewritten with the source IP address-portrtp_ipv6- Allow use of IPv6 for RTP trafficrtp_symmetric- Enforce that RTP must be symmetricsend_diversion- Send the Diversion header, conveying the diversion information to the called user agentsend_history_info- Send the History-Info header, conveying the diversion information to the called and calling user agentssend_pai- Send the P-Asserted-Identity headersend_rpid- Send the Remote-Party-ID headerrpid_immediate- Immediately send connected line updates on unanswered incoming calls.tenantid- The tenant ID for this endpoint.timers_min_se- Minimum session timers expiration periodtimers- Session timers for SIP packetstimers_sess_expires- Maximum session timer expiration period-
transport- Explicit transport configuration to useNote
Not specifying a transport will select the first configured transport in
pjsip.confwhich is compatible with the URI we are trying to contact.Warning
Transport configuration is not affected by reloads. In order to change transports, a full Asterisk restart is required
-
trust_id_inbound- Accept identification information received from this endpoint trust_id_outbound- Send private identification details to the endpoint.type- Must be of type 'endpoint'.use_ptime- Use Endpoint's requested packetization intervaluse_avpf- Determines whether res_pjsip will use and enforce usage of AVPF for this endpoint.force_avp- Determines whether res_pjsip will use and enforce usage of AVP, regardless of the RTP profile in use for this endpoint.media_use_received_transport- Determines whether res_pjsip will use the media transport received in the offer SDP in the corresponding answer SDP.media_encryption- Determines whether res_pjsip will use and enforce usage of media encryption for this endpoint.media_encryption_optimistic- Determines whether encryption should be used if possible but does not terminate the session if not achieved.g726_non_standard- Force g.726 to use AAL2 packing order when negotiating g.726 audioinband_progress- Determines whether chan_pjsip will indicate ringing using inband progress.call_group- The numeric pickup groups for a channel.pickup_group- The numeric pickup groups that a channel can pickup.named_call_group- The named pickup groups for a channel.named_pickup_group- The named pickup groups that a channel can pickup.device_state_busy_at- The number of in-use channels which will cause busy to be returned as device statet38_udptl- Whether T.38 UDPTL support is enabled or nott38_udptl_ec- T.38 UDPTL error correction methodt38_udptl_maxdatagram- T.38 UDPTL maximum datagram sizefax_detect- Whether CNG tone detection is enabledfax_detect_timeout- How long into a call before fax_detect is disabled for the callt38_udptl_nat- Whether NAT support is enabled on UDPTL sessionst38_udptl_ipv6- Whether IPv6 is used for UDPTL Sessionst38_bind_udptl_to_media_address- Bind the UDPTL instance to the media_adresstone_zone- Set which country's indications to use for channels created for this endpoint.language- Set the default language to use for channels created for this endpoint.one_touch_recording- Determines whether one-touch recording is allowed for this endpoint.-
record_on_feature- The feature to enact when one-touch recording is turned on.Note
This setting has no effect if the endpoint's one_touch_recording option is disabled
-
record_off_feature- The feature to enact when one-touch recording is turned off.Note
This setting has no effect if the endpoint's one_touch_recording option is disabled
-
rtp_engine- Name of the RTP engine to use for channels created for this endpoint allow_transfer- Determines whether SIP REFER transfers are allowed for this endpointuser_eq_phone- Determines whether a user=phone parameter is placed into the request URI if the user is determined to be a phone numbermoh_passthrough- Determines whether hold and unhold will be passed through using re-INVITEs with recvonly and sendrecv to the remote sidesdp_owner- String placed as the username portion of an SDP origin (o=) line.sdp_session- String used for the SDP session (s=) line.tos_audio- DSCP TOS bits for audio streamstos_video- DSCP TOS bits for video streamscos_audio- Priority for audio streamscos_video- Priority for video streamsallow_subscribe- Determines if endpoint is allowed to initiate subscriptions with Asterisk.sub_min_expiry- The minimum allowed expiry time for subscriptions initiated by the endpoint.from_user- Username to use in From header for requests to this endpoint.mwi_from_user- Username to use in From header for unsolicited MWI NOTIFYs to this endpoint.from_domain- Domain to use in From header for requests to this endpoint.dtls_verify- Verify that the provided peer certificate is validdtls_rekey- Interval at which to renegotiate the TLS session and rekey the SRTP sessiondtls_auto_generate_cert- Whether or not to automatically generate an ephemeral X.509 certificatedtls_cert_file- Path to certificate file to present to peerdtls_private_key- Path to private key for certificate filedtls_cipher- Cipher to use for DTLS negotiationdtls_ca_file- Path to certificate authority certificatedtls_ca_path- Path to a directory containing certificate authority certificatesdtls_setup- Whether we are willing to accept connections, connect to the other party, or both.dtls_fingerprint- Type of hash to use for the DTLS fingerprint in the SDP.srtp_tag_32- Determines whether 32 byte tags should be used instead of 80 byte tags.set_var- Variable set on a channel involving the endpoint.message_context- Context to route incoming MESSAGE requests to.accountcode- An accountcode to set automatically on any channels created for this endpoint.-
preferred_codec_only- Respond to a SIP invite with the single most preferred codec (DEPRECATED)Warning
This option has been deprecated in favor of
incoming_call_offer_pref. Setting both options is unsupported. -
incoming_call_offer_pref- Preferences for selecting codecs for an incoming call.Note
This list will consist of only those codecs found in both lists.
-
outgoing_call_offer_pref- Preferences for selecting codecs for an outgoing call. rtp_keepalive- Number of seconds between RTP comfort noise keepalive packets.rtp_timeout- Maximum number of seconds without receiving RTP (while off hold) before terminating call.rtp_timeout_hold- Maximum number of seconds without receiving RTP (while on hold) before terminating call.acl- List of IP ACL section names in acl.confdeny- List of IP addresses to deny access frompermit- List of IP addresses to permit access fromcontact_acl- List of Contact ACL section names in acl.confcontact_deny- List of Contact header addresses to denycontact_permit- List of Contact header addresses to permitsubscribe_context- Context for incoming MESSAGE requests.contact_user- Force the user on the outgoing Contact header to this value.asymmetric_rtp_codec- Allow the sending and receiving RTP codec to differrtcp_mux- Enable RFC 5761 RTCP multiplexing on the RTP portrefer_blind_progress- Whether to notifies all the progress details on blind transfernotify_early_inuse_ringing- Whether to notifies dialog-info 'early' on InUse&Ringing statemax_audio_streams- The maximum number of allowed audio streams for the endpointmax_video_streams- The maximum number of allowed video streams for the endpointbundle- Enable RTP bundlingwebrtc- Defaults and enables some options that are relevant to WebRTCincoming_mwi_mailbox- Mailbox name to use when incoming MWI NOTIFYs are received-
follow_early_media_fork- Follow SDP forked media when To tag is differentNote
This option must also be enabled in the
systemsection for it to take effect here. -
accept_multiple_sdp_answers- Accept multiple SDP answers on non-100rel responsesNote
This option must also be enabled in the
systemsection for it to take effect here. -
suppress_q850_reason_headers- Suppress Q.850 Reason headers for this endpoint ignore_183_without_sdp- Do not forward 183 when it doesn't contain SDPstir_shaken- Enable STIR/SHAKEN support on this endpointstir_shaken_profile- STIR/SHAKEN profile containing additional configuration optionsallow_unauthenticated_options- Skip authentication when receiving OPTIONS requestssecurity_negotiation- The kind of security agreement negotiation to use. Currently, only mediasec is supported.security_mechanisms- List of security mechanisms supported.geoloc_incoming_call_profile- Geolocation profile to apply to incoming callsgeoloc_outgoing_call_profile- Geolocation profile to apply to outgoing callssend_aoc- Send Advice-of-Charge messages-
suppress_moh_on_sendonly- Suppress playing MOH to party A if party B sends "sendonly" or "inactive" in an SDPNote
This doesn't just apply to 183 responses. MOH will be suppressed when the attribute appears in any SDP received including INVITEs, re-INVITES, and other responses.
[auth]
Authentication type
auth_type- Authentication typeusername- Username to use for accountpassword- Plain text password used for authentication.password_digest- One or more pre-computed hashes used for authentication.md5_cred- MD5 Hash used for authentication. (deprecated)supported_algorithms_uac- Comma separated list of algorithms to support when this auth is used as a UACsupported_algorithms_uas- Comma separated list of algorithms to support when this auth is used as a UASrefresh_token- OAuth 2.0 refresh tokenoauth_clientid- OAuth 2.0 application's client idoauth_secret- OAuth 2.0 application's secret-
realm- SIP realm for endpointNote
Using the same auth section for inbound and outbound authentication is not recommended. There is a difference in meaning for an empty realm setting between inbound and outbound authentication uses.
Note
If more than one auth object with the same realm or more than one wildcard auth object is associated to an endpoint, only the first one of each defined on the endpoint will be used.
-
nonce_lifetime- Lifetime of a nonce associated with this authentication config. type- Must be 'auth'
[domain_alias]
Domain Alias
type- Must be of type 'domain_alias'.domain- Domain to be aliased
[transport]
SIP Transport
async_operations- Number of simultaneous Asynchronous Operations, can no longer be set, always set to 1bind- IP Address and optional port to bind to for this transportca_list_file- File containing a list of certificates to read (TLS ONLY, not WSS)ca_list_path- Path to directory containing a list of certificates to read (TLS ONLY, not WSS)cert_file- Certificate file for endpoint (TLS ONLY, not WSS)cipher- Preferred cryptography cipher names (TLS ONLY, not WSS)domain- Domain the transport comes fromexternal_media_address- External IP address to use in RTP handlingexternal_signaling_address- External address for SIP signallingexternal_signaling_port- External port for SIP signallingmethod- Method of SSL transport (TLS ONLY, not WSS)local_net- Network to consider local (used for NAT purposes).password- Password required for transportpriv_key_file- Private key file (TLS ONLY, not WSS)protocol- Protocol to use for SIP trafficrequire_client_cert- Require client certificate (TLS ONLY, not WSS)tcp_keepalive_enable- Enable TCP keepalivetcp_keepalive_idle_time- Idle time before the first TCP keepalive probe is senttcp_keepalive_interval_time- Interval between TCP keepalive probestcp_keepalive_probe_count- Maximum number of TCP keepalive probestype- Must be of type 'transport'.verify_client- Require verification of client certificate (TLS ONLY, not WSS)verify_server- Require verification of server certificate (TLS ONLY, not WSS)-
tos- Enable TOS for the signalling sent over this transportNote
This option does not apply to the ws or the wss protocols.
-
cos- Enable COS for the signalling sent over this transportNote
This option does not apply to the ws or the wss protocols.
-
websocket_write_timeout- The timeout (in milliseconds) to set on WebSocket connections. allow_reload- Allow this transport to be reloaded.allow_wildcard_certs- Allow use of wildcards in certificates (TLS ONLY)symmetric_transport- Use the same transport for outgoing requests as incoming ones.
[contact]
A way of creating an aliased name to a SIP URI
type- Must be of type 'contact'.uri- SIP URI to contact peerexpiration_time- Time to keep alive a contactqualify_frequency- Interval at which to qualify a contactqualify_timeout- Timeout for qualifyqualify_2xx_only- Only qualify contact if OPTIONS request returns 2XX-
authenticate_qualify- Authenticates a qualify challenge response if neededNote
This option does nothing as we will always complete the challenge response authentication if the qualify request is challenged.
-
outbound_proxy- Outbound proxy used when sending OPTIONS request path- Stored Path vector for use in Route headers on outgoing requests.user_agent- User-Agent header from registration.endpoint- Endpoint namereg_server- Asterisk Server namevia_addr- IP-address of the last Via header from registration.via_port- IP-port of the last Via header from registration.call_id- Call-ID header from registration.prune_on_boot- A contact that cannot survive a restart/boot.
[aor]
The configuration for a location of an endpoint
contact- Permanent contacts assigned to AoRdefault_expiration- Default expiration time in seconds for contacts that are dynamically bound to an AoR.mailboxes- Allow subscriptions for the specified mailbox(es)voicemail_extension- The voicemail extension to send in the NOTIFY Message-Account headermaximum_expiration- Maximum time to keep an AoR-
max_contacts- Maximum number of contacts that can bind to an AoRNote
The rewrite_contact option registers the source address as the contact address to help with NAT and reusing connection oriented transports such as TCP and TLS. Unfortunately, refreshing a registration may register a different contact address and exceed max_contacts. The remove_existing and remove_unavailable options can help by removing either the soonest to expire or unavailable contact(s) over max_contacts which is likely the old rewrite_contact contact source address being refreshed.
Note
This should be set to
1and remove_existing set toyesif you wish to stick with the olderchan_sipbehaviour. -
minimum_expiration- Minimum keep alive time for an AoR -
remove_existing- Determines whether new contacts replace existing ones.Note
The rewrite_contact option registers the source address as the contact address to help with NAT and reusing connection oriented transports such as TCP and TLS. Unfortunately, refreshing a registration may register a different contact address and exceed max_contacts. The remove_existing option can help by removing the soonest to expire contact(s) over max_contacts which is likely the old rewrite_contact contact source address being refreshed.
Note
This should be set to
yesand max_contacts set to1if you wish to stick with the olderchan_sipbehaviour. -
remove_unavailable- Determines whether new contacts should replace unavailable ones.Note
See remove_existing and max_contacts for further information about how these 3 settings interact.
-
type- Must be of type 'aor'. qualify_frequency- Interval at which to qualify an AoRqualify_timeout- Timeout for qualifyqualify_2xx_only- Only qualify contact if OPTIONS request returns 2XX-
authenticate_qualify- Authenticates a qualify challenge response if neededNote
This option does nothing as we will always complete the challenge response authentication if the qualify request is challenged.
-
outbound_proxy- Outbound proxy used when sending OPTIONS request support_path- Enables Path support for REGISTER requests and Route support for other requests.
[system]
Options that apply to the SIP stack as well as other system-wide settings
timer_t1- Set transaction timer T1 value (milliseconds).timer_b- Set transaction timer B value (milliseconds).compact_headers- Use the short forms of common SIP header names.taskpool_minimum_size- Minimum number of taskprocessors in the res_pjsip taskpool.taskpool_initial_size- Initial number of taskprocessors in the res_pjsip taskpool.taskpool_auto_increment- The amount by which the number of taskprocessors is incremented when necessary.taskpool_idle_timeout- Number of seconds before an idle taskprocessor should be disposed of.taskpool_max_size- Maximum number of taskprocessors in the res_pjsip taskpool. A value of 0 indicates no maximum.threadpool_initial_size- Initial number of threads in the res_pjsip taskpool. Deprecated in favor of taskpool_initial_size.threadpool_auto_increment- The amount by which the number of threads is incremented when necessary. Deprecated in favor of taskpool_auto_increment.threadpool_idle_timeout- Number of seconds before an idle taskprocessor should be disposed of. Deprecated in favor of taskpool_idle_timeout.threadpool_max_size- Maximum number of taskprocessors in the res_pjsip taskpool. A value of 0 indicates no maximum. Deprecated in favor of taskpool_max_size.disable_tcp_switch- Disable automatic switching from UDP to TCP transports.-
follow_early_media_fork- Follow SDP forked media when To tag is differentNote
This option must also be enabled on endpoints that require this functionality.
-
accept_multiple_sdp_answers- Follow SDP forked media when To tag is the sameNote
This option must also be enabled on endpoints that require this functionality.
-
disable_rport- Disable the use of rport in outgoing requests. type- Must be of type 'system' UNLESS the object name is 'system'.
[global]
Options that apply globally to all SIP communications
max_forwards- Value used in Max-Forwards header for SIP requests.keep_alive_interval- The interval (in seconds) to send keepalives to active connection-oriented transports.contact_expiration_check_interval- The interval (in seconds) to check for expired contacts.disable_multi_domain- Disable Multi Domain supportmax_initial_qualify_time- The maximum amount of time from startup that qualifies should be attempted on all contacts. If greater than the qualify_frequency for an aor, qualify_frequency will be used instead.unidentified_request_period- The number of seconds over which to accumulate unidentified requests.unidentified_request_count- The number of unidentified requests from a single IP to allow.unidentified_request_prune_interval- The interval at which unidentified requests are older than twice the unidentified_request_period are pruned.type- Must be of type 'global' UNLESS the object name is 'global'.user_agent- Value used in User-Agent header for SIP requests and Server header for SIP responses.regcontext- When set, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given peer who registers or unregisters with us.default_outbound_endpoint- Endpoint to use when sending an outbound request to a URI without a specified endpoint.default_voicemail_extension- The voicemail extension to send in the NOTIFY Message-Account header if not specified on endpoint or aordebug- Enable/Disable SIP debug logging. Valid options include yes, no, or a host address-
endpoint_identifier_order- The order by which endpoint identifiers are processed and checked. Identifier names are usually derived from and can be found in the endpoint identifier module itself (res_pjsip_endpoint_identifier_*). You can use the CLI command "pjsip show identifiers" to see the identifiers currently available.Note
One of the identifiers is "auth_username" which matches on the username in an Authentication header. This method has some security considerations because an Authentication header is not present on the first message of a dialog when digest authentication is used. The client can't generate it until the server sends the challenge in a 401 response. Since Asterisk normally sends a security event when an incoming request can't be matched to an endpoint, using auth_username requires that the security event be deferred until a request is received with the Authentication header and only generated if the username doesn't result in a match. This may result in a delay before an attack is recognized. You can control how many unmatched requests are received from a single ip address before a security event is generated using the unidentified_request parameters.
-
default_from_user- When Asterisk generates an outgoing SIP request, the From header username will be set to this value if there is no better option (such as CallerID) to be used. default_realm- When Asterisk generates a challenge, the digest realm will be set to this value if there is no better option (such as auth/realm) to be used.mwi_tps_queue_high- MWI taskprocessor high water alert trigger level.-
mwi_tps_queue_low- MWI taskprocessor low water clear alert level.Note
Set to -1 for the low water level to be 90% of the high water level.
-
mwi_disable_initial_unsolicited- Enable/Disable sending unsolicited MWI to all endpoints on startup. -
ignore_uri_user_options- Enable/Disable ignoring SIP URI user field options.Note
The caller-id and redirecting number strings obtained from incoming SIP URI user fields are always truncated at the first semicolon.
-
use_callerid_contact- Place caller-id information into Contact header send_contact_status_on_update_registration- Enable sending AMI ContactStatus event when a device refreshes its registration.-
taskprocessor_overload_trigger- Trigger scope for taskprocessor overloadsWarning
The "none" and "pjsip_only" options should be used with extreme caution and only to mitigate specific issues. Under certain conditions they could make things worse.
-
norefersub- Advertise support for RFC4488 REFER subscription suppression allow_sending_180_after_183- Allow 180 after 183all_codecs_on_empty_reinvite- If we should return all codecs on re-INVITE without SDPdefault_auth_algorithms_uas- List of default authentication algorithms to support when Asterisk is UASdefault_auth_algorithms_uac- List of default authentication algorithms to support when Asterisk is UAC
User Notes
No notes yet. Be the first to contribute a tip or example.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.