Skip to content

Commit b71ce8d

Browse files
committed
Formatting cleanups
* Fixed broken links in the WhatsNew files. * Fixed missing links and fixed many formatting issues in AMI-v2-Specification. More work probably needs to be done. * Fixed missing ER Diagram and many formatting issues in PJSIP-Configuration-Sections-and-Relationships. * Added ability to use the new "definition" blocks from pymdownx. Resolves: #40 Resolves: #49 Resolves: #51
1 parent 4c326a7 commit b71ce8d

File tree

11 files changed

+350
-312
lines changed

11 files changed

+350
-312
lines changed

docs/About-the-Project/A-Brief-History-of-the-Asterisk-Project.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ Asterisk is constantly evolving to meet the needs of the project's user-base. It
3131

3232
* [Asterisk Versions](/About-the-Project/Asterisk-Versions): Shows release time lines, support and EOL schedules.
3333
* [Roadmap](/Development/Roadmap): Information from developer conferences and planning sessions.
34-
* [CHANGES](https://github.com/asterisk/asterisk/blob/master/CHANGES): A document in Asterisk trunk, shows functionality changes between major versions.
35-
* [UPGRADE](https://github.com/asterisk/asterisk/blob/master/UPGRADE.txt): A document in Asterisk trunk, shows breaking changes, deprecation of specific features and important info on upgrading.
34+
* [ChangeLogs](/latest_api/Whats_New): The Change Logs for the latest version of Asterisk.
3635
* [Mailing Lists](https://www.asterisk.org/community/discuss): The dev list is a great list to see what hot topics the developers are discussing in real-time.
3736
* [Forums](https://community.asterisk.org): The community forums are a great place to receive help with issues.
3837

docs/Asterisk_18_Documentation/WhatsNew.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ title: New in 18
44

55
# What's New in Asterisk 18
66

7-
For a complete list of changes and new things in Asterisk 18 please see the [CHANGES document](https://raw.githubusercontent.com/asterisk/asterisk/18/CHANGES) included with Asterisk 18.
7+
For a complete list of changes and new things in Asterisk 18 please see the [ChangeLogs](https://github.com/asterisk/asterisk/tree/releases/18/ChangeLogs) included with Asterisk 18.
88

docs/Asterisk_20_Documentation/WhatsNew.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ title: New in 20
44

55
# What's New in Asterisk 20
66

7-
For a complete list of changes and new things in Asterisk 20 please see the [CHANGES document](https://raw.githubusercontent.com/asterisk/asterisk/20/CHANGES) included with Asterisk 20.
7+
For a complete list of changes and new things in Asterisk 20 please see the [ChangeLogs](https://github.com/asterisk/asterisk/tree/releases/20/ChangeLogs) included with Asterisk 20.
88

docs/Asterisk_21_Documentation/WhatsNew.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Asterisk 21 saw fewer new additions than previous versions. Many of the changes
3434
9. res_monitor: This module was deprecated in Asterisk 16 and is now being removed in accordance with the Asterisk Module Deprecation policy. This also removes the 'w' and 'W' options for app_queue. MixMonitor should be default and only option for all settings that previously used either Monitor or MixMonitor.
3535

3636

37-
For a complete list of changes and new things in Asterisk 21 please see the [CHANGES document](https://raw.githubusercontent.com/asterisk/asterisk/21/CHANGES) included with Asterisk 21.
37+
For a complete list of changes and new things in Asterisk 21 please see the [ChangeLogs](https://github.com/asterisk/asterisk/tree/releases/21/ChangeLogs) included with Asterisk 21.

docs/Certified-Asterisk_18.9_Documentation/WhatsNew.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ title: New in Certified 18.9
44

55
# What's New in Certified Asterisk 18.9
66

7-
For a complete list of changes and new things in Certified Asterisk 18.9 please see the [CHANGES document](https://raw.githubusercontent.com/asterisk/asterisk/certified/18.9/CHANGES) included with Certified Asterisk 18.9.
7+
For a complete list of changes and new things in Certified Asterisk 18.9 please see the [ChangeLogs](https://github.com/asterisk/asterisk/tree/releases/certified-18.9/ChangeLogs) included with Certified Asterisk 18.9.
Binary file not shown.

docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Sections-and-Relationships.md

Lines changed: 63 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
---
2-
title: PJSIP Configuration Sections and Relationships
3-
pageid: 30278064
4-
---
1+
# PJSIP Configuration Sections and Relationships
52

6-
Configuration Section Format
7-
----------------------------
3+
## Configuration Section Format
84

95
pjsip.conf is a flat text file composed of **sections** like most configuration files used with Asterisk. Each **section** defines configuration for a **configuration object** within res_pjsip or an associated module.
106

@@ -14,17 +10,19 @@ Each section has one or more **configuration options** that can be assigned a va
1410

1511
Every section will have a **type** option that defines what kind of section is being configured. You'll see that in every example config section below.
1612

17-
Syntax for res_sip config objects **[** SectionName **]**
18-
ConfigOption **=** Value
19-
ConfigOption **=** Value
13+
Syntax for res_pjsip config objects:
2014

21-
On this Page
15+
```
16+
[object name]
17+
type = <object type>
18+
<option> = <value>
19+
<option> = <value>
20+
```
2221

2322

24-
Config Section Help and Defaults
25-
--------------------------------
23+
## Config Section Help and Defaults
2624

27-
Reference documentation for all configuration parameters is available on the wiki:
25+
Reference documentation for all configuration parameters:
2826

2927
* [Core res_pjsip configuration options](/latest_api/API_Documentation/Module_Configuration/res_pjsip)
3028
* [Configuration options for ACLs in res_pjsip_acl](/latest_api/API_Documentation/Module_Configuration/res_pjsip_acl)
@@ -34,32 +32,23 @@ Reference documentation for all configuration parameters is available on the wik
3432
The same documentation is available at the Asterisk CLI as well. You can use "config show help <res_pjsip module name> <configobject> <configoption>" to get help on a particular option. That help will typically describe the default value for an option as well.
3533

3634

35+
/// tip|Defaults
36+
For many config options, it's very helpful to understand their default behavior. For example, for the endpoint section "transport=" option, if no value is assigned then Asterisk will \*DEFAULT\* to the first configured transport in pjsip.conf which is valid for the URI we are trying to contact.
37+
///
3738

39+
## Object Names
3840

39-
!!! tip ** ****Defaults**:
40-
For many config options, it's very helpful to understand their default behavior. For example, for the endpoint section "transport=" option, if no value is assigned then Asterisk will \*DEFAULT\* to the first configured transport in pjsip.conf which is valid for the URI we are trying to contact.
41-
42-
43-
[//]: # (end-tip)
44-
45-
46-
47-
Section Names
48-
-------------
49-
50-
In most cases, you can name a section whatever makes sense to you. For example you might name a transport [transport-udp-nat] to help you remember how that section is being used.
41+
In most cases, you can name a section whatever makes sense to you. For example you might name a transport `[transport-udp-nat]` to help you remember how that section is being used.
5142

5243
However, in some cases, (endpoint and aor types) the section name has a relationship to its function. In the case of endpoint and aor their names must match the user portion of the SIP URI in the "From" header for inbound SIP requests. The exception to that rule is if you have an identify section configured for that endpoint. In that case the inbound request would be matched by IP instead of against the user in the "From" header.
5344

54-
Section Types
55-
-------------
45+
## Object Types
5646

5747
Below is a brief description of each section type and an example showing configuration of that section only. The module providing the configuration object related to the section is listed in parentheses next to each section name.
5848

5949
There are dozens of config options for some of the sections, but the examples below are very minimal for the sake of simplicity.
6050

6151

62-
6352
### ENDPOINT
6453

6554
(provided by module: res_pjsip)
@@ -88,7 +77,7 @@ callerid=Spaceman Spiff <6001>
8877
8978
```
9079

91-
### **TRANSPORT**
80+
### TRANSPORT
9281

9382
(provided by module: res_pjsip)
9483

@@ -100,17 +89,14 @@ You can setup multiple transport sections and other sections (such as endpoints)
10089
* PJSIP does not allow multiple TCP or TLS transports of the same IP version (IPv4 or IPv6).
10190

10291

92+
/// info|Reloading Config
93+
Configuration for transport type sections can't be reloaded during run-time unless their `allow_reload` option is set to `yes`
94+
///
10395

10496

105-
!!! info "** **Reloading Config:"
106-
Configuration for transport type sections can't be reloaded during run-time without a full module unload and load. You'll effectively need to restart Asterisk completely for your transport changes to take effect.
107-
108-
109-
[//]: # (end-info)
110-
111-
97+
EXAMPLE BASIC CONFIGURATION
11298

113-
EXAMPLE BASIC CONFIGURATIONA basic UDP transport bound to all interfaces
99+
A basic UDP transport bound to all interfaces
114100

115101
```
116102
[simpletrans]
@@ -136,13 +122,15 @@ method=
136122
137123
```
138124

139-
### **AUTH**
125+
### AUTH
140126

141127
(provided by module: res_pjsip)
142128

143129
Authentication sections hold the options and credentials related to inbound or outbound authentication. You'll associate other sections such as endpoints or registrations to this one. Multiple endpoints or registrations can use a single auth config if needed.
144130

145-
EXAMPLE BASIC CONFIGURATIONAn example with username and password authentication
131+
EXAMPLE BASIC CONFIGURATION
132+
133+
An example with username and password authentication
146134

147135
```
148136
[auth6001]
@@ -164,17 +152,25 @@ username=6001
164152
165153
```
166154

167-
### **AOR**
155+
### AOR
168156

169157
(provided by module: res_pjsip)
170158

171-
A primary feature of AOR objects (Address of Record) is to tell Asterisk where an endpoint can be contacted. Without an associated AOR section, an endpoint cannot be contacted. AOR objects also store associations to mailboxes for MWI requests and other data that might relate to the whole group of contacts such as expiration and qualify settings.
159+
A primary feature of AOR objects (Address of Record) is to tell Asterisk where an endpoint can be contacted. Without an associated AOR section, an endpoint cannot be contacted. AOR objects also store associations to mailboxes for MWI requests and other data that might relate to the whole group of contacts such as expiration and qualify settings. Contact information can be provided one of two ways:
160+
161+
/// define
162+
Statically
163+
164+
- A `contact` parameter that contains a SIP URI can be added to an AOR.
165+
166+
Dynamically
172167

173-
When Asterisk receives an inbound registration, it'll look to match against available AORs.
168+
- A remote user agent can send a SIP REGISTER request to Asterisk that contains a Contact URI. In this case, the name of the AOR section must match the user portion of the SIP URI in the "To:" header of the inbound SIP registration. That will usually be the "user name" set in your hard or soft phones configuration.
174169

175-
**Registrations:** The name of the AOR section must match the user portion of the SIP URI in the "To:" header of the inbound SIP registration. That will usually be the "user name" set in your hard or soft phones configuration.
176170

177-
EXAMPLE BASIC CONFIGURATIONFirst, we have a configuration where you are expecting the SIP User Agent (likely a phone) to register against the AOR. In this case, the contact objects will be created automatically. We limit the maximum contact creation to 1. We could do 10 if we wanted up to 10 SIP User Agents to be able to register against it.
171+
EXAMPLE BASIC CONFIGURATION
172+
173+
First, we have a configuration where you are expecting the SIP User Agent (likely a phone) to register against the AOR. In this case, the contact objects will be created automatically. We limit the maximum contact creation to 1. We could do 10 if we wanted up to 10 SIP User Agents to be able to register against it.
178174

179175
```
180176
[6001]
@@ -201,13 +197,15 @@ contact=sip:203.0.113.1:5060
201197
202198
```
203199

204-
### **REGISTRATION**
200+
### REGISTRATION
205201

206202
(provided by module: res_pjsip_outbound_registration)
207203

208204
The registration section contains information about an outbound registration. You'll use this when setting up a registration to another system whether it's local or a trunk from your ITSP.
209205

210-
EXAMPLE BASIC CONFIGURATIONThis example shows you how you might configure registration and outbound authentication against another Asterisk system, where the other system is using the older chan_sip peer setup.
206+
EXAMPLE BASIC CONFIGURATION
207+
208+
This example shows you how you might configure registration and outbound authentication against another Asterisk system, where the other system is using the older chan_sip peer setup.
211209

212210
This example is just the registration itself. You'll of course need the associated transport and auth sections. Plus, if you want to receive calls from the far end (who now knows where to send calls, thanks to your registration!) then you'll need endpoint, AOR and possibly identify sections setup to match inbound calls to a context in your dialplan.
213211

@@ -219,7 +217,6 @@ outbound_auth=mytrunk
219217
server_uri=sip:[email protected]:5060
220218
client_uri=sip:[email protected]:5060
221219
retry_interval=60
222-
223220
```
224221

225222
And an example that may work with a SIP trunking provider
@@ -237,7 +234,7 @@ retry_interval=60
237234

238235
What if you don't need to authenticate? You can simply omit the **outbound_auth** option.
239236

240-
### **DOMAIN_ALIAS**
237+
### DOMAIN_ALIAS
241238

242239
(provided by module: res_pjsip)
243240

@@ -252,13 +249,15 @@ domain=example.com
252249
253250
```
254251

255-
### **ACL**
252+
### ACL
256253

257254
(provided by module: res_pjsip_acl)
258255

259256
The ACL module used by 'res_pjsip'. This module is independent of 'endpoints' and operates on all inbound SIP communication using res_pjsip. Features such as an Access Control List, as defined in the configuration section itself, or as defined in **acl.conf**. ACL's can be defined specifically for source IP addresses, or IP addresses within the contact header of SIP traffic.
260257

261-
EXAMPLE BASIC CONFIGURATIONA configuration pulling from the acl.conf file:
258+
EXAMPLE BASIC CONFIGURATION
259+
260+
A configuration pulling from the acl.conf file:
262261

263262
```
264263
[acl]
@@ -291,13 +290,15 @@ contactpermit=209.16.236.1
291290

292291
All of these configurations can be combined.
293292

294-
### **IDENTIFY**
293+
### IDENTIFY
295294

296295
(provided by module: res_pjsip_endpoint_identifier_ip)
297296

298297
Controls how the res_pjsip_endpoint_identifier_ip module determines what endpoint an incoming packet is from. If you don't have an identify section defined, or else you have res_pjsip_endpoint_**identifier_ip** loading **after** res_pjsip_endpoint_**identifier_user**, then res_pjsip_endpoint_**identifier_user** will identify inbound traffic by pulling the user from the "From:" SIP header in the packet. Basically the module load order, and your configuration will both determine whether you identify by IP or by user.
299298

300-
EXAMPLE BASIC CONFIGURATIONIts use is quite straightforward. With this configuration if Asterisk sees inbound traffic from 203.0.113.1 then it will match that to Endpoint 6001.
299+
EXAMPLE BASIC CONFIGURATION
300+
301+
Its use is quite straightforward. With this configuration if Asterisk sees inbound traffic from 203.0.113.1 then it will match that to Endpoint 6001.
301302

302303
```
303304
[6001]
@@ -307,46 +308,32 @@ match=203.0.113.1
307308
308309
```
309310

310-
### **CONTACT**
311+
### CONTACT
311312

312313
(provided by module: res_pjsip)
313314

314315
The contact config object effectively acts as an alias for a SIP URIs and holds information about an inbound registrations. Contact objects can be associated with an individual SIP User Agent and contain a few config options related to the connection. Contacts are created automatically upon registration to an AOR, or can be created manually by using the "contact=" config option in an AOR section. Manually configuring a CONTACT config object should not be needed, however. AORs with fixed remote hosts will create contacts upon AOR creation, and AORs that accept registrations will create contacts upon each accepted registration.
315316

316-
Relationships of Configuration Objects in pjsip.conf
317-
----------------------------------------------------
317+
## Relationships of Configuration Objects in pjsip.conf
318318

319319
Now that you understand the various configuration sections related to each config object, lets look at how they interrelate.
320320

321321
You'll see that the new SIP implementation within Asterisk is extremely flexible due to its modular design. A diagram will help you to visualize the relationships between the various configuration objects. The following entity relationship diagram covers only the configuration relationships between the objects. For example if an **endpoint** object requires authorization for registration of a SIP device, then you may associate a single **auth** object with the endpoint object. Though many endpoints could use the same or different auth objects.
322322

323323
**Configuration Flow**: This lets you know which direction the objects are associated to other objects. e.g. The identify config section has an option "endpoint=" which allows you to associate it with an endpoint object.
324324

325-
325+
![](res_sip_configrelationships.png)
326326

327327
| Entity Relationships | Relationship Descriptions |
328328
| --- | --- |
329-
| res_sip_configrelationships25919621 | ENDPOINT* Many ENDPOINTs can be associated with many AORs
330-
* Zero to many ENDPOINTs can be associated with zero to one AUTHs
331-
* Zero to many ENDPOINTs can be associated with at least one TRANSPORT
332-
* Zero to one ENDPOINTs can be associated with an IDENTIFY
333-
334-
REGISTRATION* Zero to many REGISTRATIONs can be associated with zero to one AUTHs
335-
* Zero to many REGISTRATIONs can be associated with at least one TRANSPORT
336-
337-
AOR* Many ENDPOINTs can be associated with many AORs
338-
* Many AORs can be associated with many CONTACTs
339-
340-
CONTACT* Many CONTACTs can be associated with many AORs
341-
342-
IDENTIFY* Zero to One ENDPOINTs can be associated with an IDENTIFY object
343-
344-
ACL, DOMAIN_ALIAS* These objects don't have a direct configuration relationship to the other objects.
345-
|
346-
347-
Unfamiliar with ERD? Click here to see a key...![](ERD_key.PNG)
348-
329+
| ENDPOINT|<ul><li>Many ENDPOINTs can be associated with many AORs<li>Zero to many ENDPOINTs can be associated with zero to one AUTHs<li>Zero to many ENDPOINTs can be associated with at least one TRANSPORT<li>Zero to one ENDPOINTs can be associated with an IDENTIFY</ul>|
330+
| REGISTRATION|<ul><li>Zero to many REGISTRATIONs can be associated with zero to one AUTHs<li>Zero to many REGISTRATIONs can be associated with at least one TRANSPORT</ul>|
331+
|AOR|<ul><li>Many ENDPOINTs can be associated with many AORs <li>Many AORs can be associated with many CONTACTs</ul>|
332+
|CONTACT|<ul><li>Many CONTACTs can be associated with many AORs</ul>|
333+
|IDENTIFY|<ul><li>Zero to One ENDPOINTs can be associated with an IDENTIFY object</ul>|
334+
|ACL, DOMAIN_ALIAS|<ul><li>These objects don't have a direct configuration relationship to the other objects.</ul>|
349335

350336

337+
Unfamiliar with ERD notation? Click [here](https://www.google.com/search?q=entity+relationship+diagram+symbols) for more info courtesy of Google Search.
351338

352339

11.1 KB
Loading

0 commit comments

Comments
 (0)