[asterisk-bugs] [Asterisk 0014481]: ODBC-based function crashes Asterisk

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Feb 19 13:21:42 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14481 
====================================================================== 
Reported By:                lmsteffan
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   14481
Category:                   Functions/func_odbc
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 176019 
Request Review:              
====================================================================== 
Date Submitted:             2009-02-16 00:01 CST
Last Modified:              2009-02-19 13:21 CST
====================================================================== 
Summary:                    ODBC-based function crashes Asterisk
Description: 
I have defined a simple function in func_odbc.conf to read (SELECT) one
value from MySQL database. It works the first time, and crashes very soon
after, sometimes as soon as the next invocation.

The CLI command that I use is "odbc read MY_FUNCTION arg1 exec".

====================================================================== 

---------------------------------------------------------------------- 
 (0100396) Corydon76 (administrator) - 2009-02-19 13:21
 http://bugs.digium.com/view.php?id=14481#c100396 
---------------------------------------------------------------------- 
Works for me:

res_odbc.conf:
[asterisk]
enabled => yes
dsn => mysql-asterisk
username => root
;password => mypass
pre-connect => yes
idlecheck => 3600
share_connections => no
limit => 3


*CLI> odbc read ODBC_SIPPEERS vidphone exec
fullcontact           sip:vidphone at 192.168.69.71:506
useragent             Grandstream GXV3000 1.1.3.8
Returned 1 row.  Query executed on handle 0 [asterisk]
       > Saved useragent "Grandstream GXV3000 1.1.3.8" for peer vidphone
*CLI> core show function ODBC_SIPPEERS

  -= Info about function 'ODBC_SIPPEERS' =-

[Synopsis]
Runs the referenced query with the specified arguments

[Description]
Runs the following query, as defined in func_odbc.conf, performing
substitution of the arguments into the query as specified by ${ARG1},
${ARG2}, ... ${ARGn}.  This function may only be read, not set.

SQL:
SELECT fullcontact,useragent FROM sipfriends WHERE name='${ARG1}'


[Syntax]
ODBC_SIPPEERS(<arg1>[...[,<argN>]])

[Arguments]
Not available

[See Also]
Not available
*CLI> 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-19 13:21 Corydon76      Note Added: 0100396                          
======================================================================




More information about the asterisk-bugs mailing list