[Asterisk-Users] how can setup mysql in sip.conf?

Matthew Boehm mboehm at cytelcom.com
Tue Jan 4 08:19:24 MST 2005


OK. You need to understand that "retrieve_sip_conf_from_mysql.pl" is a Perl
script and needs to be run outside of the sip.conf file.

Edit the script and put back the -T. Also edit the script to save to a
different file. Change it to "sip_additional.conf".

Now run the script. It will connect to your database and create a new file
"sip_additional.conf" with all your sip peers/users in it.

Now go into sip.conf and add "#include sip_friends.conf"

issue a 'sip reload' in asterisk and *bam* ur done.

-Matthew

----- Original Message ----- 
From: "Thomas Hoellriegel" <admin at blindi.net>
To: "Thomas Hoellriegel" <admin at blindi.net>; "Asterisk Users Mailing List -
Non-Commercial Discussion" <asterisk-users at lists.digium.com>
Sent: Monday, January 03, 2005 4:06 PM
Subject: [Asterisk-Users] how can setup mysql in sip.conf?


Hi, i have a problem:
asterisk 1.0.3 is my current version.
 i copy from asterisk-sources:
 contrib/scripts/retrieve_sip_conf_from_mysql.pl
 in my /usr/asterisk/etc/asterisk directory. I edit this script and remove
-T -option
#!/usr/bin/perl -w
 i create the  mysql database:
 mysqladmin create sip
 i pasted the example-table in the database:
    CREATE TABLE sip (
    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)
    );
i settingup res_odbc.conf  as follows:
[mysql]
dsn => sip
username => root
password =>
pre-connect => yes

 i add the following line in the sip.conf file:
 #include = "retrieve_sip_conf_from_mysql.pl"
Asterisk is started with: -vvvvc
the  asterisk output is:
   == Parsing '/usr/asterisk/etc/asterisk/sip.conf': Found
   == Parsing '/usr/asterisk/etc/asterisk/=
 retrieve_sip_conf_from_mysql.pl': Not
  found (No such file or directory)
why can't find asterisk the perl-script?

 mysql authentification  is not working in asterisk.
 what can i do please?
mysql and the template-database are success installed.
thankx for your help.

---------------
tel : 089 2500 7676
homepage: http://www.blindi.net
blinde-misc mailingliste für blinde. anmeldung unter:
http://www.blindi.net/mailman/listinfo/blinde-misc

_______________________________________________
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