[asterisk-bugs] [Asterisk 0010752]: macro defined in realtime that uses cmd MYSQL fails to connect

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Sep 22 14:38:19 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10752 
====================================================================== 
Reported By:                bferrell
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10752
Category:                   PBX/pbx_realtime
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-18-2007 00:18 CDT
Last Modified:              09-22-2007 14:38 CDT
====================================================================== 
Summary:                    macro defined in realtime that uses cmd MYSQL fails
to connect
Description: 
MYSQL(Connect connid hostid xxxxx '' asterisk)

works in a macro defined in extensions.conf.

When the macro is defined in realtime it fails to connect
====================================================================== 

---------------------------------------------------------------------- 
 bferrell - 09-22-07 14:38  
---------------------------------------------------------------------- 
-- Executing Macro("SIP/00-16-cb-92-dc-92-b5e13388", "set-out-cid-pbx")
    -- Executing MYSQL("SIP/00-16-cb-92-dc-92-b5e13388", "Connect connid
dbhost root '' asterisk")
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:234 aMYSQL_connect:
mysql_real_connect(mysql,dbhost,root,dbpass,asterisk,...) failed
    -- Executing MYSQL("SIP/00-16-cb-92-dc-92-b5e13388", "Query resultid 
select did from call_xlatn where ext='00-16-cb-92-dc-92'")
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:114
find_identifier: Identifier 0, identifier_type 1 not found in identifier
list
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:284 aMYSQL_query:
aMYSQL_query: Invalid connection identifier 0 passed in aMYSQL_query
    -- Executing MYSQL("SIP/00-16-cb-92-dc-92-b5e13388", "Fetch fetchid 
datavar")
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:114
find_identifier: Identifier 0, identifier_type 2 not found in identifier
list
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:335 aMYSQL_fetch:
aMYSQL_fetch: Invalid result identifier 0 passed
    -- Executing MYSQL("SIP/00-16-cb-92-dc-92-b5e13388", "Disconnect ")
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:114
find_identifier: Identifier 0, identifier_type 1 not found in identifier
list
[Sep 22 19:52:45] WARNING[9969]: app_addon_sql_mysql.c:370
aMYSQL_disconnect: Invalid connection identifier 0 passed in
aMYSQL_disconnect
    -- Executing Set("SIP/00-16-cb-92-dc-92-b5e13388", "Disconnect ")
[Sep 22 19:52:45] WARNING[9969]: pbx.c:5870 pbx_builtin_setvar: Ignoring
entry 'Disconnect ' with no = (and not last 'options' entry)
    -- Executing Set("SIP/00-16-cb-92-dc-92-b5e13388", "(CALLERID(all)=")
[Sep 22 19:52:45] ERROR[9969]: pbx.c:1537 ast_func_write: Function  not
registered
    -- Executing Set("SIP/00-16-cb-92-dc-92-b5e13388",
"CDR(userfield)=00-16-cb-92-dc-92")
    -- Executing Set("SIP/00-16-cb-92-dc-92-b5e13388", "ext=15103933344")
    -- Executing Macro("SIP/00-16-cb-92-dc-92-b5e13388", "RNK-out")
    -- Executing Dial("SIP/00-16-cb-92-dc-92-b5e13388",
"SIP/5103933344 at 207.2.123.182||r")
    -- Called 5103933344 at 207.2.123.182
    -- SIP/207.2.123.182-08277a68 is making progress passing it to
SIP/00-16-cb-92-dc-92-b5e13388
  == Spawn extension (macro-RNK-out, s, 1) exited non-zero on
'SIP/00-16-cb-92-dc-92-b5e13388' in macro 'RNK-out'
  == Spawn extension (macro-RNK-out, s, 1) exited non-zero on
'SIP/00-16-cb-92-dc-92-b5e13388'


successful for comparison
===========================
    -- Executing Macro("SIP/00-16-cb-92-dc-92-b5e11e08",
"set-out-cid-pbx")
    -- Executing [s at macro-set-out-cid-pbx:1]
MYSQL("SIP/00-16-cb-92-dc-92-b5e11e08", "Connect connid dbhost root 
asterisk") in new stack
    -- Executing [s at macro-set-out-cid-pbx:2]
MYSQL("SIP/00-16-cb-92-dc-92-b5e11e08", "Query resultid 159 select did from
call_xlatn where ext='00-16-cb-92-dc-92'") in new stack
    -- Executing [s at macro-set-out-cid-pbx:3]
MYSQL("SIP/00-16-cb-92-dc-92-b5e11e08", "Fetch fetchid 160 datavar") in new
stack
    -- Executing [s at macro-set-out-cid-pbx:4]
MYSQL("SIP/00-16-cb-92-dc-92-b5e11e08", "Disconnect 159") in new stack
    -- Executing [s at macro-set-out-cid-pbx:5]
Set("SIP/00-16-cb-92-dc-92-b5e11e08", "anin=5105551212") in new stack
    -- Executing [s at macro-set-out-cid-pbx:6]
Set("SIP/00-16-cb-92-dc-92-b5e11e08", "CALLERID(all)=5105551212") in new
stack
    -- Executing Set("SIP/00-16-cb-92-dc-92-b5e11e08",
"CDR(userfield)=00-16-cb-92-dc-92")
    -- Executing Set("SIP/00-16-cb-92-dc-92-b5e11e08", "ext=15103933344")
    -- Executing Macro("SIP/00-16-cb-92-dc-92-b5e11e08", "RNK-out")
    -- Executing Dial("SIP/00-16-cb-92-dc-92-b5e11e08",
"SIP/5103933344 at 207.2.123.182||r")
    -- Called 5103933344 at 207.2.123.182
    -- SIP/207.2.123.182-082b26b0 is making progress passing it to
SIP/00-16-cb-92-dc-92-b5e11e08
    -- Got SIP response 603 "Declined (no dialog)" back from 66.92.17.165
  == Spawn extension (macro-RNK-out, s, 1) exited non-zero on
'SIP/00-16-cb-92-dc-92-b5e11e08' in macro 'RNK-out'
  == Spawn extension (macro-RNK-out, s, 1) exited non-zero on
'SIP/00-16-cb-92-dc-92-b5e11e08' 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-22-07 14:38  bferrell       Note Added: 0070959                          
======================================================================




More information about the asterisk-bugs mailing list