Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-24 Thread Dovid Bender
Maybe he is tryin to make it work. This is much better than the old Doug. 
Also if he needs features that currently dont exist maybe some one will 
create it and then we will all benefit from it :) .
- Original Message - 
From: Brian Capouch [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com

Sent: Thursday, August 24, 2006 12:43 AM
Subject: Re: [asterisk-users] Realtime Extensions -- Comments?



Douglas Garstang wrote:



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.


It doesn't seem like Asterisk is good enough for you Doug.

Switch to one of the competitors' products.

B.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-23 Thread Brian Capouch

Douglas Garstang wrote:



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. 



It doesn't seem like Asterisk is good enough for you Doug.

Switch to one of the competitors' products.

B.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
--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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
 -Original Message-
 From: Matthew Crocker [mailto:[EMAIL PROTECTED]
 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 extensions

That's the workaround I've implemented.
___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread simon elliston ball

note http://www.voip-info.org/wiki/view/Asterisk+RealTime+Extensions

comment from Philipp Dunkel.


On 22 Aug 2006, at 17:13, Douglas Garstang wrote:


-Original Message-
From: Jeremy McNamara [mailto:[EMAIL PROTECTED]
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.
___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Don

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 [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Aaron Daniel
On Tue, 2006-08-22 at 10:14 -0600, Douglas Garstang wrote:
  -Original Message-
  From: Jason Parker [mailto:[EMAIL PROTECTED]
  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 [EMAIL PROTECTED] 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 --

I think he meant a comments field, to describe the extension.  Asterisk
doesn't care about extra fields in the db, but it won't use them to it's
benefit unless it's programmed in.
-- 
Aaron Daniel
Computer Systems Technician
Sam Houston State University
[EMAIL PROTECTED]
(936) 294-4198

___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Jason Parker
- Douglas Garstang [EMAIL PROTECTED] wrote:
  -Original Message-
  From: Jason Parker [mailto:[EMAIL PROTECTED]
  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 [EMAIL PROTECTED] 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.

I guess I misunderstood what you meant by comments.  It appeared to be two 
unrelated questions.

-- 
Jason Parker
Digium

___
--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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
Yes, but that doesn't stop Asterisk from still treating that row as a valid 
extension.

 -Original Message-
 From: Don [mailto:[EMAIL PROTECTED]
 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 [EMAIL PROTECTED]
 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:[EMAIL PROTECTED]
  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 [EMAIL PROTECTED] 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
 
___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Denis Galvão - iSolve
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



___
--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


[asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Joe Dennick
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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread simon elliston ball
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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Aaron Daniel
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
[EMAIL PROTECTED]
(936) 294-4198

___
--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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
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:[EMAIL PROTECTED]
 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
 
___
--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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
Hi Simon.

I like this idea... works for me!

Douglas.

 -Original Message-
 From: simon elliston ball [mailto:[EMAIL PROTECTED]
 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
 
___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Jeremy McNamara

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
___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread simon elliston ball
no it doesn't. you could just change the context field for the  
extensions you wanted to comment out.


On 22 Aug 2006, at 16:11, Douglas Garstang wrote:

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:[EMAIL PROTECTED]
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


___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Jason Parker
- Douglas Garstang [EMAIL PROTECTED] 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.

That is, iirc..

-- 
Jason Parker
Digium

___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Matthew Crocker
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 extensions

--
Matthew S. Crocker
Vice President
Crocker Communications, Inc.
Internet Division
PO BOX 710
Greenfield, MA 01302-0710
http://www.crocker.com

___
--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


Re: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Matthew Crocker


Create a context 'suspended' that can *only* dial 911 then move  
extensions into that context.


Even if the customer doesn't pay their bill you *still* want them to  
be able to dial 911,  and probably your customer service number.  You  
could even create a dialplan in the context to send all other calls  
to a announcement (please pay your bill and your calls will go through).



On Aug 22, 2006, at 11:48 AM, simon elliston ball wrote:

no it doesn't. you could just change the context field for the  
extensions you wanted to comment out.


On 22 Aug 2006, at 16:11, Douglas Garstang wrote:

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:[EMAIL PROTECTED]
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


___
--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


--
Matthew S. Crocker
Vice President
Crocker Communications, Inc.
Internet Division
PO BOX 710
Greenfield, MA 01302-0710
http://www.crocker.com

___
--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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
 -Original Message-
 From: Jeremy McNamara [mailto:[EMAIL PROTECTED]
 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.
___
--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


RE: [asterisk-users] Realtime Extensions -- Comments?

2006-08-22 Thread Douglas Garstang
 -Original Message-
 From: Jason Parker [mailto:[EMAIL PROTECTED]
 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 [EMAIL PROTECTED] 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