[asterisk-bugs] [Asterisk 0019055]: [patch] asterisk crashes on unattended transfer

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 5 17:47:59 CDT 2011


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19055 
====================================================================== 
Reported By:                jamhed
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   19055
Category:                   PBX/pbx_lua
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.2.17.2 
JIRA:                       SWP-3354 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-04-02 17:39 CDT
Last Modified:              2011-05-05 17:47 CDT
====================================================================== 
Summary:                    [patch] asterisk crashes on unattended transfer
Description: 
A,B,C are sip peers.

A calls B, then A do a blind transfer (dtmf sequence or sip refer) to C,
and then asterisk (1.6.2.17) dumps core.

If B do a blind transfer then it works.
If A do an attended transfer then it works.

If I replace the context for sip peers to use pbx_config switch,
it works. Here is how it looks:

[ncom]
exten => _24XX,1,DIAL(SIP/${EXTEN},30,tT)
exten => _24XX,n,Hangup

It seems to me that the problem is related to ast_async_goto() because
I see "AsyncGoto/SIP/2401-0000000d<ZOMBIE>" in app.log() while trying to
do a transfer.
Also I've noticed that even that "AsyncGoto" strings disappears in
app.log() output if
I do a one second sleep and then continue execution of lua script.

But when I use pbx_config switch, then it shows a proper channel name
like SIP/2401-00000003, without these AsyncGoto and ZOMBIE.

I think there should be a difference between pbx_config and pbx_lua
behaviour,
but I cannot figure out what it is and where to look for.

I guess that lua script somehow executed on a wrong (dying) channel.

Here is my extensions.lua for this case, it's quite simple:

function simple_switch(ctx, number)
   app.log("VERBOSE", "simple switch: " .. number)
   app.dial("SIP/" .. number, 30, "tT")
end

extensions["ncomlua"] = {
   ["_."] = simple_switch
}
====================================================================== 

---------------------------------------------------------------------- 
 (0134550) svnbot (reporter) - 2011-05-05 17:47
 https://issues.asterisk.org/view.php?id=19055#c134550 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 317476

U   branches/1.8/pbx/pbx_lua.c

------------------------------------------------------------------------
r317476 | russell | 2011-05-05 17:47:58 -0500 (Thu, 05 May 2011) | 8 lines

Add a datastore fixup to fix a pbx_lua crash.

(closes issue https://issues.asterisk.org/view.php?id=19055)
Reported by: jamhed
Patches:
      lua_datastore_fixup1.diff uploaded by mnicholson (license 96)
Tested by: mnicholson, jamhed

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=317476 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-05 17:47 svnbot         Checkin                                      
2011-05-05 17:47 svnbot         Note Added: 0134550                          
2011-05-05 17:47 svnbot         Status                   ready for review =>
assigned
2011-05-05 17:47 svnbot         Assigned To               => russell         
======================================================================




More information about the asterisk-bugs mailing list