Skip to content

Commit 464e9ec

Browse files
committed
corrected MD formatting errors - replace <0xa0> with space
1 parent fe52a2c commit 464e9ec

File tree

7 files changed

+179
-173
lines changed

7 files changed

+179
-173
lines changed

docs/Configuration/Interfaces/Asterisk-Manager-Interface-AMI/AMI-v2-Specification/index.md

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/Managing-Realtime-Databases-with-Alembic.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,30 @@ title: Managing Realtime Databases with Alembic
55
Overview
66
========
77

8-
Asterisk 12 now uses [Alembic](https://pypi.python.org/pypi/alembic) to help manage Asterisk Realtime Database schemas. This includes creation of SQL scripts for a variety of database vendors, but also much more. Alembic is a full database migration tool, with support for upgrading the schemas of existing databases, versioning of schemas, creation of new tables and databases, and a whole lot more. This page covers basic configuration of the Alembic configuration file for usage with Asterisk Realtime as well as basic usage of Alembic. While a full description of Alembic is beyond the scope of this page, the information on this page should help an Asterisk administrator create or upgrade an Asterisk installation.
8+
Asterisk 12 now uses [Alembic](https://pypi.python.org/pypi/alembic) to help manage Asterisk Realtime Database schemas. This includes creation of SQL scripts for a variety of database vendors, but also much more. Alembic is a full database migration tool, with support for upgrading the schemas of existing databases, versioning of schemas, creation of new tables and databases, and a whole lot more. This page covers basic configuration of the Alembic configuration file for usage with Asterisk Realtime as well as basic usage of Alembic. While a full description of Alembic is beyond the scope of this page, the information on this page should help an Asterisk administrator create or upgrade an Asterisk installation.
99

1010
Alembic makes upgrading less painfulAs Asterisk changes and new fields are made controllable via realtime, new Alembic change scripts are added so you will be able to simply run the Alembic upgrade command again in order to modify your database.
1111

12-
While Alembic helps with database migrations within a release series (e.g., Asterisk 13.x.x) it does not work very well when jumping to a different release series (e.g., jumping from Asterisk 13.x.x to Asterisk 15.x.x).  Data loss is possible when jumping to a different release series.  Before a new series (e.g., Asterisk 15.0.0) is initially released breaking changes can be introduced that can result in data loss.
12+
While Alembic helps with database migrations within a release series (e.g., Asterisk 13.x.x) it does not work very well when jumping to a different release series (e.g., jumping from Asterisk 13.x.x to Asterisk 15.x.x).
1313

14-
Always exercise due diligence and backup your database before upgrading.  Tables can be fixed easily.  Repopulating the data if it's lost however isn't.
14+
Data loss is possible when jumping to a different release series.
15+
16+
Before a new series (e.g., Asterisk 15.0.0) is initially released breaking changes can be introduced that can result in data loss.
17+
18+
Always exercise due diligence and backup your database before upgrading.
19+
20+
Tables can be fixed easily.
21+
22+
Repopulating the data if it's lost however isn't.
1523

1624
Please read the CHANGES file and the applicable UPGRADE files for important information about what changed between revisions.
1725

1826
Before you Begin
1927
----------------
2028

21-
This tutorial assumes you already have some experience in setting up Realtime configuration with Asterisk for other modules. This page will not describe how to set up backend database connectors, and is written under the assumption that you will be using ODBC to connect to your database since the ODBC adaptor is capable of connecting to most commonly used database servers. For more information on configuring and setting up Asterisk Realtime, see Asterisk Realtime Database configuration.
29+
This tutorial assumes you already have some experience in setting up Realtime configuration with Asterisk for other modules. This page will not describe how to set up backend database connectors, and is written under the assumption that you will be using ODBC to connect to your database since the ODBC adaptor is capable of connecting to most commonly used database servers. For more information on configuring and setting up Asterisk Realtime, see:
30+
31+
Asterisk Realtime Database configuration.
2232

2333
Installing Alembic
2434
==================
@@ -32,23 +42,23 @@ $ pip install alembicAnd that's it!
3242
Building the Database Tables
3343
============================
3444

35-
Alembic scripts were added to Asterisk in Asterisk 12, and will allow you to automatically populate your database with tables for most of the commonly used configuration options. The scripts are located in the [Asterisk contrib/ast-db-manage](http://svn.asterisk.org/svn/asterisk/trunk/contrib/ast-db-manage/) folder:
45+
Alembic scripts were added to Asterisk in Asterisk 12, and will allow you to automatically populate your database with tables for most of the commonly used configuration options. The scripts are located in the [Asterisk contrib/ast-db-manage](http://svn.asterisk.org/svn/asterisk/trunk/contrib/ast-db-manage/) folder:
3646

3747
$ cd contrib/ast-db-manageFor the rest of this tutorial, we will assume that operations will be taken in the context of that directory.
3848

3949
Configuring Alembic
4050
-------------------
4151

42-
Within this directory, you will find a configuration sample file, `config.ini.sample`, which will need to be edited to connect to your database of choice. Open this file in your text editor of choice and then save a copy of this sample file as `config.ini` - this will serve as the configuration file you actually use with Alembic.
52+
Within this directory, you will find a configuration sample file, `config.ini.sample`, which will need to be edited to connect to your database of choice. Open this file in your text editor of choice and then save a copy of this sample file as `config.ini` - this will serve as the configuration file you actually use with Alembic.
4353

44-
There are two different parameters in `config.ini` that require review: `sqlalchemy.url` and `script_location`. The first specifies the database to upgrade; the second which upgrades to perform.
54+
There are two different parameters in `config.ini` that require review: `sqlalchemy.url` and `script_location`. The first specifies the database to upgrade; the second which upgrades to perform.
4555

46-
1. Update `sqlalchemy.url` to the URL for your database. An example is shown below for a MySQL database:
56+
1. Update `sqlalchemy.url` to the URL for your database. An example is shown below for a MySQL database:
4757

48-
sqlalchemy.url = mysql://root:password@localhost/asteriskThis would connect to a MySQL database as user `root` with password `password`. The database is `asterisk`, located on `localhost`. Different databases will require different URL schemas; however, they should in general follow the format outlined above. Alembic supports many different database technologies, including `oracle`, `postgresql`, and `mssql`.
58+
sqlalchemy.url = mysql://root:password@localhost/asteriskThis would connect to a MySQL database as user `root` with password `password`. The database is `asterisk`, located on `localhost`. Different databases will require different URL schemas; however, they should in general follow the format outlined above. Alembic supports many different database technologies, including `oracle`, `postgresql`, and `mssql`.
4959

50-
For more information, see the Alembic documentation on SQLAlchemy URLs: <http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#database-urls>
51-
2. Update `script_location` to the schema to update. Asterisk currently supports two sets of schemas:
60+
For more information, see the Alembic documentation on SQLAlchemy URLs: <http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#database-urls>
61+
2. Update `script_location` to the schema to update. Asterisk currently supports two sets of schemas:
5262
1. `config` - the set of schemas for Asterisk Realtime databases
5363
2. `voicemail` - the schema for ODBC VoiceMail
5464

@@ -76,8 +86,4 @@ ImportError: No module named MySQLdb**Solution**: You probably need the Python i
7686

7787
For example, with Ubuntu, install the following package and then re-run your Alembic upgrade.
7888

79-
# apt-get install python-mysqldb 
80-
81-
 
82-
83-
 
89+
# apt-get install python-mysqldb

docs/Configuration/Miscellaneous/Hangup-Cause-Mappings.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,57 @@ Asterisk Hangup Cause Code Mappings
77

88
| Asterisk Value | ISDN Cause codes (Q.850 & Q.931 unless specified) | MFC/R2 | SIP/PJSIP | Motif |
99
| --- | --- | --- | --- | --- |
10-
| AST\_CAUSE\_NOT\_DEFINED | Cause not defined | OR2\_CAUSE\_UNSPECIFIED |   |   |
10+
| AST\_CAUSE\_NOT\_DEFINED | Cause not defined | OR2\_CAUSE\_UNSPECIFIED | | |
1111
| AST\_CAUSE\_UNALLOCATED | 1. Unallocated (unassigned) number
12-
|   | 404, 485, 604 |   |
13-
| AST\_CAUSE\_NO\_ROUTE\_TRANSIT\_NET | 2. No route to specified transmit network |   |   |   |
14-
| AST\_CAUSE\_NO\_ROUTE\_DESTINATION | 3. No route to destination |   | 420 |   |
15-
| AST\_CAUSE\_MISDIALLED\_TRUNK\_PREFIX | 5. Misdialled trunk prefix (national use) |   |   |   |
16-
| AST\_CAUSE\_CHANNEL\_UNACCEPTABLE | 6. Channel unacceptable |   |   |   |
17-
| AST\_CAUSE\_CALL\_AWARDED\_DELIVERED | 7. Call awarded and being delivered in an established channel |   |   |   |
18-
| AST\_CAUSE\_PRE\_EMPTED | ISUP - 8. Preemption |   |   |   |
19-
| AST\_CAUSE\_NUMBER\_PORTED\_NOT\_HERE | 14. QoR: ported number |   |   |   |
20-
| AST\_CAUSE\_NORMAL\_CLEARING | 16. Normal Clearing | OR2\_CAUSE\_NORMAL\_CLEARING |   | gone, success |
12+
| | 404, 485, 604 | |
13+
| AST\_CAUSE\_NO\_ROUTE\_TRANSIT\_NET | 2. No route to specified transmit network | | | |
14+
| AST\_CAUSE\_NO\_ROUTE\_DESTINATION | 3. No route to destination | | 420 | |
15+
| AST\_CAUSE\_MISDIALLED\_TRUNK\_PREFIX | 5. Misdialled trunk prefix (national use) | | | |
16+
| AST\_CAUSE\_CHANNEL\_UNACCEPTABLE | 6. Channel unacceptable | | | |
17+
| AST\_CAUSE\_CALL\_AWARDED\_DELIVERED | 7. Call awarded and being delivered in an established channel | | | |
18+
| AST\_CAUSE\_PRE\_EMPTED | ISUP - 8. Preemption | | | |
19+
| AST\_CAUSE\_NUMBER\_PORTED\_NOT\_HERE | 14. QoR: ported number | | | |
20+
| AST\_CAUSE\_NORMAL\_CLEARING | 16. Normal Clearing | OR2\_CAUSE\_NORMAL\_CLEARING | | gone, success |
2121
| AST\_CAUSE\_USER\_BUSY | 17. User busy | OR2\_CAUSE\_BUSY\_NUMBER | 486, 600 | busy |
22-
| AST\_CAUSE\_NO\_USER\_RESPONSE | 18. No user responding |   | 408 | expired |
23-
| AST\_CAUSE\_NO\_ANSWER | 19. No answer from user (user alerted) | OR2\_CAUSE\_NO\_ANSWER | 480, 483 |   |
24-
| AST\_CAUSE\_SUBSCRIBER\_ABSENT | 20. Subscriber absent | OR2\_CAUSE\_UNALLOCATED\_NUMBER |   |   |
25-
| AST\_CAUSE\_CALL\_REJECTED | 21. Call Rejected |   | 401, 403, 407, 603 | cancel, decline |
26-
| AST\_CAUSE\_NUMBER\_CHANGED | 22. Number changed |   | 410 |   |
27-
| AST\_CAUSE\_REDIRECTED\_TO\_NEW\_DESTINATION | 23. Redirected to new destination |   |   |   |
28-
| AST\_CAUSE\_ANSWERED\_ELSEWHERE | 26. Non-selected user clearing(ASTERISK-15057) |   |   |   |
29-
| AST\_CAUSE\_DESTINATION\_OUT\_OF\_ORDER | 27. Destination out of order | OR2\_CAUSE\_OUT\_OF\_ORDER | 502 |   |
30-
| AST\_CAUSE\_INVALID\_NUMBER\_FORMAT | 28. Invalid number format |   | 484 |   |
31-
| AST\_CAUSE\_FACILITY\_REJECTED | 29. Facility rejected |   | 501 |   |
32-
| AST\_CAUSE\_RESPONSE\_TO\_STATUS\_ENQUIRY | 30. Response to STATUS ENQUIRY |   |   |   |
33-
| AST\_CAUSE\_NORMAL\_UNSPECIFIED | 31. Normal, unspecified |   |   |   |
34-
| AST\_CAUSE\_NORMAL\_CIRCUIT\_CONGESTION | 34. No circuit/channel available(Note that we've called this "Circuit/channel congestion" for a while which can cause confusion with code 42) | OR2\_CAUSE\_NETWORK\_CONGESTION |   | general-error |
35-
| AST\_CAUSE\_NETWORK\_OUT\_OF\_ORDER | 38. Network out of order |   | 500 |   |
36-
| AST\_CAUSE\_NORMAL\_TEMPORARY\_FAILURE | 41. Temporary failure |   | 409 |   |
37-
| AST\_CAUSE\_SWITCH\_CONGESTION | 42. Switching equipment congestion |   | 5xx | failed-application |
38-
| AST\_CAUSE\_ACCESS\_INFO\_DISCARDED | 43. Access information discarded |   |   |   |
39-
| AST\_CAUSE\_REQUESTED\_CHAN\_UNAVAIL | 44. Requested circuit/channel not available |   |   |   |
40-
| AST\_CAUSE\_FACILITY\_NOT\_SUBSCRIBED | 50. Requested facility not subscribed |   |   |   |
41-
| AST\_CAUSE\_OUTGOING\_CALL\_BARRED | 52. Outgoing call barred |   |   |   |
42-
| AST\_CAUSE\_INCOMING\_CALL\_BARRED | 54. Incoming call barred |   |   |   |
43-
| AST\_CAUSE\_BEARERCAPABILITY\_NOTAUTH | 57. Bearer capability not authorized |   |   |   |
44-
| AST\_CAUSE\_BEARERCAPABILITY\_NOTAVAIL | 58. Bearer capability not presently available |   | 488, 606 | incompatible-parameters, media-error, unsupported-applications |
45-
| AST\_CAUSE\_BEARERCAPABILITY\_NOTIMPL | 65. Bearer capability not implemented |   |   |   |
46-
| AST\_CAUSE\_CHAN\_NOT\_IMPLEMENTED | 66. Channel type not implemented |   |   |   |
47-
| AST\_CAUSE\_FACILITY\_NOT\_IMPLEMENTED | 69. Requested facility not implemented |   |   | unsupported-transports |
48-
| AST\_CAUSE\_INVALID\_CALL\_REFERENCE | 81. Invalid call reference value |   |   |   |
49-
| AST\_CAUSE\_INCOMPATIBLE\_DESTINATION | 88. Incompatible destination |   |   |   |
50-
| AST\_CAUSE\_INVALID\_MSG\_UNSPECIFIED | 95. Invalid message unspecified |   |   |   |
51-
| AST\_CAUSE\_MANDATORY\_IE\_MISSING | 96. Mandatory information element is missing |   |   |   |
52-
| AST\_CAUSE\_MESSAGE\_TYPE\_NONEXIST | 97. Message type non-existent or not implemented |   |   |   |
53-
| AST\_CAUSE\_WRONG\_MESSAGE | 98. Message not compatible with call state or message type non-existent or not implemented |   |   |   |
54-
| AST\_CAUSE\_IE\_NONEXIST | 99. Information element nonexistent or not implemented |   |   |   |
55-
| AST\_CAUSE\_INVALID\_IE\_CONTENTS | 100. Invalid information element contents |   |   |   |
56-
| AST\_CAUSE\_WRONG\_CALL\_STATE | 101. Message not compatible with call state |   |   |   |
57-
| AST\_CAUSE\_RECOVERY\_ON\_TIMER\_EXPIRE | 102. Recover on timer expiry |   | 504 | timeout |
58-
| AST\_CAUSE\_MANDATORY\_IE\_LENGTH\_ERROR | ? Mandatory IE length error |   |   |   |
59-
| AST\_CAUSE\_PROTOCOL\_ERROR | 111. Protocol error, unspecified |   |   | failed-transport, security-error |
60-
| AST\_CAUSE\_INTERWORKING | 127. Interworking, unspecified |   | 4xx, 505, 6xx | connectivity-error |
22+
| AST\_CAUSE\_NO\_USER\_RESPONSE | 18. No user responding | | 408 | expired |
23+
| AST\_CAUSE\_NO\_ANSWER | 19. No answer from user (user alerted) | OR2\_CAUSE\_NO\_ANSWER | 480, 483 | |
24+
| AST\_CAUSE\_SUBSCRIBER\_ABSENT | 20. Subscriber absent | OR2\_CAUSE\_UNALLOCATED\_NUMBER | | |
25+
| AST\_CAUSE\_CALL\_REJECTED | 21. Call Rejected | | 401, 403, 407, 603 | cancel, decline |
26+
| AST\_CAUSE\_NUMBER\_CHANGED | 22. Number changed | | 410 | |
27+
| AST\_CAUSE\_REDIRECTED\_TO\_NEW\_DESTINATION | 23. Redirected to new destination | | | |
28+
| AST\_CAUSE\_ANSWERED\_ELSEWHERE | 26. Non-selected user clearing(ASTERISK-15057) | | | |
29+
| AST\_CAUSE\_DESTINATION\_OUT\_OF\_ORDER | 27. Destination out of order | OR2\_CAUSE\_OUT\_OF\_ORDER | 502 | |
30+
| AST\_CAUSE\_INVALID\_NUMBER\_FORMAT | 28. Invalid number format | | 484 | |
31+
| AST\_CAUSE\_FACILITY\_REJECTED | 29. Facility rejected | | 501 | |
32+
| AST\_CAUSE\_RESPONSE\_TO\_STATUS\_ENQUIRY | 30. Response to STATUS ENQUIRY | | | |
33+
| AST\_CAUSE\_NORMAL\_UNSPECIFIED | 31. Normal, unspecified | | | |
34+
| AST\_CAUSE\_NORMAL\_CIRCUIT\_CONGESTION | 34. No circuit/channel available(Note that we've called this "Circuit/channel congestion" for a while which can cause confusion with code 42) | OR2\_CAUSE\_NETWORK\_CONGESTION | | general-error |
35+
| AST\_CAUSE\_NETWORK\_OUT\_OF\_ORDER | 38. Network out of order | | 500 | |
36+
| AST\_CAUSE\_NORMAL\_TEMPORARY\_FAILURE | 41. Temporary failure | | 409 | |
37+
| AST\_CAUSE\_SWITCH\_CONGESTION | 42. Switching equipment congestion | | 5xx | failed-application |
38+
| AST\_CAUSE\_ACCESS\_INFO\_DISCARDED | 43. Access information discarded | | | |
39+
| AST\_CAUSE\_REQUESTED\_CHAN\_UNAVAIL | 44. Requested circuit/channel not available | | | |
40+
| AST\_CAUSE\_FACILITY\_NOT\_SUBSCRIBED | 50. Requested facility not subscribed | | | |
41+
| AST\_CAUSE\_OUTGOING\_CALL\_BARRED | 52. Outgoing call barred | | | |
42+
| AST\_CAUSE\_INCOMING\_CALL\_BARRED | 54. Incoming call barred | | | |
43+
| AST\_CAUSE\_BEARERCAPABILITY\_NOTAUTH | 57. Bearer capability not authorized | | | |
44+
| AST\_CAUSE\_BEARERCAPABILITY\_NOTAVAIL | 58. Bearer capability not presently available | | 488, 606 | incompatible-parameters, media-error, unsupported-applications |
45+
| AST\_CAUSE\_BEARERCAPABILITY\_NOTIMPL | 65. Bearer capability not implemented | | | |
46+
| AST\_CAUSE\_CHAN\_NOT\_IMPLEMENTED | 66. Channel type not implemented | | | |
47+
| AST\_CAUSE\_FACILITY\_NOT\_IMPLEMENTED | 69. Requested facility not implemented | | | unsupported-transports |
48+
| AST\_CAUSE\_INVALID\_CALL\_REFERENCE | 81. Invalid call reference value | | | |
49+
| AST\_CAUSE\_INCOMPATIBLE\_DESTINATION | 88. Incompatible destination | | | |
50+
| AST\_CAUSE\_INVALID\_MSG\_UNSPECIFIED | 95. Invalid message unspecified | | | |
51+
| AST\_CAUSE\_MANDATORY\_IE\_MISSING | 96. Mandatory information element is missing | | | |
52+
| AST\_CAUSE\_MESSAGE\_TYPE\_NONEXIST | 97. Message type non-existent or not implemented | | | |
53+
| AST\_CAUSE\_WRONG\_MESSAGE | 98. Message not compatible with call state or message type non-existent or not implemented | | | |
54+
| AST\_CAUSE\_IE\_NONEXIST | 99. Information element nonexistent or not implemented | | | |
55+
| AST\_CAUSE\_INVALID\_IE\_CONTENTS | 100. Invalid information element contents | | | |
56+
| AST\_CAUSE\_WRONG\_CALL\_STATE | 101. Message not compatible with call state | | | |
57+
| AST\_CAUSE\_RECOVERY\_ON\_TIMER\_EXPIRE | 102. Recover on timer expiry | | 504 | timeout |
58+
| AST\_CAUSE\_MANDATORY\_IE\_LENGTH\_ERROR | ? Mandatory IE length error | | | |
59+
| AST\_CAUSE\_PROTOCOL\_ERROR | 111. Protocol error, unspecified | | | failed-transport, security-error |
60+
| AST\_CAUSE\_INTERWORKING | 127. Interworking, unspecified | | 4xx, 505, 6xx | connectivity-error |
6161

6262
#### Notes
6363

0 commit comments

Comments
 (0)