The unofficial docs on the voip wiki for the realtime extensions table structure is: CREATE TABLE `extensions_table` ( `id` int(11) NOT NULL auto_increment, `context` varchar(20) NOT NULL default '', `exten` varchar(20) NOT NULL default '', `priority` tinyint(4) NOT NULL default '0', `app` varchar(20) NOT NULL default '', `appdata` varchar(128) NOT NULL default '', PRIMARY KEY (`context`,`exten`,`priority`), KEY `id` (`id`) ) TYPE=MyISAM; Uhm... what abouts comments? What if I wanted to temporarily deactivate a couple of extensions? Without a comment flag, I'd have to completely remove those entries from the extensions table! That's not very friendly is it... Is there a better way? Doug.
Actually, you could just change to context. If a context isn't established in the extensions.conf file, it won't every be included in the dial-plan. As such, if you change the context on some realtime entries, they won't be included in the dial-plan. Later, all you have to do is change the context back with a simple SQL UPDATE statement. Douglas Garstang wrote:>The unofficial docs on the voip wiki for the realtime extensions table structure is: > >CREATE TABLE `extensions_table` ( > `id` int(11) NOT NULL auto_increment, > `context` varchar(20) NOT NULL default '', > `exten` varchar(20) NOT NULL default '', > `priority` tinyint(4) NOT NULL default '0', > `app` varchar(20) NOT NULL default '', > `appdata` varchar(128) NOT NULL default '', > PRIMARY KEY (`context`,`exten`,`priority`), > KEY `id` (`id`) >) TYPE=MyISAM; > >Uhm... what abouts comments? What if I wanted to temporarily deactivate a couple of extensions? Without a comment flag, I'd have to completely remove those entries from the extensions table! That's not very friendly is it... Is there a better way? > >Doug. >_______________________________________________ >--Bandwidth and Colocation provided by Easynews.com -- > >asterisk-users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
simon elliston ball
2006-Aug-22 07:46 UTC
[asterisk-users] Realtime Extensions -- Comments?
I use a view as the extensions table allowing you to add flags to your source table which can be filtered out in the view. The view also allows me to store users in an easier to handle way for our web app (eg, a users/extension numbers table, device table, phone models table for default sip settings) which are then joined together in various ways to produce views for the extensions and a sipdevices. Simon On 22 Aug 2006, at 15:20, Douglas Garstang wrote:> The unofficial docs on the voip wiki for the realtime extensions > table structure is: > > CREATE TABLE `extensions_table` ( > `id` int(11) NOT NULL auto_increment, > `context` varchar(20) NOT NULL default '', > `exten` varchar(20) NOT NULL default '', > `priority` tinyint(4) NOT NULL default '0', > `app` varchar(20) NOT NULL default '', > `appdata` varchar(128) NOT NULL default '', > PRIMARY KEY (`context`,`exten`,`priority`), > KEY `id` (`id`) > ) TYPE=MyISAM; > > Uhm... what abouts comments? What if I wanted to temporarily > deactivate a couple of extensions? Without a comment flag, I'd have > to completely remove those entries from the extensions table! > That's not very friendly is it... Is there a better way? > > Doug. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Just a thought, but try putting a ; in the exten field before the extension... then asterisk won't match any extensions with it, and it'll effectively become commented. Don't know if it'll work, but from looking at the code and the table structure, it shouldn't break anything. On Tue, 2006-08-22 at 08:20 -0600, Douglas Garstang wrote:> The unofficial docs on the voip wiki for the realtime extensions table structure is: > > CREATE TABLE `extensions_table` ( > `id` int(11) NOT NULL auto_increment, > `context` varchar(20) NOT NULL default '', > `exten` varchar(20) NOT NULL default '', > `priority` tinyint(4) NOT NULL default '0', > `app` varchar(20) NOT NULL default '', > `appdata` varchar(128) NOT NULL default '', > PRIMARY KEY (`context`,`exten`,`priority`), > KEY `id` (`id`) > ) TYPE=MyISAM; > > Uhm... what abouts comments? What if I wanted to temporarily deactivate a couple of extensions? Without a comment flag, I'd have to completely remove those entries from the extensions table! That's not very friendly is it... Is there a better way? > > Doug. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Aaron Daniel Computer Systems Technician Sam Houston State University amdtech@shsu.edu (936) 294-4198
Thanks, but that means I'd have to effectively comment out every extension in that context, which isn't very feesible.> -----Original Message----- > From: Joe Dennick [mailto:joe@dennick.net] > Sent: Tuesday, August 22, 2006 8:46 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > Actually, you could just change to context. If a context isn't > established in the extensions.conf file, it won't every be > included in > the dial-plan. As such, if you change the context on some realtime > entries, they won't be included in the dial-plan. Later, all > you have > to do is change the context back with a simple SQL UPDATE statement. > > Douglas Garstang wrote: > > >The unofficial docs on the voip wiki for the realtime > extensions table structure is: > > > >CREATE TABLE `extensions_table` ( > > `id` int(11) NOT NULL auto_increment, > > `context` varchar(20) NOT NULL default '', > > `exten` varchar(20) NOT NULL default '', > > `priority` tinyint(4) NOT NULL default '0', > > `app` varchar(20) NOT NULL default '', > > `appdata` varchar(128) NOT NULL default '', > > PRIMARY KEY (`context`,`exten`,`priority`), > > KEY `id` (`id`) > >) TYPE=MyISAM; > > > >Uhm... what abouts comments? What if I wanted to temporarily > deactivate a couple of extensions? Without a comment flag, > I'd have to completely remove those entries from the > extensions table! That's not very friendly is it... Is there > a better way? > > > >Doug. > >_______________________________________________ > >--Bandwidth and Colocation provided by Easynews.com -- > > > >asterisk-users mailing list > >To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Hi Simon. I like this idea... works for me! Douglas.> -----Original Message----- > From: simon elliston ball [mailto:simon@simonellistonball.com] > Sent: Tuesday, August 22, 2006 8:47 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > I use a view as the extensions table allowing you to add flags to > your source table which can be filtered out in the view. > > The view also allows me to store users in an easier to handle > way for > our web app (eg, a users/extension numbers table, device > table, phone > models table for default sip settings) which are then joined > together > in various ways to produce views for the extensions and a sipdevices. > > Simon > > On 22 Aug 2006, at 15:20, Douglas Garstang wrote: > > > The unofficial docs on the voip wiki for the realtime extensions > > table structure is: > > > > CREATE TABLE `extensions_table` ( > > `id` int(11) NOT NULL auto_increment, > > `context` varchar(20) NOT NULL default '', > > `exten` varchar(20) NOT NULL default '', > > `priority` tinyint(4) NOT NULL default '0', > > `app` varchar(20) NOT NULL default '', > > `appdata` varchar(128) NOT NULL default '', > > PRIMARY KEY (`context`,`exten`,`priority`), > > KEY `id` (`id`) > > ) TYPE=MyISAM; > > > > Uhm... what abouts comments? What if I wanted to temporarily > > deactivate a couple of extensions? Without a comment flag, > I'd have > > to completely remove those entries from the extensions table! > > That's not very friendly is it... Is there a better way? > > > > Doug. > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > asterisk-users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Douglas Garstang wrote:> Uhm... what abouts comments? What if I wanted to temporarily deactivate a couple of extensions? Without a comment flag, I'd have to completely remove those entries from the extensions table! That's not very friendly is it... Is there a better way?Yes, DON'T USE REALTIME! Jeremy McNamara
----- Douglas Garstang <dgarstang@oneeighty.com> wrote:> The unofficial docs on the voip wiki for the realtime extensions table > structure is: > > CREATE TABLE `extensions_table` ( > `id` int(11) NOT NULL auto_increment, > `context` varchar(20) NOT NULL default '', > `exten` varchar(20) NOT NULL default '', > `priority` tinyint(4) NOT NULL default '0', > `app` varchar(20) NOT NULL default '', > `appdata` varchar(128) NOT NULL default '', > PRIMARY KEY (`context`,`exten`,`priority`), > KEY `id` (`id`) > ) TYPE=MyISAM; > > Uhm... what abouts comments? What if I wanted to temporarily > deactivate a couple of extensions? Without a comment flag, I'd have to > completely remove those entries from the extensions table! That's not > very friendly is it... Is there a better way? > > Doug. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-usersI cheated, and just added a comments field to the table. Asterisk only reads fields by name, so extra columns don't hurt at all. That is, iirc.. -- Jason Parker Digium
> -----Original Message----- > From: Jeremy McNamara [mailto:jj@nufone.net] > Sent: Tuesday, August 22, 2006 9:45 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > Douglas Garstang wrote: > > Uhm... what abouts comments? What if I wanted to > temporarily deactivate a couple of extensions? Without a > comment flag, I'd have to completely remove those entries > from the extensions table! That's not very friendly is it... > Is there a better way? > > > Yes, DON'T USE REALTIME!I wish it was that easy. We started looking at realtime again, because the option of building the config files with a script querying the database became daunting. It doesn't matter where you turn in Asterisk, there's gotcha's. For example, you can't put the hint stuff into realtime, and there's no inherint way to comment extensions. Doug.
> -----Original Message----- > From: Jason Parker [mailto:jparker@digium.com] > Sent: Tuesday, August 22, 2006 9:57 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > ----- Douglas Garstang <dgarstang@oneeighty.com> wrote: > > The unofficial docs on the voip wiki for the realtime > extensions table > > structure is: > > > > CREATE TABLE `extensions_table` ( > > `id` int(11) NOT NULL auto_increment, > > `context` varchar(20) NOT NULL default '', > > `exten` varchar(20) NOT NULL default '', > > `priority` tinyint(4) NOT NULL default '0', > > `app` varchar(20) NOT NULL default '', > > `appdata` varchar(128) NOT NULL default '', > > PRIMARY KEY (`context`,`exten`,`priority`), > > KEY `id` (`id`) > > ) TYPE=MyISAM; > > > > Uhm... what abouts comments? What if I wanted to temporarily > > deactivate a couple of extensions? Without a comment flag, > I'd have to > > completely remove those entries from the extensions table! > That's not > > very friendly is it... Is there a better way? > > > > Doug. > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > asterisk-users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > I cheated, and just added a comments field to the table. > Asterisk only reads fields by name, so extra columns don't > hurt at all.How did an extra field that Asterisk doesn't know anything about, change it's behaviour? Doug.
> -----Original Message----- > From: Matthew Crocker [mailto:matthew@crocker.com] > Sent: Tuesday, August 22, 2006 10:03 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > Add a boolean field to the table then create a view based on the > value of that field > > >>> CREATE TABLE `extensions_table_data` ( > >>> `id` int(11) NOT NULL auto_increment, > 'isActive' boolean NOT NULL default 'True', > >>> `context` varchar(20) NOT NULL default '', > >>> `exten` varchar(20) NOT NULL default '', > >>> `priority` tinyint(4) NOT NULL default '0', > >>> `app` varchar(20) NOT NULL default '', > >>> `appdata` varchar(128) NOT NULL default '', > >>> PRIMARY KEY (`context`,`exten`,`priority`), > >>> KEY `id` (`id`) > >>> ) TYPE=MyISAM; > >>> > >>> Uhm... what abouts comments? What if I wanted to temporarily > >>> deactivate a couple of extensions? Without a comment flag, > >> I'd have > >>> to completely remove those entries from the extensions table! > >>> That's not very friendly is it... Is there a better way? > > Then > > Create view extensions_table as SELECT > id,context,exten,priority,app,appdata from extensions_table_data > where IsActive = True; > > Then you can just flip the IsActive bit on/off to remove extensionsThat's the workaround I've implemented.
Yes, but that doesn't stop Asterisk from still treating that row as a valid extension.> -----Original Message----- > From: Don [mailto:sales@xwebfactor.com] > Sent: Tuesday, August 22, 2006 10:38 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > He meant he added another column in the database table... > In the asterisk source everything database related for the > default database > stuff is explicitly named... > Like INSERT INTO blah(col1,col2,col3) Values(foo,foo,foo) > > ----- Original Message ----- > From: "Douglas Garstang" <dgarstang@oneeighty.com> > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > <asterisk-users@lists.digium.com> > Sent: Tuesday, August 22, 2006 12:14 PM > Subject: RE: [asterisk-users] Realtime Extensions -- Comments? > > > >> -----Original Message----- > >> From: Jason Parker [mailto:jparker@digium.com] > >> Sent: Tuesday, August 22, 2006 9:57 AM > >> To: Asterisk Users Mailing List - Non-Commercial Discussion > >> Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > >> > >> > >> ----- Douglas Garstang <dgarstang@oneeighty.com> wrote: > >> > The unofficial docs on the voip wiki for the realtime > >> extensions table > >> > structure is: > >> > > >> > CREATE TABLE `extensions_table` ( > >> > `id` int(11) NOT NULL auto_increment, > >> > `context` varchar(20) NOT NULL default '', > >> > `exten` varchar(20) NOT NULL default '', > >> > `priority` tinyint(4) NOT NULL default '0', > >> > `app` varchar(20) NOT NULL default '', > >> > `appdata` varchar(128) NOT NULL default '', > >> > PRIMARY KEY (`context`,`exten`,`priority`), > >> > KEY `id` (`id`) > >> > ) TYPE=MyISAM; > >> > > >> > Uhm... what abouts comments? What if I wanted to temporarily > >> > deactivate a couple of extensions? Without a comment flag, > >> I'd have to > >> > completely remove those entries from the extensions table! > >> That's not > >> > very friendly is it... Is there a better way? > >> > > >> > Doug. > >> > _______________________________________________ > >> > --Bandwidth and Colocation provided by Easynews.com -- > >> > > >> > asterisk-users mailing list > >> > To UNSUBSCRIBE or update options visit: > >> > http://lists.digium.com/mailman/listinfo/asterisk-users > >> > >> I cheated, and just added a comments field to the table. > >> Asterisk only reads fields by name, so extra columns don't > >> hurt at all. > > > > How did an extra field that Asterisk doesn't know anything > about, change > > it's behaviour? > > > > Doug. > > > > > -------------------------------------------------------------- > ------------------ > > > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > asterisk-users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > -------------------------------------------------------------- > ------------------ > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.11.5/425 - Release > Date: 8/22/2006 > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Denis Galvão - iSolve
2006-Aug-22 12:50 UTC
[asterisk-users] Realtime Extensions -- Comments?
Im not sure, but there is a "commented" column that could have 0(not commented) or 1(commented) as values. Is this right? P.S.: I got it from voip--info.org on the realtime Static page... D e n i s G a l v ? o iSolve - Solve Is Our Business Av. Candido de Abreu, 526 1610A CEP: 80530-000 - Curitiba - PR +55 41 3252-2977 r 101 http://www.isolve.com.br On 22 de ago de 2006, at 11:20, Douglas Garstang wrote:> The unofficial docs on the voip wiki for the realtime extensions > table structure is: > > CREATE TABLE `extensions_table` ( > `id` int(11) NOT NULL auto_increment, > `context` varchar(20) NOT NULL default '', > `exten` varchar(20) NOT NULL default '', > `priority` tinyint(4) NOT NULL default '0', > `app` varchar(20) NOT NULL default '', > `appdata` varchar(128) NOT NULL default '', > PRIMARY KEY (`context`,`exten`,`priority`), > KEY `id` (`id`) > ) TYPE=MyISAM; > > Uhm... what abouts comments? What if I wanted to temporarily > deactivate a couple of extensions? Without a comment flag, I'd have > to completely remove those entries from the extensions table! > That's not very friendly is it... Is there a better way? > > Doug. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >