[asterisk-bugs] [Asterisk 0012346]: null pointer in chan_skinny when 'regcontext' used

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Apr 4 03:34:31 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12346 
====================================================================== 
Reported By:                candlerb
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   12346
Category:                   Channels/chan_skinny
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 111962 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-01-2008 03:57 CDT
Last Modified:              04-04-2008 03:34 CDT
====================================================================== 
Summary:                    null pointer in chan_skinny when 'regcontext' used
Description: 
Uncomment the 'regcontext' example line from skinny.conf, wait for a Cisco
phone to connect, and Asterisk dumps core.

GDB output:

...
[New Thread -1215501408 (LWP 12516)]
    -- Starting Skinny session from 10.69.255.249
    -- Added extension '110' priority 1 to skinnyregistrations

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1215501408 (LWP 12516)]
ast_add_extension2 (con=0x86d1a88, replace=1, extension=0xb78ce1c0 "110",
    priority=Variable "priority" is not available.
) at pbx.c:6056
6056                            if (x->exten) { /* this test for safety
purposes */
(gdb) bt
http://bugs.digium.com/view.php?id=0  ast_add_extension2 (con=0x86d1a88,
replace=1, extension=0xb78ce1c0
"110",
    priority=Variable "priority" is not available.
) at pbx.c:6056
http://bugs.digium.com/view.php?id=1  0x080e4f71 in ast_add_extension
(context=0x363840
"skinnyregistrations",
    replace=141620640, extension=0x870f5a0 "??p\b", priority=141620640,
    label=0x870f5a0 "??p\b", callerid=0x870f5a0 "??p\b",
    application=0x870f5a0 "??p\b", data=0x870f5a0, datad=0x870f5a0,
    registrar=0x870f5a0 "??p\b") at pbx.c:5859
http://bugs.digium.com/view.php?id=2  0x00359a6f in handle_message
(req=0x870f180, s=0x870e600)
    at
/home/candlerb/svn/asterisk/branches/1.6.0/include/asterisk/utils.h:502
http://bugs.digium.com/view.php?id=3  0x0035b88f in skinny_session
(data=0x870e600) at chan_skinny.c:5585
http://bugs.digium.com/view.php?id=4  0x08122445 in dummy_start (data=0x86d1a88)
at utils.c:870
http://bugs.digium.com/view.php?id=5  0x005793cc in start_thread () from
/lib/tls/libpthread.so.0
http://bugs.digium.com/view.php?id=6  0x004d21ae in clone () from
/lib/tls/libc.so.6
(gdb) print x
$1 = (struct match_char *) 0x0

I wondered if this was perhaps because I had no [skinnyregistrations]
section in extensions.conf, but I added one and it made no difference.

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

---------------------------------------------------------------------- 
 candlerb - 04-04-08 03:34  
---------------------------------------------------------------------- 
Ah, I forgot to give 'dialplan show' from immediately before the crash.
Here it is:

*CLI> dialplan show
[ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
  's' =>            1. KeepAlive()                               
[app_dial]

[ Context 'default' created by 'pbx_config' ]
  Include =>        'extensions'                                 
[pbx_config]
  Include =>        'invalid'                                    
[pbx_config]

[ Context 'from-skinny' created by 'pbx_config' ]
  Include =>        'extensions'                                 
[pbx_config]
  Include =>        'testing'                                    
[pbx_config]
  Include =>        'outbound'                                   
[pbx_config]

[ Context 'from-sip' created by 'pbx_config' ]
  Include =>        'extensions'                                 
[pbx_config]
  Include =>        'testing'                                    
[pbx_config]
  Include =>        'outbound'                                   
[pbx_config]

[ Context 'internal' created by 'pbx_config' ]
  Include =>        'extensions'                                 
[pbx_config]
  Include =>        'testing'                                    
[pbx_config]
  Include =>        'outbound'                                   
[pbx_config]

[ Context 'incoming' created by 'pbx_config' ]
  '8000' =>         1. Answer()                                  
[pbx_config]
                    2. Wait(1)                                   
[pbx_config]
                    3. Background(enter-ext-of-person)           
[pbx_config]
  '8836' =>         1. Macro(ext,SIP/1836 at cme-london)            
[pbx_config]
  '8888' =>         1. Answer()                                  
[pbx_config]
                    2. Wait(1)                                   
[pbx_config]
                    3. Playback(office-iguanas)                  
[pbx_config]
                    4. Hangup()                                  
[pbx_config]
  '8998' =>         1. Macro(ext,SIP/907XXXXXXXXX at cme-london)    
[pbx_config]
  'i' =>            1. Background(pbx-invalid)                   
[pbx_config]
  't' =>            1. Playback(vm-goodbye)                      
[pbx_config]
                    2. Hangup()                                  
[pbx_config]
  Include =>        'extensions'                                 
[pbx_config]

[ Context 'testing' created by 'pbx_config' ]
  '611' =>          1. Answer()                                  
[pbx_config]
                    2. Playback(your-call-is-not-important)      
[pbx_config]
                    3. Playback(office-iguanas)                  
[pbx_config]
                    4. Playback(that-tickles)                    
[pbx_config]
                    5. Hangup()                                  
[pbx_config]
  '612' =>          1. Answer()                                  
[pbx_config]
                    2. AGI(agi-testing.agi)                      
[pbx_config]
  '_7X.' =>         1. AGI(agi://10.69.255.251)                  
[pbx_config]

[ Context 'invalid' created by 'pbx_config' ]
  '_X!' =>          1. Answer()                                  
[pbx_config]
                    2. Background(pbx-invalid)                   
[pbx_config]

[ Context 'outbound' created by 'pbx_config' ]
  '_9.' =>          1. Dial(Zap/4/${EXTEN:1})                    
[pbx_config]
                    2. Congestion()                              
[pbx_config]
                    102. Congestion()                            
[pbx_config]
  '_X.' =>          1. Dial(SIP/${EXTEN}@sipgate-out,15,r)       
[pbx_config]
                    2. Congestion()                              
[pbx_config]
                    102. Congestion()                            
[pbx_config]

[ Context 'extensions' created by 'pbx_config' ]
  '101' =>          1. Macro(ext,Zap/1)                          
[pbx_config]
  '102' =>          1. Macro(ext,Zap/2)                          
[pbx_config]
  '111' =>          1. Macro(ext,Skinny/111 at brian)               
[pbx_config]
  '301' =>          1. Macro(ext,SIP/testing301)                 
[pbx_config]
  '302' =>          1. Macro(ext,SIP/testing302)                 
[pbx_config]
  '401' =>          1. Macro(ext,SIP/tulip1)                     
[pbx_config]
  '402' =>          1. Macro(ext,SIP/tulip2)                     
[pbx_config]
  '403' =>          1. Macro(ext,SIP/tulip3)                     
[pbx_config]
  '404' =>          1. Macro(ext,SIP/tulip4)                     
[pbx_config]
  '501' =>          1. Macro(ext,BLT/320Plantronics)             
[pbx_config]
  '502' =>          1. Macro(ext,BLT/BrianC/07XXXXXXXXX)         
[pbx_config]
  '601' =>          1. Macro(ext,SIP/1836 at cme-london)            
[pbx_config]
  '_2XX' =>         1. Macro(ext,iax2/asterisk2/${EXTEN}@incoming)
[pbx_config]

[ Context 'macro-ext' created by 'pbx_config' ]
  's' =>            1. Dial(${ARG1},15)                          
[pbx_config]
                    2. Playback(vm-nobodyavail)                  
[pbx_config]
                    3. Hangup()                                  
[pbx_config]
                    102. Wait(1)                                 
[pbx_config]
                    103. Playback(tt-allbusy)                    
[pbx_config]
                    104. Hangup()                                
[pbx_config]

[ Context 'skinnyregistrations' created by 'Skinny' ]
  '111' =>          1. Noop(111)                                 
[Skinny]

-= 28 extensions (49 priorities) in 12 contexts. =-

Notice that the phone *did* successfully add an entry under
skinnyregistrations.
But power-cycling the phone, so it tries to register again, causes the
crash. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-04-08 03:34  candlerb       Note Added: 0085023                          
======================================================================




More information about the asterisk-bugs mailing list