[Asterisk-Users] SIP peers in MySQL Database
Matthew Boehm
mboehm at cytelcom.com
Mon Oct 11 14:47:12 MST 2004
res_config stores an entire *.conf file into a table. This is known as
'static' under the new RealTime method. The load_realtime and
update_realtime methods will select info from a table where each column is a
possible field in the conf file. For example, if a section of your sip.conf
file looked like this:
[bob]
hostname=dynamic
nat=yes
type=user
Then your associated sip table would have at least the following columns: (I
say at least because my sip table has over 30 columns, 1 for each possible
sip configuration)
name
hostname
nat
type
Look at docs/README.extconfig for more examples.
If you REALLY want to start messing with it now, the only 'official' driver
for RealTime is for ODBC. The only 'known' MySQL RealTime driver was written
by myself over the weekend. Find it here:
http://bugs.digium.com/bug_view_page.php?bug_id=0002613
I say 'known' because nobody else has claimed responsibility for
writing/creating one for MySQL. Hopefully, I am now that person. =)
If you use it, please pass on any bugs, and/or successes to me off list.
Thanks,
Matthew
----- Original Message -----
From: "Michael Baird" <mike at tc3net.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Monday, October 11, 2004 3:54 PM
Subject: Re: [Asterisk-Users] SIP peers in MySQL Database
> Matthew, will the new method for dynamic storage of sip peers be based
> on res_config? Or will it be some new method, is there anything I can
> look at to start researching it yet?
>
> Regards
> Michael Baird
>
> > You have obviously never posted to any kind of mailing list before.
> > Sometimes you may have to wait a few days for someone to answer you.
> > Sometimes people just don't know. Griping to the owners of the list
about
> > the people who take time out of their day to give you FREE support isn't
> > going to make things better nor will it make you popular nor will you
get a
> > faster response (if any).
> >
> > As long as the database can be accessed by the asterisk server, then you
can
> > store sip info into that database. You should not need to use
autocreate. If
> > you don't need immediate, uptodate, realtime sip configuration, look in
> > <ASTERISK SOURCE ROOT>/contrib/scripts/ for something called
> > retreive_sip_from_mysql.pl or something like that. That is what I use.
> >
> > Or you can be patient and the new RealTime method should be in stable
form
> > in a week or two.
> >
> > Matthew
> >
> > ----- Original Message -----
> > From: "harry gaillac" <gaillacharry at yahoo.fr>
> > To: <support at digium.com>
> > Cc: <asterisk-users at lists.digium.com>
> > Sent: Monday, October 11, 2004 10:01 AM
> > Subject: [Asterisk-Users] SIP peers in MySQL Database
> >
> >
> > > hello,
> > >
> > > I wrote to asterisk-users at lists.digium.com in order to
> > > someone help me without reply ?????
> > >
> > > May be you could help me
> > >
> > > Here is my problem.Two smalls offices with sip clients
> > >
> > > + Asterisk, one offices with Asterisk and mysql
> > > database.
> > > I would like to define all sip peers in mysql database
> > > so Asterisk from small office could read sip peers
> > > configuration from database office.
> > >
> > > May I use autocreatepeer in all asterisk sip.conf file
> > > with nat=yes in general option ?
> > >
> > > Regards
> > > Harry
> > >
> > > [general]
> > > dbname= Name of database in your Mysql server
> > > dbhost= Hostname of server
> > > dbuser= Username in MySQL
> > > dbpass= Password for user in MySQL
> > > autocreatepeer=yes
> > > nat=yes
> > > ....
> > > ----------- ------------------
> > > |Asterisk |-- |nat/firewall box |
> > > ----------- ------------------
> > > |
> > > |
> > > ------------ ------------------
> > > | Internet |-- |nat/firewall box|-Asterisk
> > >
> > > ------------ ------------------ +
> > > | SIPpeers in
> > > | mysql database
> > >
> > > ----------- ------------------
> > > |Asterisk |-- |nat/firewall box |
> > > ----------- ------------------
> > >
> > >
> > >
> > >
> > >
> > >
> > > Vous manquez d'espace pour stocker vos mails ?
> > > Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
> > > Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
> > >
> > > Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les
nouveautés
> > pour dialoguer instantanément avec vos amis. A télécharger gratuitement
sur
> > http://fr.messenger.yahoo.com
> > > _______________________________________________
> > > Asterisk-Users mailing list
> > > Asterisk-Users at lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> > > To UNSUBSCRIBE or update options visit:
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-user
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list