[asterisk-dev] [Code Review] 2892: res_pjsip: alembic script and sample configs for using realtime configuration with PJSIP
Russell Bryant
reviewboard at asterisk.org
Mon Sep 30 13:14:53 CDT 2013
> On Sept. 30, 2013, 5:52 p.m., jrose wrote:
> > /branches/12/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py, lines 55-57
> > <https://reviewboard.asterisk.org/r/2892/diff/1/?file=46891#file46891line55>
> >
> > So... I'm beginning to wonder if it wouldn't be better to have the PJSIP alembic scripts separated from all of this random assortment of stuff. Take the ODBC voicemail configuration for example. It lives in a separate alembic configuration from the config stuff and has separate version numbers and such. I'm going to bring Russell in on this review and ask his opinion.
In short, maybe. I'll explain my logic for the split that's here. My thinking was that storing your voicemail in a database is a completely different use case from wanting to store your configuration in the database. If you're storing your config in the db, I also assumed you would be storing all/most of your config there, so it made sense to just create all of the configuration tables together.
Following that logic, putting it where you have it makes sense. It's what I would do.
Also note that at some point you have to stop changing the initial migration script and only make additional changes with new migration scripts. Basically, as soon as you expect anyone may have run this in production, you should start making new migrations.
- Russell
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2892/#review9862
-----------------------------------------------------------
On Sept. 30, 2013, 5:52 p.m., jrose wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2892/
> -----------------------------------------------------------
>
> (Updated Sept. 30, 2013, 5:52 p.m.)
>
>
> Review request for Asterisk Developers, Joshua Colp, Matt Jordan, Mark Michelson, and Russell Bryant.
>
>
> Bugs: ASTERISK-22133
> https://issues.asterisk.org/jira/browse/ASTERISK-22133
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Part of an effort to document the usage of realtime with PJSIP. This includes the ability to automatically build database tables for Endpoints, AORs, Authentication profiles, domain aliases, and endpoint identifiers. There also also some example configuration changes which provide linkage though sorcery.conf and extconfig.conf. The extconfig samples assume ODBC is used, but they can be changed to any of the other back-ends fairly trivially for anyone who knows how to use them anyway.
>
> A wiki page will also be written for this issue.
>
>
> Diffs
> -----
>
> /branches/12/configs/extconfig.conf.sample 399662
> /branches/12/configs/sorcery.conf.sample 399662
> /branches/12/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py 399662
>
> Diff: https://reviewboard.asterisk.org/r/2892/diff/
>
>
> Testing
> -------
>
> Generated the database tables with the alembic script
> Made PJSIP calls using realtime endpoints and AORs
> Tested that auths were created and could be read using the realtime backend provided by sorcery by means of a hastily chopped together CLI command (not included in the patch). Domain aliases and endpoint identifier IPs haven't been directly tested, but the concept is the same.
>
>
> Thanks,
>
> jrose
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130930/2db38e42/attachment.html>
More information about the asterisk-dev
mailing list