[asterisk-commits] jrose: trunk r400533 - in /trunk: ./ configs/ contrib/ast-db-manage/config/ve...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 4 13:13:40 CDT 2013


Author: jrose
Date: Fri Oct  4 13:13:37 2013
New Revision: 400533

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400533
Log:
chan_pjsip: Add alembic scripts for generating db tables for PJSIP

Also updates sample configurations for sorcery and extconfig to
demonstrate how to use databases created by that alembic script.

(closes issue ASTERISK-22133)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2892/
........

Merged revisions 400532 from http://svn.asterisk.org/svn/asterisk/branches/12

Added:
    trunk/contrib/ast-db-manage/config/versions/43956d550a44_add_tables_for_pjsip.py
      - copied unchanged from r400532, branches/12/contrib/ast-db-manage/config/versions/43956d550a44_add_tables_for_pjsip.py
Modified:
    trunk/   (props changed)
    trunk/configs/extconfig.conf.sample
    trunk/configs/sorcery.conf.sample
    trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/configs/extconfig.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/extconfig.conf.sample?view=diff&rev=400533&r1=400532&r2=400533
==============================================================================
--- trunk/configs/extconfig.conf.sample (original)
+++ trunk/configs/extconfig.conf.sample Fri Oct  4 13:13:37 2013
@@ -65,6 +65,7 @@
 ; engine.  Here are several of the possible options:
 ;    odbc ... res_config_odbc
 ;    sqlite ... res_config_sqlite
+;    sqlite3 ... res_config_sqlite3
 ;    pgsql ... res_config_pgsql
 ;    curl ... res_config_curl
 ;    ldap ... res_config_ldap
@@ -78,6 +79,11 @@
 ;iaxpeers => odbc,asterisk
 ;sippeers => odbc,asterisk
 ;sipregs => odbc,asterisk ; (avoid sipregs if possible, e.g. by using a view)
+;ps_endpoints => odbc,asterisk
+;ps_auths => odbc,asterisk
+;ps_aors => odbc,asterisk
+;ps_domain_aliases => odbc,asterisk
+;ps_endpoint_id_ips => odbc,asterisk
 ;voicemail => odbc,asterisk
 ;extensions => odbc,asterisk
 ;meetme => mysql,general

Modified: trunk/configs/sorcery.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sorcery.conf.sample?view=diff&rev=400533&r1=400532&r2=400533
==============================================================================
--- trunk/configs/sorcery.conf.sample (original)
+++ trunk/configs/sorcery.conf.sample Fri Oct  4 13:13:37 2013
@@ -48,3 +48,13 @@
 test/cache=test
 test=memory
 
+;
+; The following object mappings set PJSIP objects to use realtime database mappings from extconfig
+; with the table names used when automatically generating configuration from the alembic script.
+;
+;[res_pjsip]
+;endpoint=realtime,ps_endpoints
+;auth=realtime,ps_auths
+;aor=realtime,ps_aors
+;domain_alias=realtime,ps_domain_aliases
+;identify=realtime,ps_endpoint_id_ips

Modified: trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py?view=diff&rev=400533&r1=400532&r2=400533
==============================================================================
--- trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py (original)
+++ trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py Fri Oct  4 13:13:37 2013
@@ -75,9 +75,12 @@
         sa.Column('secret', sa.String(40)),
         sa.Column('md5secret', sa.String(40)),
         sa.Column('remotesecret', sa.String(40)),
-        sa.Column('transport', sa.Enum(*SIP_TRANSPORT_VALUES)),
-        sa.Column('dtmfmode', sa.Enum(*SIP_DTMFMODE_VALUES)),
-        sa.Column('directmedia', sa.Enum(*SIP_DIRECTMEDIA_VALUES)),
+        sa.Column('transport', sa.Enum(*SIP_TRANSPORT_VALUES,
+                  name='sip_transport_values')),
+        sa.Column('dtmfmode', sa.Enum(*SIP_DTMFMODE_VALUES,
+                  name='sip_dtmfmode_values')),
+        sa.Column('directmedia', sa.Enum(*SIP_DIRECTMEDIA_VALUES,
+                  name='sip_directmedia_values')),
         sa.Column('nat', sa.String(29)),
         sa.Column('callgroup', sa.String(40)),
         sa.Column('pickupgroup', sa.String(40)),
@@ -85,26 +88,37 @@
         sa.Column('disallow', sa.String(200)),
         sa.Column('allow', sa.String(200)),
         sa.Column('insecure', sa.String(40)),
-        sa.Column('trustrpid', sa.Enum(*YESNO_VALUES)),
-        sa.Column('progressinband', sa.Enum(*SIP_PROGRESSINBAND_VALUES)),
-        sa.Column('promiscredir', sa.Enum(*YESNO_VALUES)),
-        sa.Column('useclientcode', sa.Enum(*YESNO_VALUES)),
+        sa.Column('trustrpid', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('progressinband', sa.Enum(*SIP_PROGRESSINBAND_VALUES,
+                  name='sip_progressinband_values')),
+        sa.Column('promiscredir', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('useclientcode', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('accountcode', sa.String(40)),
         sa.Column('setvar', sa.String(200)),
         sa.Column('callerid', sa.String(40)),
         sa.Column('amaflags', sa.String(40)),
-        sa.Column('callcounter', sa.Enum(*YESNO_VALUES)),
+        sa.Column('callcounter', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('busylevel', sa.Integer),
-        sa.Column('allowoverlap', sa.Enum(*YESNO_VALUES)),
-        sa.Column('allowsubscribe', sa.Enum(*YESNO_VALUES)),
-        sa.Column('videosupport', sa.Enum(*YESNO_VALUES)),
+        sa.Column('allowoverlap', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('allowsubscribe', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('videosupport', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('maxcallbitrate', sa.Integer),
-        sa.Column('rfc2833compensate', sa.Enum(*YESNO_VALUES)),
+        sa.Column('rfc2833compensate', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('mailbox', sa.String(40)),
-        sa.Column('session-timers', sa.Enum(*SIP_SESSION_TIMERS_VALUES)),
+        sa.Column('session-timers', sa.Enum(*SIP_SESSION_TIMERS_VALUES,
+                  name='sip_session_timers_values')),
         sa.Column('session-expires', sa.Integer),
         sa.Column('session-minse', sa.Integer),
-        sa.Column('session-refresher', sa.Enum(*SIP_SESSION_REFRESHER_VALUES)),
+        sa.Column('session-refresher', sa.Enum(*SIP_SESSION_REFRESHER_VALUES,
+                  name='sip_session_refresher_values')),
         sa.Column('t38pt_usertpsource', sa.String(40)),
         sa.Column('regexten', sa.String(40)),
         sa.Column('fromdomain', sa.String(40)),
@@ -113,13 +127,15 @@
         sa.Column('defaultip', sa.String(45)),
         sa.Column('rtptimeout', sa.Integer),
         sa.Column('rtpholdtimeout', sa.Integer),
-        sa.Column('sendrpid', sa.Enum(*YESNO_VALUES)),
+        sa.Column('sendrpid', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('outboundproxy', sa.String(40)),
         sa.Column('callbackextension', sa.String(40)),
         sa.Column('timert1', sa.Integer),
         sa.Column('timerb', sa.Integer),
         sa.Column('qualifyfreq', sa.Integer),
-        sa.Column('constantssrc', sa.Enum(*YESNO_VALUES)),
+        sa.Column('constantssrc', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('contactpermit', sa.String(95)),
         sa.Column('contactdeny', sa.String(95)),
         sa.Column('usereqphone', sa.Enum(*YESNO_VALUES)),
@@ -130,20 +146,26 @@
         sa.Column('fullname', sa.String(40)),
         sa.Column('trunkname', sa.String(40)),
         sa.Column('cid_number', sa.String(40)),
-        sa.Column('callingpres', sa.Enum(*SIP_CALLINGPRES_VALUES)),
+        sa.Column('callingpres', sa.Enum(*SIP_CALLINGPRES_VALUES,
+                  name='sip_callingpres_values')),
         sa.Column('mohinterpret', sa.String(40)),
         sa.Column('mohsuggest', sa.String(40)),
         sa.Column('parkinglot', sa.String(40)),
-        sa.Column('hasvoicemail', sa.Enum(*YESNO_VALUES)),
-        sa.Column('subscribemwi', sa.Enum(*YESNO_VALUES)),
+        sa.Column('hasvoicemail', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('subscribemwi', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('vmexten', sa.String(40)),
         sa.Column('autoframing', sa.Enum(*YESNO_VALUES)),
         sa.Column('rtpkeepalive', sa.Integer),
         sa.Column('call-limit', sa.Integer),
-        sa.Column('g726nonstandard', sa.Enum(*YESNO_VALUES)),
-        sa.Column('ignoresdpversion', sa.Enum(*YESNO_VALUES)),
-        sa.Column('allowtransfer', sa.Enum(*YESNO_VALUES)),
-        sa.Column('dynamic', sa.Enum(*YESNO_VALUES)),
+        sa.Column('g726nonstandard', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('ignoresdpversion', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('allowtransfer', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('dynamic', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('path', sa.String(256)),
         sa.Column('supportpath', sa.Enum(*YESNO_VALUES))
     )
@@ -185,16 +207,22 @@
         sa.Column('trunk', sa.Enum(*YESNO_VALUES)),
         sa.Column('auth', sa.String(20)),
         sa.Column('maxauthreq', sa.Integer),
-        sa.Column('requirecalltoken', sa.Enum(*IAX_REQUIRECALLTOKEN_VALUES)),
-        sa.Column('encryption', sa.Enum(*IAX_ENCRYPTION_VALUES)),
-        sa.Column('transfer', sa.Enum(*IAX_TRANSFER_VALUES)),
-        sa.Column('jitterbuffer', sa.Enum(*YESNO_VALUES)),
-        sa.Column('forcejitterbuffer', sa.Enum(*YESNO_VALUES)),
+        sa.Column('requirecalltoken', sa.Enum(*IAX_REQUIRECALLTOKEN_VALUES,
+                  name='iax_requirecalltoken_values')),
+        sa.Column('encryption', sa.Enum(*IAX_ENCRYPTION_VALUES,
+                  name='iax_encryption_values')),
+        sa.Column('transfer', sa.Enum(*IAX_TRANSFER_VALUES,
+                  name='iax_transfer_values')),
+        sa.Column('jitterbuffer', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('forcejitterbuffer', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('disallow', sa.String(200)),
         sa.Column('allow', sa.String(200)),
         sa.Column('codecpriority', sa.String(40)),
         sa.Column('qualify', sa.String(10)),
-        sa.Column('qualifysmoothing', sa.Enum(*YESNO_VALUES)),
+        sa.Column('qualifysmoothing',
+                  sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('qualifyfreqok', sa.String(10)),
         sa.Column('qualifyfreqnotok', sa.String(10)),
         sa.Column('timezone', sa.String(20)),
@@ -225,16 +253,25 @@
         sa.Column('serveremail', sa.String(80)),
         sa.Column('language', sa.String(20)),
         sa.Column('tz', sa.String(30)),
-        sa.Column('deletevoicemail', sa.Enum(*YESNO_VALUES)),
-        sa.Column('saycid', sa.Enum(*YESNO_VALUES)),
-        sa.Column('sendvoicemail', sa.Enum(*YESNO_VALUES)),
-        sa.Column('review', sa.Enum(*YESNO_VALUES)),
-        sa.Column('tempgreetwarn', sa.Enum(*YESNO_VALUES)),
-        sa.Column('operator', sa.Enum(*YESNO_VALUES)),
-        sa.Column('envelope', sa.Enum(*YESNO_VALUES)),
+        sa.Column('deletevoicemail', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('saycid', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('sendvoicemail', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('review', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('tempgreetwarn', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('operator', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('envelope', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('sayduration', sa.Integer),
-        sa.Column('forcename', sa.Enum(*YESNO_VALUES)),
-        sa.Column('forcegreetings', sa.Enum(*YESNO_VALUES)),
+        sa.Column('forcename', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
+        sa.Column('forcegreetings', sa.Enum(*YESNO_VALUES,
+                  name='yes_no_values')),
         sa.Column('callback', sa.String(80)),
         sa.Column('dialout', sa.String(80)),
         sa.Column('exitcontext', sa.String(80)),
@@ -249,7 +286,8 @@
     )
     op.create_index('voicemail_mailbox', 'voicemail', ['mailbox'])
     op.create_index('voicemail_context', 'voicemail', ['context'])
-    op.create_index('voicemail_mailbox_context', 'voicemail', ['mailbox', 'context'])
+    op.create_index('voicemail_mailbox_context', 'voicemail',
+                    ['mailbox', 'context'])
     op.create_index('voicemail_imapuser', 'voicemail', ['imapuser'])
 
     op.create_table(




More information about the asterisk-commits mailing list