pjsip.conf¶
pjsip.conf is a configuration file used by PJSIP, a SIP (Session Initiation Protocol) implementation for Voice over IP (VoIP) communication. It contains the settings and options for the PJSIP stack to configure and manage SIP endpoints, such as how to handle incoming and outgoing calls, how to authenticate and secure communication, and how to handle network and media handling. The [global] section in the pjsip.conf configuration file is used to specify default settings that apply to all PJSIP endpoints defined in the configuration file. It provides a way to specify settings that will be used as a baseline for all endpoints and can be overridden by individual endpoint settings. In PJSIP, type = global under the [global] section of the pjsip.conf file specifies that the configuration block following the line is a global configuration block. The options specified in this block will be applied globally to all PJSIP endpoints and transactions. The debug = yes option under the [global] section of the pjsip.conf file specifies that PJSIP should log debug messages to the Asterisk log file. This option is useful for debugging PJSIP issues. In the PJSIP configuration file, the [transport-udp] section specifies the configuration options for the UDP transport layer used for sending and receiving SIP messages in a PJSIP-based communication system. It determines the properties of the UDP transport such as the local address and port to bind to, and the type of the messages that will be sent over the UDP transport. In PJSIP, type = transport under the [transport-udp] section of the pjsip.conf file specifies that the configuration block following the line is a transport configuration block. The options specified in this block will be applied to the transport layer. The protocol = udp option under the [transport-udp] section of the pjsip.conf file specifies that the transport layer should use the UDP protocol for sending and receiving SIP messages. The bind = 0.0.0.0 option under the [transport-udp] section of the pjsip.conf file specifies that the transport layer should bind to all available network interfaces on the system. In PJSIP configuration file, [default-password](!) section is used to specify the default password for PJSIP endpoints created within the scope of the current configuration file, which can be overridden by individual endpoint authentication credentials. In PJSIP, type = auth under the [default-password] section of the pjsip.conf file specifies that the configuration block following the line is an authentication configuration block. The options specified in this block will be applied to the authentication layer. The auth_type = userpass option under the [default-password] section of the pjsip.conf file specifies that the authentication layer should use the userpass authentication type for authenticating PJSIP endpoints. The password = important-change-at-first-use option under the [default-password] section of the pjsip.conf file specifies the default password for PJSIP endpoints created within the scope of the current configuration file. This password can be overridden by individual endpoint authentication credentials. In the context of a pjsip.conf file, [default-from-external](!) is a section header that defines the default behavior for incoming SIP messages from external sources. It sets the default parameters for authentication, authorization, encryption, and other settings for incoming SIP messages from external sources. In PJSIP, type = endpoint under the [default-from-external] section of the pjsip.conf file specifies that the configuration block following the line is an endpoint configuration block. The options specified in this block will be applied to the endpoint layer. The context = from-external option under the [default-from-external] section of the pjsip.conf file specifies the context to use for incoming calls from external sources. The dtmf_mode = rfc4733 option under the [default-from-external] section of the pjsip.conf file specifies that the endpoint should use RFC 4733 for sending and receiving DTMF tones. The disallow = all option under the [default-from-external] section of the pjsip.conf file specifies that the endpoint should not allow any codecs for incoming calls from external sources. The allow = ulaw option under the [default-from-external] section of the pjsip.conf file specifies that the endpoint should allow the ulaw codec for incoming calls from external sources. The direct_media = no option under the [default-from-external] section of the pjsip.conf file specifies that the endpoint should not use direct media for incoming calls from external sources. In the context of a pjsip.conf file, [default-from-internal](!) is a section header that defines the default behavior for incoming SIP messages from internal sources. It sets the default parameters for authentication, authorization, encryption, and other settings for incoming SIP messages from internal sources. In PJSIP, type = endpoint under the [default-from-internal] section of the pjsip.conf file specifies that the configuration block following the line is an endpoint configuration block. The options specified in this block will be applied to the endpoint layer. The context = from-internal option under the [default-from-internal] section of the pjsip.conf file specifies the context to use for incoming calls from internal sources. The dtmf_mode = rfc4733 option under the [default-from-internal] section of the pjsip.conf file specifies that the endpoint should use RFC 4733 for sending and receiving DTMF tones. The disallow = all option under the [default-from-internal] section of the pjsip.conf file specifies that the endpoint should not allow any codecs for incoming calls from internal sources. The allow = ulaw option under the [default-from-internal] section of the pjsip.conf file specifies that the endpoint should allow the ulaw codec for incoming calls from internal sources. The direct_media = no option under the [default-from-internal] section of the pjsip.conf file specifies that the endpoint should not use direct media for incoming calls from internal sources. [default-aors](!) in pjsip.conf refers to a default set of “Address Of Record” (AOR) configurations. An AOR is a unique identifier for a SIP endpoint or user, and the default-aors section sets up the common options for all AORs defined in the system. In PJSIP, type = aor under the [default-aors] section of the pjsip.conf file specifies that the configuration block following the line is an AOR configuration block. The options specified in this block will be applied to the AOR layer. The max_contacts = 1 option under the [default-aors] section of the pjsip.conf file specifies the maximum number of contacts that can be registered to the AOR. [isdn-1/isdn-2/gsm](default-aors) in pjsip.conf refers to a set of “Address Of Record” (AOR) configurations for the ISDN 1/ISDN 2/GSM interfaces. An AOR is a unique identifier for a SIP endpoint or user, and the isdn-1/isdn-2/gsm sections sets up the common options for all AORs defined in the system. [isdn-1/isdn-2/gsm](default-password) in pjsip.conf refers to a set of “Address Of Record” (AOR) configurations for the ISDN 1/ISDN 2/GSM interfaces. An AOR is a unique identifier for a SIP endpoint or user, and the isdn-1/isdn-2/gsm sections sets up the common options for all AORs defined in the system. The username directive in a pjsip.conf file specifies the username for an endpoint in an Asterisk setup. The value isdn-1/isdn-2/gsm is a specific example of a username, indicating that this endpoint is related to the isdn-1/isdn-2/gsm interface. The line [isdn-1/isdn-2/gsm](default-from-external) in pjsip.conf are definitions of a named endpoint in the PJSIP configuration file. The endpoints name isdn-1/isdn-2/gsm/ are being defined within the default-from-external template, which means it will inherit all the properties defined in that template. The properties defined within this endpoint section can be used to configure specific settings for the endpoints isdn-1/isdn-2/gsm. The auth = isdn-1/isdn-2/gsm option under the [isdn-1/isdn-2/gsm](default-from-external) section of the pjsip.conf file specifies the authentication method to use for incoming calls from external sources. The aors = isdn-1/isdn-2/gsm option under the [isdn-1/isdn-2/gsm](default-from-external) section of the pjsip.conf file specifies the AOR to use for incoming calls from external sources. In PJSIP configuration, [201](default-aors) is a reference to a section named 201 within the configuration file that is using the template default-aors. This section contains the configuration options for a specific endpoint or device with a user id of 201, and its options are based on the values defined in the default-aors template. In PJSIP configuration, [201](default-password) is a reference to a section named 201 within the configuration file that is using the template default-password. This section contains the configuration options for a specific endpoint or device with a user id of 201, and its options are based on the values defined in the default-password template. In the PJSIP configuration file, username = 201 sets the username for an endpoint or authentication object to 201. This identifier is used to authenticate and identify the endpoint when making or receiving calls. In PJSIP configuration, [201](default-from-internal) is a reference to a section named 201 within the configuration file that is using the template default-from-internal. This section contains the configuration options for a specific endpoint or device with a user id of 201, and its options are based on the values defined in the default-from-internal template. auth = 201 in pjsip.conf means that the authentication for the corresponding configuration section will be set to use the username 201. The purpose of authentication is to verify the identity of a user or device attempting to access a network resource. In the context of pjsip.conf, the auth setting is used to identify the username that will be used for authentication purposes when connecting to a remote peer. aors = 201 in pjsip.conf means that the AOR for the corresponding configuration section will be set to use the username 201. An AOR is a unique identifier for a SIP endpoint or user, and the default-aors section sets up the common options for all AORs defined in the system.[global]¶
1[global]
2type = global
3debug = yes
type = global¶
debug = yes¶
[transport-udp]¶
5[transport-udp]
6type = transport
7protocol = udp
8bind = 0.0.0.0
type = transport¶
protocol = udp¶
bind = 0.0.0.0¶
[default-password](!)¶
10[default-password](!)
11type = auth
12auth_type = userpass
13password = important-change-password-at-first-use
type = auth¶
auth_type = userpass¶
password = important-change-password-at-first-use¶
[default-from-external](!)¶
15[default-from-external](!)
16type = endpoint
17context = from-external
18dtmf_mode = rfc4733
19disallow = all
20allow = ulaw
21direct_media = no
type = endpoint¶
context = from-external¶
dtmf_mode = rfc4733¶
disallow = all¶
allow = ulaw¶
direct_media = no¶
[default-from-internal](!)¶
23[default-from-internal](!)
24type = endpoint
25context = from-internal
26dtmf_mode = rfc4733
27disallow = all
28allow = ulaw
29direct_media = no
type = endpoint¶
context = from-internal¶
dtmf_mode = rfc4733¶
disallow = all¶
allow = ulaw¶
direct_media = no¶
[default-aors](!)¶
31[default-aors](!)
32type = aor
33max_contacts = 1
type = aor¶
max_contacts = 1¶
35[isdn-1](default-aors)
36
37[isdn-1](default-password)
38username = isdn-1
39
40[isdn-1](default-from-external)
41auth = isdn-1
42aors = isdn-1
43
44[isdn-2](default-aors)
45
46[isdn-2](default-password)
47username = isdn-2
48
49[isdn-2](default-from-external)
50auth = isdn-2
51aors = isdn-2
52
53[gsm](default-aors)
54
55[gsm](default-password)
56username = gsm
57
58[gsm](default-from-external)
59auth = gsm
60aors = gsm
[isdn-1/isdn-2/gsm](default-aors)¶
[isdn-1/isdn-2/gsm](default-password)¶
username = isdn-1/isdn-2/gsm¶
[isdn-1/isdn-2/gsm](default-from-external)¶
auth = isdn-1/isdn-2/gsm¶
aors = isdn-1/isdn-2/gsm¶
[201](default-aors)¶
[201](default-password)¶
username = 201¶
[201](default-from-internal)¶
auth = 201¶
aors = 201¶