Recently I setup a mysql database to support the sip.conf. I check some information in the voip-info.org. it should be res_mysql.conf existed, which is used to confiure to connect the remote mysql server.
I found that there is no file named this in my etc/asterisk/ directory but only res_odbc.conf. So is it necessary? if yes, then how can i get it?
[quote]You also need to define the following variables in the general section of sip.conf and iax.conf:
* dbname: Name of database in your Mysql server
* dbhost: Hostname of server
* dbuser: Username in MySQL
* dbpass: Password for user in MySQL
The following data is stored in the database:
* name: Name of peer (used in SIP registration)
* secret: Secret (password) stored in plaintext!
* context: Default context for incoming calls from user
* ipaddr: Default IP address of user
* port: Default port
[/quote]
As I understand. I don’t need to configure the res_mysql.conf also will work. is it ?
it there any hits for me that how to run this? for example, how many conf file I need to configure?
sorry for the cross-posting. I don’t know where should I post.
using make clean just for sure that clear up the last time install file. It seems that i need to install the mysql server and develop package before i install asterisk-addons package.
I had already setup the database name asterisk in the MYSQL server. and also insert one user in it. But it seems that it can’t connect the MYSQL server. What is wrong?[/quote]
acturlly I had open the debug in logger.conf. There is no complain.
And in the /var/log/asterisk/debug file there is a blank file …first time I want some complain.
I am sure that I can login the database. I gurant all the right to the “root” user. and I also try to command in other PC to connect the mysql server
(mysql -u root -h XXX.XXX.XXX -p) it can see all the database I created including the ‘asterisk’ I had used in the extconfig.conf file.
You must use plaintext password.
You must create DB for real time.
You must create all neccessary tables.
You must use user who have rights to use DB for real time.
what does it mean? as I only use the sip.conf=>mysql,asterisk,sip_test in the extconfig.conf file, so I believe the table I need in only sip_test, right?
You need to look at: voip-info.org/wiki/view/Aste … alTime+Sip
I mean you need to create databases and trables, ofcource if you haven’t already done it.
At link above you will see how to create tables for SIP pears/users/friends - and Asterisk will look there also, not onnly in sip.conf.
Same way you can proceed with iax.conf
extensions.conf - I have no experience using extensions from DB.
I have no idea. Actually I have follow the hits from the website you recommended.
If I use below lines in extconfig.conf. there is no complain like:WARNING[11508]: res_config_mysql.c:388 config_mysql: MySQL RealTime: Failed to query database. Check debug for more info.
When I using the same database to finish the CDR task. It works well.
I can check the the calling information from the database. so it means that my database works and also can connect to the asterisk, but why it can’t work for the SIP
I had a somewhat similar problem - CDR was working perfect but not RealTime even though they hade the same database settings. I discovered that RealTime needed the correct path to the MySQL socket while CDR didn’t. The default socket path in RealTime was set to /tmp/mysql.sock but the default socket path in MySQL wasn’t the same. After making changes in res_mysql.conf everything worked just fine.