Re: [Asterisk-Users] retrieve_sip_conf_from_mysql.pl data format

2004-02-29 Thread Olle E. Johansson
Fran Boon wrote:


Olle's chan_sip2 introduces a 3rd possibility:
Using templates  autocreate peers for the majority of user options 
storing just the passwords in the MYSQL database.
Combining this with MYSQL_FRIENDS, storing template= settings in a database
would be very powerful.
/O
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] retrieve_sip_conf_from_mysql.pl data format

2004-02-29 Thread Fran Boon
On Sun, 2004-02-29 at 09:18, Olle E. Johansson wrote:
  Olle's chan_sip2 introduces a 3rd possibility:
  Using templates  autocreate peers for the majority of user options 
  storing just the passwords in the MYSQL database.
 Combining this with MYSQL_FRIENDS, storing template= settings in a database
 would be very powerful.

funnily enough, the application I'm writing at the moment has template=
in the database :)
However, I still need more per-user settings than is possible with
MySQL_FRIENDS

My own list of things that I need storing per user:
extension
shortname (for a mapping.conf that redirects [EMAIL PROTECTED] to an
extension)
fullname (for CallerID)
email (for voicemail)
accountcode
pickupgroup
template
language
calldiversion
dnd

Note that mapping.conf  calldiversion/dnd need to modify files
#included within extensions.conf as well as the user definitions.
So I'd need a MYSQL_EXTENSIONS kind of functionality as well :/

All seems to be working nicely now, but I'm worried about getting time
to 'restart when convenient' on a busy system - users won't want their
calldiversion/dnd settings to only take effect overnight.

I guess I need to implement this with astdb instead of MySQL, since this
can be queried direct within the dialplan.
Would be lovely to have dbget/dbput routines for MySQL as well as just
db1!

Fran.

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] retrieve_sip_conf_from_mysql.pl data format

2004-02-29 Thread Olle E. Johansson
Fran Boon wrote:


I guess I need to implement this with astdb instead of MySQL, since this
can be queried direct within the dialplan.
Would be lovely to have dbget/dbput routines for MySQL as well as just
db1!
Brian was working on odbcget/put. I think there's a beta uploaded on his
web site.
/O
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] retrieve_sip_conf_from_mysql.pl data format

2004-02-28 Thread Fran Boon
On Fri, 2004-02-27 at 21:39, Chad Sawyer wrote:
 In the contrib/scripts directory I have been trying to figure out the
 format of the entries in the MySQL table.
-CUT-

There are 3 different approaches to storing users in a database.
The first is dynamic - the user details are read directly from the
database.
This is used for SIP  IAX friends  also for Voicemail:
http://voip-info.org/tiki-index.php?page=Asterisk+sip+mysql+peers
http://voip-info.org/tiki-index.php?page=Asterisk+voicemail+database
However the number of options supported by this 'MySQL friends' system
is currently very limited.

The other possibility is to store all the details in the database  when
changes are made, write out new versions of the conf files.
This is the approach taken by res_config:
http://voip-info.org/wiki-Asterisk+res_config
 also by the contrib scripts, such as:
retrieve_sip_conf_from_mysql.pl
Obviously, the disadvantage of such systems is that Asterisk needs to be
reloaded to see these changes, which can be disruptive to calls in
progress, or may never get the chance to happen 'when convenient' on a
busy system.

Olle's chan_sip2 introduces a 3rd possibility:
Using templates  autocreate peers for the majority of user options 
storing just the passwords in the MYSQL database.

For me, the ideal would be to hack the code to extend the functionality
of MySQL friends...however I'm not a C programmer.
I am currently starting work on the 2nd option since I want to expose as
many options within a web-based GUI as possible.
Any suggestions on how to minimise impact on the running system during
reload are welcome :)

Best Wishes,
Fran.

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] retrieve_sip_conf_from_mysql.pl data format

2004-02-28 Thread Fran Boon
On Fri, 2004-02-27 at 21:39, Chad Sawyer wrote:
 In the contrib/scripts directory I have been trying to figure out the
 format of the entries in the MySQL table.

It isn't at all obvious is it?
I've now worked out what it does  have written this up on the Wiki,
along with my previous post about database integration in general:

http://voip-info.org/tiki-index.php?page=Asterisk+sip+conf+from+mysql
http://voip-info.org/wiki-Asterisk+configuration+from+database

Now back to the task of getting a workable UI for my specific
situation's needs ;)

F

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] retrieve_sip_conf_from_mysql.pl data format

2004-02-27 Thread Chad Sawyer



In the contrib/scripts directory I have been trying 
to figure out the format of the entries in the MySQL table. I had seen 
several posts from a while back, but everyone seemed to understand what I am not 
getting.

The info in the file itself 
(retrieve_sip_conf_from_mysql.pl) says to make a very simple table with four 
fields, id, keyword, data, flags. However, there is also a sip-friends.sql 
file in the folder that makes a table that makes more sense to me. Hate to 
be stupid, but where do the individual accounts data go? I assume data, 
but what format?I enter in info just to see what is getting written, but 
it keeps telling me"no sip users defined".Maybe this info could be 
added to the wiki. It would be very nice to control sip users from a 
DB.


Chad