[asterisk-users] UPDATE !! Spontaneous reboots on asterisk 1.6.2.11

Jonas Kellens jonas.kellens at telenet.be
Wed Sep 15 09:15:47 CDT 2010


On 09/15/2010 03:47 PM, Zeeshan Zakaria wrote:
>
> Hi,
>
> I went over your dialplan and though it looks fine at first glance, 
> but because I have no experience with Asterisk 1.6, so I would like to 
> ask if commas in mysql query are ok without escape character? In my 
> asterisk 1.4 I would type it like:
>
> SELECT var1\, var2\, var3 FROM ...
>
> Other things which come to mind:
>
> 1. Is your MySQL up to date?
> 2. Software versions on your test system are the same as on the 
> production system?
> 3. Can you post a MySQL query from your dialplan which works fine.
>
> Regards,
>
> Zeeshan A Zakaria
>

Indeed the mysql queries on asterisk 1.4 need escape characters. But 
when upgrading to 1.6, I noticed that these were misinterpreted. So I 
dropped them...

Point 1

Mysql :

mysql> status
--------------
mysql  Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (x86_64) using 
readline 5.1

Connection id:        2314
Current database:
Current user:        root at localhost
SSL:            Not in use
Current pager:        stdout
Using outfile:        ''
Using delimiter:    ;
Server version:        5.0.77 Source distribution
Protocol version:    10
Connection:        Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:        /var/lib/mysql/mysql.sock
Uptime:            5 hours 51 min 17 sec

Threads: 3  Questions: 238036  Slow queries: 0  Opens: 51  Flush tables: 
1  Open tables: 42  Queries per second avg: 11.294

Point 2

Asterisk is the same version (compiled from source)
CentOS is the same version, php is the same version, mysql is the same 
version (yum update)

!!! one difference : x64 (x86_64 x86_64 x86_64 GNU/Linux) on production 
system, and x86 (i686 i686 i386 GNU/Linux) on test environment !!!

Point 3

Mysql from dialplan that works :

[macro-QueryAstDB]
exten => s,1,MYSQL(Connect connid localhost username passwd AsteriskHosted)
exten => s,n,MYSQL(Query resultid ${connid} SELECT KNUMMER , vmcontext , 
accountcode_out , hostedformule , mohclass FROM AstDB where klantID=${ARG1})
exten => s,n,MYSQL(Fetch fetchid ${resultid} KNUMMER VMCONTEXT ACCOUT 
FORMULE MOHCLASS)
exten => s,n,NoOp(knummer = ${KNUMMER} vmcontext = ${VMCONTEXT} 
accountcode_out = ${ACCOUT} hostedformule = ${FORMULE} mohclass = 
${MOHCLASS})
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,MacroExit()



Thanks !

Jonas.



More information about the asterisk-users mailing list