asterisk/contrib/ast-db-manage
Joshua Colp aed6c219a3 pjsip: Fix a few media bugs with reinvites and asymmetric payloads.
When channel format changes occurred as a result of an RTP
re-negotiation the bridge was not informed this had happened.
As a result the bridge technology was not re-evaluated and the
channel may have been in a bridge technology that was incompatible
with its formats. The bridge is now unbridged and the technology
re-evaluated when this occurs.

The chan_pjsip module also allowed asymmetric codecs for sending
and receiving. This did not work with all devices and caused one
way audio problems. The default has been changed to NOT do this
but to match the sending codec to the receiving codec. For users
who want asymmetric codecs an option has been added, asymmetric_rtp_codec,
which will return chan_pjsip to the previous behavior.

The codecs returned by the chan_pjsip module when queried by
the bridge_native_rtp module were also not reflective of the
actual negotiated codecs. The nativeformats are now returned as
they reflect the actual negotiated codecs.

ASTERISK-26423 #close

Change-Id: I6ec88c6e3912f52c334f1a26983ccb8f267020dc
2016-10-26 12:48:57 +00:00
..
cdr alembic: Allow cdr, config and voicemail to exist in the same schema 2016-10-07 07:49:42 -05:00
config pjsip: Fix a few media bugs with reinvites and asymmetric payloads. 2016-10-26 12:48:57 +00:00
voicemail alembic: Allow cdr, config and voicemail to exist in the same schema 2016-10-07 07:49:42 -05:00
README.md Add text of cdr directory into README.md for ast-db-manage 2016-09-30 18:32:19 -03:00
cdr.ini.sample alembic: Adjust sippeers, queue_members, and voicemail_messages tables. 2014-08-06 17:04:08 +00:00
config.ini.sample alembic: Adjust sippeers, queue_members, and voicemail_messages tables. 2014-08-06 17:04:08 +00:00
env.py alembic: Allow cdr, config and voicemail to exist in the same schema 2016-10-07 07:49:42 -05:00
voicemail.ini.sample alembic: Adjust sippeers, queue_members, and voicemail_messages tables. 2014-08-06 17:04:08 +00:00

README.md

Asterisk Database Manager

Asterisk includes optional database integration for a variety of features. The purpose of this effort is to assist in managing the database schema for Asterisk database integration.

This is implemented as a set of repositories that contain database schema migrations, using Alembic. The existing repositories include:

  • cdr - Table used for Asterisk to store CDR records
  • config - Tables used for Asterisk realtime configuration
  • voicemail - Tables used for ODBC_STOARGE of voicemail messages

Alembic uses SQLAlchemy, which has support for many databases.

IMPORTANT NOTE: This is brand new and the initial migrations are still subject to change. Only use this for testing purposes for now.

Example Usage

First, create an ini file that contains database connection details. For help with connection string details, see the SQLAlchemy docs.

$ cp config.ini.sample config.ini
... edit config.ini and change sqlalchemy.url ...

Next, bring the database up to date with the current schema.

$ alembic -c config.ini upgrade head

In the future, as additional database migrations are added, you can run alembic again to migrate the existing tables to the latest schema.

$ alembic -c config.ini upgrade head

The migrations support both upgrading and downgrading. You could go all the way back to where you started with no tables by downgrading back to the base revision.

$ alembic -c config.ini downgrade base

base and head are special revisions. You can refer to specific revisions to upgrade or downgrade to, as well.

$ alembic -c config.ini upgrade 4da0c5f79a9c

Offline Mode

If you would like to just generate the SQL statements that would have been executed, you can use alembic's offline mode.

$ alembic -c config.ini upgrade head --sql

Adding Database Migrations

The best way to learn about how to add additional database migrations is to refer to the Alembic documentation.