[asterisk-bugs] [Asterisk 0013183]: crash when using asterisk db put

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Feb 9 12:41:23 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13183 
====================================================================== 
Reported By:                remiq
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13183
Category:                   Core/General
Reproducibility:            unable to reproduce
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.20.1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2008-07-28 13:15 CDT
Last Modified:              2009-02-09 12:41 CST
====================================================================== 
Summary:                    crash when using asterisk db put
Description: 
I have a macro that saves the sip CHANID to ast db when a call is answered
so I can save this information to the CDR.  This seems to be causing
asterisk to crash every once in a while when the CHANID variable is saved
to the ast db.  This started to happen once I upgraded from 1.4.17 to
1.4.20.1.  
====================================================================== 

---------------------------------------------------------------------- 
 (0099726) remiq (reporter) - 2009-02-09 12:41
 http://bugs.digium.com/view.php?id=13183#c99726 
---------------------------------------------------------------------- 
We use MTTDial to write the sipcallid in our CDRs.  Based on gdb, asterisk
is crashing because we are using astdb to temporary store the sipcallid. 
Since this is very difficult to reproduce we decided not to write the
sipcallid to the CDRs anymore.  Here are all the macros we use to
accomplish this:

[macro-MTTDial]
exten => s,1,Dial(${ARG1}|${ARG2}|M(savesipcallid,${ARG4})${ARG3})

exten => h,1,Macro(writesavedsipcallid)

[macro-savesipcallid]
exten => s,1,Set(DB(CHANID/${CHANNEL:4})=${SIPCALLID})
exten => s,n,GotoIf(${ARG1}?HASMODE:DEFAULT)
exten => s,n(HASMODE),GotoIf($[ ${ARG1} = rfc2833]?SETRFC:DEFAULT)
exten => s,n(SETRFC),SIPDtmfMode(rfc2833)
exten => s,n(DEFAULT),Noop


[macro-writesavedsipcallid]
exten => s,1,GotoIf($[${DIALSTATUS} = CANCEL]?DONE:$[${PRIORITY}+1])
exten => s,n,Set(CDR(SIPCALLID2)=${DB(CHANID/${BRIDGEPEER:4})})
exten => s,n,Noop(${DB_DELETE(CHANID/${BRIDGEPEER:4})})
exten => s,n(DONE),Noop(${DIALSTATUS}) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-09 12:41 remiq          Note Added: 0099726                          
======================================================================




More information about the asterisk-bugs mailing list