SIP Resource using PJProject

This configuration documentation is for functionality provided by res_pjsip.

pjsip.conf

endpoint

Endpoint

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

100rel

Custom

yes

false

Allow support for RFC3262 provisional ACK tags

aggregate_mwi

Boolean

yes

false

 

allow

Codec

 

false

Media Codec(s) to allow

aors

String

 

false

AoR(s) to be used with the endpoint

auth

Custom

 

false

Authentication Object(s) associated with the endpoint

callerid

Custom

 

false

CallerID information for the endpoint

callerid_privacy

Custom

 

false

Default privacy level

callerid_tag

Custom

 

false

Internal id_tag for the endpoint

context

String

default

false

Dialplan context for inbound sessions

direct_media_glare_mitigation

Custom

none

false

Mitigation of direct media (re)INVITE glare

direct_media_method

Custom

invite

false

Direct Media method type

connected_line_method

Custom

invite

false

Connected line method type

direct_media

Boolean

yes

false

Determines whether media may flow directly between endpoints.

disable_direct_media_on_nat

Boolean

no

false

Disable direct media session refreshes when NAT obstructs the media session

disallow

Codec

 

false

Media Codec(s) to disallow

dtmfmode

Custom

rfc4733

false

DTMF mode

external_media_address

String

 

false

IP used for External Media handling

force_rport

Boolean

yes

false

Force use of return port

ice_support

Boolean

no

false

Enable the ICE mechanism to help traverse NAT

identify_by

Custom

username

false

Way(s) for Endpoint to be identified

mailboxes

String

 

false

Mailbox(es) to be associated with

mohsuggest

String

default

false

Default Music On Hold class

outbound_auth

Custom

 

false

Authentication object used for outbound requests

outbound_proxy

String

 

false

Proxy through which to send requests

rewrite_contact

Boolean

no

false

Allow Contact header to be rewritten with the source IP address-port

rtp_ipv6

Boolean

no

false

Allow use of IPv6 for RTP traffic

rtp_symmetric

Boolean

no

false

Enforce that RTP must be symmetric

send_diversion

Boolean

yes

false

Send the Diversion header, conveying the diversion information to the called user agent

send_pai

Boolean

no

false

Send the P-Asserted-Identity header

send_rpid

Boolean

no

false

Send the Remote-Party-ID header

timers_min_se

Unsigned Integer

90

false

Minimum session timers expiration period

timers

Custom

yes

false

Session timers for SIP packets

timers_sess_expires

Unsigned Integer

1800

false

Maximum session timer expiration period

transport

String

 

false

Desired transport configuration

trust_id_inbound

Boolean

no

false

Accept identification information received from this endpoint

trust_id_outbound

Boolean

no

false

Send private identification details to the endpoint.

type

None

 

false

Must be of type 'endpoint'.

use_ptime

Boolean

no

false

Use Endpoint's requested packetisation interval

use_avpf

Boolean

no

false

Determines whether res_pjsip will use and enforce usage of AVPF for this endpoint.

media_encryption

Custom

no

false

Determines whether res_pjsip will use and enforce usage of media encryption for this endpoint.

inband_progress

Boolean

no

false

Determines whether chan_pjsip will indicate ringing using inband progress.

callgroup

Custom

 

false

The numeric pickup groups for a channel.

pickupgroup

Custom

 

false

The numeric pickup groups that a channel can pickup.

namedcallgroup

Custom

 

false

The named pickup groups for a channel.

namedpickupgroup

Custom

 

false

The named pickup groups that a channel can pickup.

devicestate_busy_at

Unsigned Integer

0

false

The number of in-use channels which will cause busy to be returned as device state

t38udptl

Boolean

no

false

Whether T.38 UDPTL support is enabled or not

t38udptl_ec

Custom

none

false

T.38 UDPTL error correction method

t38udptl_maxdatagram

Unsigned Integer

0

false

T.38 UDPTL maximum datagram size

faxdetect

Boolean

no

false

Whether CNG tone detection is enabled

t38udptl_nat

Boolean

no

false

Whether NAT support is enabled on UDPTL sessions

t38udptl_ipv6

Boolean

no

false

Whether IPv6 is used for UDPTL Sessions

tonezone

String

 

false

Set which country's indications to use for channels created for this endpoint.

language

String

 

false

Set the default language to use for channels created for this endpoint.

one_touch_recording

Boolean

no

false

Determines whether one-touch recording is allowed for this endpoint.

recordonfeature

String

automixmon

false

The feature to enact when one-touch recording is turned on.

recordofffeature

String

automixmon

false

The feature to enact when one-touch recording is turned off.

rtpengine

String

asterisk

false

Name of the RTP engine to use for channels created for this endpoint

allowtransfer

Boolean

yes

false

Determines whether SIP REFER transfers are allowed for this endpoint

sdpowner

String

-

false

String placed as the username portion of an SDP origin (o=) line.

sdpsession

String

Asterisk

false

String used for the SDP session (s=) line.

tos_audio

Unsigned Integer

0

false

DSCP TOS bits for audio streams

tos_video

Unsigned Integer

0

false

DSCP TOS bits for video streams

cos_audio

Unsigned Integer

0

false

Priority for audio streams

cos_video

Unsigned Integer

0

false

Priority for video streams

allowsubscribe

Boolean

yes

false

Determines if endpoint is allowed to initiate subscriptions with Asterisk.

subminexpiry

Unsigned Integer

0

false

The minimum allowed expiry time for subscriptions initiated by the endpoint.

fromuser

String

 

false

Username to use in From header for requests to this endpoint.

mwifromuser

String

 

false

Username to use in From header for unsolicited MWI NOTIFYs to this endpoint.

fromdomain

String

 

false

Domain to user in From header for requests to this endpoint.

dtlsverify

Custom

 

false

Verify that the provided peer certificate is valid

dtlsrekey

Custom

 

false

Interval at which to renegotiate the TLS session and rekey the SRTP session

dtlscertfile

Custom

 

false

Path to certificate file to present to peer

dtlsprivatekey

Custom

 

false

Path to private key for certificate file

dtlscipher

Custom

 

false

Cipher to use for DTLS negotiation

dtlscafile

Custom

 

false

Path to certificate authority certificate

dtlscapath

Custom

 

false

Path to a directory containing certificate authority certificates

dtlssetup

Custom

 

false

Whether we are willing to accept connections, connect to the other party, or both.

srtp_tag_32

Boolean

no

false

Determines whether 32 byte tags should be used instead of 80 byte tags.

Configuration Option Descriptions

100rel
  • no
  • required
  • yes

aggregate_mwi

When enabled, aggregate_mwi condenses message waiting notifications from multiple mailboxes into a single NOTIFY. If it is disabled, individual NOTIFYs are sent for each mailbox.

aors

List of comma separated AoRs that the endpoint should be associated with.

auth

This is a comma-delimited list of auth sections defined in pjsip.conf to be used to verify inbound connection attempts.

Endpoints without an authentication object configured will allow connections without vertification.

callerid

Must be in the format Name <Number>, or only <Number>.

callerid_privacy
  • allowed_not_screened
  • allowed_passed_screened
  • allowed_failed_screened
  • allowed
  • prohib_not_screened
  • prohib_passed_screened
  • prohib_failed_screened
  • prohib
  • unavailable

direct_media_glare_mitigation

This setting attempts to avoid creating INVITE glare scenarios by disabling direct media reINVITEs in one direction thereby allowing designated servers (according to this option) to initiate direct media reINVITEs without contention and significantly reducing call setup time.

A more detailed description of how this option functions can be found on the Asterisk wiki https://wiki.asterisk.org/wiki/display/AST/SIP+Direct+Media+Reinvite+Glare+Avoidance

  • none
  • outgoing
  • incoming

direct_media_method

Method for setting up Direct Media between endpoints.

  • invite
  • reinvite - Alias for the invite value.
  • update

connected_line_method

Method used when updating connected line information.

  • invite
  • reinvite - Alias for the invite value.
  • update

dtmfmode

This setting allows to choose the DTMF mode for endpoint communication.

  • rfc4733 - DTMF is sent out of band of the main audio stream.This supercedes the older RFC-2833 used within the older chan_sip.
  • inband - DTMF is sent as part of audio stream.
  • info - DTMF is sent as SIP INFO packets.

identify_by

An endpoint can be identified in multiple ways. Currently, the only supported option is username, which matches the endpoint based on the username in the From header.

Note

Endpoints can also be identified by IP address; however, that method of identification is not handled by this configuration option. See the documentation for the identify configuration section for more details on that method of endpoint identification. If this option is set to username and an identify configuration section exists for the endpoint, then the endpoint can be identified in multiple ways.

  • username

rewrite_contact

On inbound SIP messages from this endpoint, the Contact header will be changed to have the source IP address and port. This option does not affect outbound messages send to this endpoint.

timers_min_se

Minimium session timer expiration period. Time in seconds.

timers
  • forced
  • no
  • required
  • yes

timers_sess_expires

Maximium session timer expiration period. Time in seconds.

transport

This will set the desired transport configuration to send SIP data through.

Warning

Not specifying a transport will DEFAULT to the first configured transport in pjsip.conf which is valid for 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

This option determines whether Asterisk will accept identification from the endpoint from headers such as P-Asserted-Identity or Remote-Party-ID header. This option applies both to calls originating from the endpoint and calls originating from Asterisk. If no, the configured Caller-ID from pjsip.conf will always be used as the identity for the endpoint.

trust_id_outbound

This option determines whether res_pjsip will send private identification information to the endpoint. If no, private Caller-ID information will not be forwarded to the endpoint. "Private" in this case refers to any method of restricting identification. Example: setting callerid_privacy to any prohib variation. Example: If trust_id_inbound is set to yes, the presence of a Privacy: id header in a SIP request or response would indicate the identification provided in the request is private.

use_avpf

If set to yes, res_pjsip will use use the AVPF or SAVPF RTP profile for all media offers on outbound calls and media updates and will decline media offers not using the AVPF or SAVPF profile.

If set to no, res_pjsip will use use the AVP or SAVP RTP profile for all media offers on outbound calls and media updates and will decline media offers not using the AVP or SAVP profile.

media_encryption
  • no - res_pjsip will offer no encryption and allow no encryption to be setup.
  • sdes - res_pjsip will offer standard SRTP setup via in-SDP keys. Encrypted SIP transport should be used in conjunction with this option to prevent exposure of media encryption keys.
  • dtls - res_pjsip will offer DTLS-SRTP setup.

inband_progress

If set to yes, chan_pjsip will send a 183 Session Progress when told to indicate ringing and will immediately start sending ringing as audio.

If set to no, chan_pjsip will send a 180 Ringing when told to indicate ringing and will NOT send it as audio.

callgroup

Can be set to a comma separated list of numbers or ranges between the values of 0-63 (maximum of 64 groups).

pickupgroup

Can be set to a comma separated list of numbers or ranges between the values of 0-63 (maximum of 64 groups).

namedcallgroup

Can be set to a comma separated list of case sensitive strings limited by supported line length.

namedpickupgroup

Can be set to a comma separated list of case sensitive strings limited by supported line length.

devicestate_busy_at

When the number of in-use channels for the endpoint matches the devicestate_busy_at setting the PJSIP channel driver will return busy as the device state instead of in use.

t38udptl

If set to yes T.38 UDPTL support will be enabled, and T.38 negotiation requests will be accepted and relayed.

t38udptl_ec
  • none - No error correction should be used.
  • fec - Forward error correction should be used.
  • redundancy - Redundacy error correction should be used.

t38udptl_maxdatagram

This option can be set to override the maximum datagram of a remote endpoint for broken endpoints.

faxdetect

This option can be set to send the session to the fax extension when a CNG tone is detected.

t38udptl_nat

When enabled the UDPTL stack will send UDPTL packets to the source address of received packets.

t38udptl_ipv6

When enabled the UDPTL stack will use IPv6.

recordonfeature

When an INFO request for one-touch recording arrives with a Record header set to "on", this feature will be enabled for the channel. The feature designated here can be any built-in or dynamic feature defined in features.conf.

Note

This setting has no effect if the endpoint's one_touch_recording option is disabled

recordofffeature

When an INFO request for one-touch recording arrives with a Record header set to "off", this feature will be enabled for the channel. The feature designated here can be any built-in or dynamic feature defined in features.conf.

Note

This setting has no effect if the endpoint's one_touch_recording option is disabled

tos_audio

See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings

tos_video

See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings

cos_audio

See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings

cos_video

See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings

dtlsverify

This option only applies if media_encryption is set to dtls.

dtlsrekey

This option only applies if media_encryption is set to dtls.

If this is not set or the value provided is 0 rekeying will be disabled.

dtlscertfile

This option only applies if media_encryption is set to dtls.

dtlsprivatekey

This option only applies if media_encryption is set to dtls.

dtlscipher

This option only applies if media_encryption is set to dtls.

Many options for acceptable ciphers. See link for more: http://www.openssl.org/docs/apps/ciphers.html#CIPHER\_STRINGS

dtlscafile

This option only applies if media_encryption is set to dtls.

dtlscapath

This option only applies if media_encryption is set to dtls.

dtlssetup

This option only applies if media_encryption is set to dtls.

  • active - res_pjsip will make a connection to the peer.
  • passive - res_pjsip will accept connections from the peer.
  • actpass - res_pjsip will offer and accept connections from the peer.

srtp_tag_32

This option only applies if media_encryption is set to sdes or dtls.

auth

Authentication type

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

auth_type

Custom

userpass

false

Authentication type

nonce_lifetime

Unsigned Integer

32

false

Lifetime of a nonce associated with this authentication config.

md5_cred

String

 

false

MD5 Hash used for authentication.

password

String

 

false

PlainText password used for authentication.

realm

String

asterisk

false

SIP realm for endpoint

type

None

 

false

Must be 'auth'

username

String

 

false

Username to use for account

Configuration Option Descriptions

auth_type

This option specifies which of the password style config options should be read when trying to authenticate an endpoint inbound request. If set to userpass then we'll read from the 'password' option. For md5 we'll read from 'md5_cred'.

  • md5
  • userpass

md5_cred

Only used when auth_type is md5.

password

Only used when auth_type is userpass.

domain_alias

Domain Alias

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

type

None

 

false

Must be of type 'domain_alias'.

domain

String

 

false

Domain to be aliased

transport

SIP Transport

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

async_operations

Unsigned Integer

1

false

Number of simultaneous Asynchronous Operations

bind

Custom

 

false

IP Address and optional port to bind to for this transport

ca_list_file

String

 

false

File containing a list of certificates to read (TLS ONLY)

cert_file

String

 

false

Certificate file for endpoint (TLS ONLY)

cipher

Custom

 

false

Preferred Cryptography Cipher (TLS ONLY)

domain

String

 

false

Domain the transport comes from

external_media_address

String

 

false

External Address to use in RTP handling

external_signaling_address

String

 

false

External address for SIP signalling

external_signaling_port

Unsigned Integer

0

false

External port for SIP signalling

method

Custom

 

false

Method of SSL transport (TLS ONLY)

localnet

Custom

 

false

Network to consider local (used for NAT purposes).

password

String

 

false

Password required for transport

privkey_file

String

 

false

Private key file (TLS ONLY)

protocol

Custom

udp

false

Protocol to use for SIP traffic

require_client_cert

Custom

 

false

Require client certificate (TLS ONLY)

type

None

 

false

Must be of type 'transport'.

verify_client

Custom

 

false

Require verification of client certificate (TLS ONLY)

verify_server

Custom

 

false

Require verification of server certificate (TLS ONLY)

tos

Unsigned Integer

0

false

Enable TOS for the signalling sent over this transport

cos

Unsigned Integer

0

false

Enable COS for the signalling sent over this transport

Configuration Option Descriptions

cipher

Many options for acceptable ciphers see link for more: http://www.openssl.org/docs/apps/ciphers.html#CIPHER\_STRINGS

method
  • default
  • unspecified
  • tlsv1
  • sslv2
  • sslv3
  • sslv23

localnet

This must be in CIDR or dotted decimal format with the IP and mask separated with a slash ('/').

protocol
  • udp
  • tcp
  • tls
  • ws
  • wss

tos

See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information on this parameter.

Note

This option does not apply to the ws or the wss protocols.

cos

See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information on this parameter.

Note

This option does not apply to the ws or the wss protocols.

contact

A way of creating an aliased name to a SIP URI

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

type

None

 

false

Must be of type 'contact'.

uri

String

 

false

SIP URI to contact peer

expiration_time

Custom

 

false

Time to keep alive a contact

qualify_frequency

Unsigned Integer

0

false

Interval at which to qualify a contact

Configuration Option Descriptions

expiration_time

Time to keep alive a contact. String style specification.

qualify_frequency

Interval between attempts to qualify the contact for reachability. If 0 never qualify. Time in seconds.

aor

The configuration for a location of an endpoint

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

contact

Custom

 

false

Permanent contacts assigned to AoR

default_expiration

Unsigned Integer

3600

false

Default expiration time in seconds for contacts that are dynamically bound to an AoR.

mailboxes

String

 

false

Mailbox(es) to be associated with

maximum_expiration

Unsigned Integer

7200

false

Maximum time to keep an AoR

max_contacts

Unsigned Integer

0

false

Maximum number of contacts that can bind to an AoR

minimum_expiration

Unsigned Integer

60

false

Minimum keep alive time for an AoR

remove_existing

Boolean

no

false

Determines whether new contacts replace existing ones.

type

None

 

false

Must be of type 'aor'.

qualify_frequency

Unsigned Integer

0

false

Interval at which to qualify an AoR

authenticate_qualify

Boolean

no

false

Authenticates a qualify request if needed

Configuration Option Descriptions

contact

Contacts specified will be called whenever referenced by chan_pjsip.

Use a separate "contact=" entry for each contact required. Contacts are specified using a SIP URI.

mailboxes

This option applies when an external entity subscribes to an AoR for message waiting indications. The mailboxes specified will be subscribed to. More than one mailbox can be specified with a comma-delimited string.

maximum_expiration

Maximium time to keep a peer with explicit expiration. Time in seconds.

max_contacts

Maximum number of contacts that can associate with this AoR. This value does not affect the number of contacts that can be added with the "contact" option. It only limits contacts added through external interaction, such as registration.

Note

This should be set to 1 and remove_existing set to yes if you wish to stick with the older chan_sip behaviour.

minimum_expiration

Minimum time to keep a peer with an explict expiration. Time in seconds.

remove_existing

On receiving a new registration to the AoR should it remove the existing contact that was registered against it?

Note

This should be set to yes and max_contacts set to 1 if you wish to stick with the older chan_sip behaviour.

qualify_frequency

Interval between attempts to qualify the AoR for reachability. If 0 never qualify. Time in seconds.

authenticate_qualify

If true and a qualify request receives a challenge or authenticate response authentication is attempted before declaring the contact available.

system

Options that apply to the SIP stack as well as other system-wide settings

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

timert1

Unsigned Integer

500

false

Set transaction timer T1 value (milliseconds).

timerb

Unsigned Integer

32000

false

Set transaction timer B value (milliseconds).

compactheaders

Boolean

no

false

Use the short forms of common SIP header names.

threadpool_initial_size

Unsigned Integer

0

false

Initial number of threads in the res_pjsip threadpool.

threadpool_auto_increment

Unsigned Integer

5

false

The amount by which the number of threads is incremented when necessary.

threadpool_idle_timeout

Unsigned Integer

60

false

Number of seconds before an idle thread should be disposed of.

threadpool_max_size

Unsigned Integer

0

false

Maximum number of threads in the res_pjsip threadpool. A value of 0 indicates no maximum.

type

None

 

false

Must be of type 'system'.

Configuration Option Descriptions

timert1

Timer T1 is the base for determining how long to wait before retransmitting requests that receive no response when using an unreliable transport (e.g. UDP). For more information on this timer, see RFC 3261, Section 17.1.1.1.

timerb

Timer B determines the maximum amount of time to wait after sending an INVITE request before terminating the transaction. It is recommended that this be set to 64 * Timer T1, but it may be set higher if desired. For more information on this timer, see RFC 3261, Section 17.1.1.1.

global

Options that apply globally to all SIP communications

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

maxforwards

Unsigned Integer

70

false

Value used in Max-Forwards header for SIP requests.

type

None

 

false

Must be of type 'global'.

useragent

String

Asterisk PBX SVN-branch-12-r397924

false

Value used in User-Agent header for SIP requests and Server header for SIP responses.

Import Version

This documentation was imported from Asterisk Version Unknown