ITC-2300 VoIP Lab Sample pjsip.conf File: Difference between revisions
BenFranske (talk | contribs) No edit summary |
BenFranske (talk | contribs) No edit summary |
||
Line 52: | Line 52: | ||
type=endpoint | type=endpoint | ||
</pre> | </pre> | ||
You will also need to create a SIP line for the phone to use. | |||
For Example: | |||
<pre> | |||
[echo2904] | |||
type = aor | |||
max_contacts = 1 | |||
mailboxes = 2904@default | |||
[echo2904] | |||
type = auth | |||
auth_type = userpass | |||
password = 2904 | |||
username = 2904 | |||
[echo2904] | |||
type = endpoint | |||
aors=echo2904 | |||
auth=echo2904 | |||
callerid=Echo Early | |||
context = default | |||
direct_media = yes | |||
trust_id_inbound = yes | |||
trust_id_outbound=yes | |||
send_pai = yes | |||
transport=simpletrans | |||
callerid=Echo Early <2904> | |||
disallow = all | |||
allow = alaw | |||
</pre> | |||
=Reloading After Configuration Changes= | |||
If you make changes to the pjsip.conf file and need to get Asterisk to re-load the configuration you can run the '''pjsip reload''' command from the Asterisk CLI to re-read the file. | |||
=Additional Resources= | =Additional Resources= | ||
* [https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships PJSIP Config Sections and Relationships] | * [https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships PJSIP Config Sections and Relationships] | ||
* [https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip Core PJSIP Configuration Options] | * [https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip Core PJSIP Configuration Options] |
Revision as of 04:07, 6 November 2019
The following shows an example of the things you may need to change in your pjsip.conf file.
Example Minimal pjsip.conf File Changes
[simpletrans] type=transport protocol=udp bind=0.0.0.0 [2903] ; The value inside the [] will be the username on the device type=endpoint context=default disallow=all allow=ulaw transport=simpletrans auth=debra-auth ; This will be the name for the authentication section of the configuration found below aors=2903 ; This will be the name for the AoRs registration section of the configuration found below it must match the username in the [ ] above trust_id_outbound=yes callerid=Debra Donaldson <2903> ; This is the caller ID name and extension (in the < >) [2903] ; This is the AoRs registration entry. The value in the [ ] must match the endpoint aors line and username in the [ ] type=aor max_contacts=1 [debra-auth] ; This is the authentication entry. The value in the [ ] must match the endpoint auth line type=auth auth_type=userpass password=debrapass ; This is the authentication name used by the endpoint username=debra ; This is the authentication password used by the endpoint
Voicemail pjsip.conf File Changes
You can add the ability to enable the Message Waiting Indicator (MWI) lamp on SIP phones when there is a message in a mailbox. By default Asterisk will send SIP NOTIFY messages when a voicemail is left. Some phones need to subscribe to the MWI information. In that case you need to modify the AoRs section for the phone and add a mailboxes= section.
For Example:
[2903] type=aor max_contacts=1 mailboxes=2903@default
DPMA pjsip.conf File Changes
In order to use the DPMA with the chan_pjsip module a default_outbound_endpoint needs to be enabled in pjsip.conf. This is accomplised by configuring a basic endpoint to use and then setting that endpoint as the default.
For Example:
[global] type=global default_outbound_endpoint=dpma_endpoint [dpma_endpoint] type=endpoint
You will also need to create a SIP line for the phone to use.
For Example:
[echo2904] type = aor max_contacts = 1 mailboxes = 2904@default [echo2904] type = auth auth_type = userpass password = 2904 username = 2904 [echo2904] type = endpoint aors=echo2904 auth=echo2904 callerid=Echo Early context = default direct_media = yes trust_id_inbound = yes trust_id_outbound=yes send_pai = yes transport=simpletrans callerid=Echo Early <2904> disallow = all allow = alaw
Reloading After Configuration Changes
If you make changes to the pjsip.conf file and need to get Asterisk to re-load the configuration you can run the pjsip reload command from the Asterisk CLI to re-read the file.