[Asterisk-Users] SIP peers in MySQL Database

harry gaillac gaillacharry at yahoo.fr
Wed Oct 13 03:00:19 MST 2004


Ok in order to add a conf file in sip.conf we need to
load app_realtime
harry

 --- Brian Wilkins <brian at hcc.net> a écrit : 
> I believe retrieving in real-time is being worked on
> and should be done soon. 
> Developers are almost finished working on RealTime.
> 
> include => sip_additional.conf in [general]
> 
> 
> On Tuesday 12 October 2004 05:26 pm, harry gaillac
> wrote:
> > hello Matthew,
> >
> > I was wrong -:) but retrieving all sip info from
> > database would be better than running a perl
> script on
> > every Asterisk box in order to rebuild a
> > sip_additionnal.conf.(??)
> >
> > so I have to create the table run the perl script
> in
> > order to create or overwrite a
> sip-additionnal.conf
> > but I don't understand "Go into sip.conf and add a
> > #include line for this new file."
> >
> > You mean i have to add
> > include /etc/asterisk/sip-additionnal.conf in
> sip.conf
> >
> > [general]
> > context=default
> > ;recordhistory=yes
> > ...
> > include /etc/asterisk/sip-additionnal.conf
> >
> > How do you update many pbx ? crontab ?
> >
> > Best regards
> > Harry
> >
> > NB: everybody should be able to find a full
> > documentation about Asterisk features not in
> mailing
> > list.
> > I look at voip-info.
> >
> >  --- Matthew Boehm <mboehm at cytelcom.com> a écrit :
> > > Yes you are wrong. You seem to be combining two
> > > different methods of getting
> > > SIP info out of a database. Pick 1. I use the
> perl
> > > script right now so here
> > > is how to do that:
> > >
> > > In order to use the perl script which can
> support
> > > 'ALL' sip abilities, use
> > > this table:
> > >
> > >   CREATE TABLE sip_perl (
> > >         id INT(11) DEFAULT -1 NOT NULL,
> > >         keyword VARCHAR(20) NOT NULL,
> > >         data VARCHAR(50) NOT NULL,
> > >         flags INT(1) DEFAULT 0 NOT NULL,
> > >         PRIMARY KEY (id,keyword)
> > >   );
> > >
> > > Then, insert a new row for each sip parameter
> > > keeping the 'id' the same for
> > > each phone:
> > >
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'account', '3038', 0);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'callerid', '"Cytel" <2814494000>', 1);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'nat', 'yes', 0);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'context', 'cytel-internal', 0);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'type', 'friend', 0);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'mailbox', '3038 at cytel', 0);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'secret', '3038joshdana', 0);
> > > INSERT INTO `sip_perl` (`id`, `keyword`, `DATA`,
> > > `flags`) VALUES (3038,
> > > 'host', 'dynamic', 0);
> > >
> > > Edit the perl script to match. Then run the perl
> > > script. It should
> > > create/overwrite whatever file you set in it and
> > > produce a new .conf
> > >
> > > Go into sip.conf and add a #include line for
> this
> > > new file.
> > >
> > > Matthew
> > >
> > > ----- Original Message -----
> > > From: "harry gaillac" <gaillacharry at yahoo.fr>
> > > To: "Asterisk Users Mailing List -
> Non-Commercial
> > > Discussion"
> > > <asterisk-users at lists.digium.com>
> > > Sent: Monday, October 11, 2004 6:42 PM
> > > Subject: Re: [Asterisk-Users] SIP peers in MySQL
> > > Database
> > >
> > > > I read the perl script.
> > > > here is table structure for table `sipfriends`
> > > >
> > > > CREATE TABLE `sipfriends` (
> > > >   `name` varchar(40) NOT NULL default '',
> > > >   `secret` varchar(40) NOT NULL default '',
> > > >   `context` varchar(40) NOT NULL default '',
> > > >   `username` varchar(40) default '',
> > > >   `ipaddr` varchar(20) NOT NULL default '',
> > > >   `port` int(6) NOT NULL default '0',
> > > >   `regseconds` int(11) NOT NULL default '0',
> > > >   PRIMARY KEY  (`name`)
> > > > ) TYPE=MyISAM;
> > > >
> > > > I would like asterisk retrieve all sipfriends
> > > > variables
> > > > from database.
> > > >
> > > > I wish to add other variables for each sip
> clients
> > > > like qualify, nat, ... in sipfriends table but
> sip
> > > > code channel don't seem to be able to support
> > >
> > > others
> > >
> > > > variables.
> > > > may be i'm wrong ?
> > > >
> > > > best regards
> > > > harry
> > > >
> > > >  --- Matthew Boehm <mboehm at cytelcom.com> a
> écrit :
> > > > > It is possible to use 1 database for many
> > >
> > > asterisk
> > >
> > > > > boxes. You can do this
> > > > > with the retreive script I mentioned. By
> adding
> > > > > another column to the
> > > > > database to indicate which * server that
> phone
> > > > > belongs to, you can easialy
> > > > > change the script on a per machine basis.
> > > > >
> > > > > Matthew
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "harry gaillac"
> <gaillacharry at yahoo.fr>
> > > > > To: "Asterisk Users Mailing List -
> > >
> > > Non-Commercial
> > >
> > > > > Discussion"
> > > > > <asterisk-users at lists.digium.com>
> > > > > Sent: Monday, October 11, 2004 12:00 PM
> > > > > Subject: Re: [Asterisk-Users] SIP peers in
> MySQL
> > > > > Database
> > > > >
> > > > > > I agree you users from asterisk list don't
> > >
> > > have to
> > >
> > > > > > give  me "FREE SUPPORT" the day after I
> posted
> > >
> > > a
> > >
> > > > > > question .
> > > > > >
> > > > > > I was thinking many users are used to
> register
> > >
> > > sip
> > >
> > > > > > clients in sql database not one sip.conf
> per
> > > > >
> > > > > Asterisk
> > > > >
> > > > > > pbx box .
> 
=== message truncated === 


	

	
		
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



More information about the asterisk-users mailing list