Asterisk and MySQL

brotbackautomat
Joined: Fri 23 of Jul, 2010

Re: Asterisk and MySQL

Posted:Mon 26 of Jul, 2010 (05:59 UTC)
  • push*
brotbackautomat
Joined: Fri 23 of Jul, 2010

Asterisk and MySQL

Posted:Fri 23 of Jul, 2010 (08:47 UTC)
Hello Guys,

I've got an Asterisk on an opensuse10.2.
MySQL (and much other stuff) has been installed with xampp.
The asterisk-addon-package is also installed.
I want my Asterisk to communicate with the MySQL-DB, so my extension (out of a tutorial on this site):

exten => 173860,1,MYSQL(Connect connid localhost asterisk  Calllist) 
exten => 173860,2,MYSQL(Query resultid ${connid} INSERT\ INTO\ Calls_1\ SET\ ID=““\, Time=“1279778999“\, Caller="3376"\, Telephonee=“173890“)
exten => 173860,3,MYSQL(Clear ${resultid}) 
exten => 173860,4,MYSQL(Disconnect ${connid}) 
exten => 173860,5,Hangup


As you can see I have an user named 'asterisk' witch hasn't a password but full privilegs.

When I call the number asterisk "says":

-- Executing [173860@default:1] MYSQL("SIP/10.100.0.12-b69083a0", "Connect connid localhost asterisk Calllist") in new stack
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:234 aMYSQL_connect: mysql_real_connect(mysql,10.100.0.100,asterisk,dbp ass,Calllist,...) failed
-- Executing [173860@default:2] MYSQL("SIP/10.100.0.12-b69083a0", "Query resultid INSERT INTO Anrufe_1 SET ID=, Time=1279778999, Caller="3376", Telephonee=173890") in new stack
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:114 find_identifier: Identifier 0, identifier_type 1 not found in identifier list
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:284 aMYSQL_query: aMYSQL_query: Invalid connection identifier 0 passed in aMYSQL_query
-- Executing [173860@default:3] MYSQL("SIP/10.100.0.12-b69083a0", "Clear ") in new stack
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:114 find_identifier: Identifier 0, identifier_type 2 not found in identifier list
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:353 aMYSQL_clear: Invalid result identifier 0 passed in aMYSQL_clear
-- Executing [173860@default:4] MYSQL("SIP/10.100.0.12-b69083a0", "Disconnect ") in new stack
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:114 find_identifier: Identifier 0, identifier_type 1 not found in identifier list
[Jul 23 10:07:54] WARNING[4543]: app_addon_sql_mysql.c:370 aMYSQL_disconnect: Invalid connection identifier 0 passed in aMYSQL_disconnect
-- Executing [173860@default:5] Hangup("SIP/10.100.0.12-b69083a0", "") in new stack
== Spawn extension (default, 173860, 5) exited non-zero on 'SIP/10.100.0.12-b69083a0' 


I tried a lot but without success. Does anyone here has a solution for my problem?
Sorry for my englisch but I'm from germany so I've got an excuse :P