[asterisk-bugs] [Asterisk 0012362]: Asterisk crashes everytime i try to dial a realtime peer. e.g.DIAL(SIP/peer/number, 60, tTwW)

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Apr 3 14:16:26 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12362 
====================================================================== 
Reported By:                vinsik
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12362
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-03-2008 07:36 CDT
Last Modified:              04-03-2008 14:16 CDT
====================================================================== 
Summary:                    Asterisk crashes everytime i try to dial a realtime
peer. e.g.DIAL(SIP/peer/number,60,tTwW)
Description: 
Asterisk crashes everytime i try to dial a realtime peer.

Command line output:
-- AGI Script Executing Application: (SET) Options:
(CDR(accountcode)=10000)
-- AGI Script Executing Application: (SET) Options:
(CALLERID(num)=123456)
-- AGI Script Executing Application: (DIAL) Options:
(SIP/roxser/123456|60|tTwW)
Disconnected from Asterisk server

Local realtime users work fine. Also all local CMD's work.
Cannot find an logical reason. Reverting back to 1.4.18, as it works ok.


Attached is GDB of asterisk process. 
Asterisk debug does not reveal anything relevant.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 04-03-08 14:16  
---------------------------------------------------------------------- 
vinsik

Yes, that is exactly the problem which my patch attempts to fix. We don't
want to crash if sin is NULL.

Regarding the other problem you posted (since you use an explicit
'hostname' field for your sip peers), there is a comment in chan_sip which
explains what it is attempting to do. Here's the comment:

            /*!\note
             * If this one loaded something, then we need to ensure that
the host
             * field matched.  The only reason why we can't have this as a
criteria
             * is because we only have the IP address and the host field
might be
             * set as a name (and the reverse PTR might not match).
             */

I interpreted this to mean that we have an IP address, and so we need to
look up the hostname to make sure its A record matches the IP address we
have. If we don't have an IP address (in other words, sin is NULL), then we
can't make a match. Perhaps this should be interpreted the opposite way. If
we have no IP address we're expecting, then match the peer based solely on
its name and don't worry about the hostname. As an experiment, I'll upload
a patch that exhibits this behavior... 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-03-08 14:16  putnopvut      Note Added: 0085012                          
======================================================================




More information about the asterisk-bugs mailing list