[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 07:25:14 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 07:25 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 07:25  
---------------------------------------------------------------------- 
I have seen another symptom, which may or may not be related so I'll report
it here. This is with regcontext commented out in skinny.conf.

What happens is that I pick up the phone and get dialtone, but the
characters I dial seem to be ignored on the phone (I continue to hear
dialtone). However looking at Asterisk's console, it clearly has received
the button presses, but is failing to send the responses back to the
phone.

Here, I pick up the phone, then dial 611.

*CLI>
*CLI> [New Thread -1216664672 (LWP 9995)]
    -- Starting simple switch on '111 at brian'
[Apr  4 13:16:15] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:15] NOTICE[9800]: chan_skinny.c:3593 skinny_indicate: Asked
to indicate 'Stop tone' condition on channel Skinny/111 at brian-8, but
session does not exist.
[Apr  4 13:16:16] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:16] NOTICE[9800]: chan_skinny.c:3593 skinny_indicate: Asked
to indicate 'Stop tone' condition on channel Skinny/111 at brian-8, but
session does not exist.
[Apr  4 13:16:16] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:16] NOTICE[9800]: chan_skinny.c:3593 skinny_indicate: Asked
to indicate 'Stop tone' condition on channel Skinny/111 at brian-8, but
session does not exist.
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
    -- Executing [611 at from-skinny:1] Answer("Skinny/111 at brian-8", "") in
new stack
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
[Apr  4 13:16:18] WARNING[9800]: chan_skinny.c:1800 transmit_response:
Asked to transmit to a non-existant session!
    -- Executing [611 at from-skinny:2] Playback("Skinny/111 at brian-8",
"your-call-is-not-important") in new stack
    -- <Skinny/111 at brian-8> Playing 'your-call-is-not-important.gsm'
(language 'en')
    -- Executing [611 at from-skinny:3] Playback("Skinny/111 at brian-8",
"office-iguanas") in new stack
    -- <Skinny/111 at brian-8> Playing 'office-iguanas.alaw' (language 'en')
    -- Executing [611 at from-skinny:4] Playback("Skinny/111 at brian-8",
"that-tickles") in new stack
    -- <Skinny/111 at brian-8> Playing 'that-tickles.alaw' (language 'en')
    -- Executing [611 at from-skinny:5] Hangup("Skinny/111 at brian-8", "") in
new stack
  == Spawn extension (from-skinny, 611, 5) exited non-zero on
'Skinny/111 at brian-8'
[Thread -1216664672 (LWP 9995) exited]
[Apr  4 13:16:34] WARNING[9800]: chan_skinny.c:4458 handle_onhook_message:
Skinny(111 at brian-8) channel already destroyed

You can see that Asterisk is handling extension 611 according to the
dialplan. However no audio arrives at the phone.

*CLI> help skinny
                  skinny reset Reset Skinny device(s)
     skinny set debug {on|off} Enable/Disable Skinny debugging
           skinny show devices List defined Skinny devices
            skinny show device List Skinny device information
             skinny show lines List defined Skinny lines per device
              skinny show line List Skinny line information
          skinny show settings List global Skinny settings
*CLI> skinny show devices
Name                 DeviceId         IP              Type            R
NL
-------------------- ---------------- --------------- --------------- -
--
brian                SEP00195659657A                  7941            N 
1
*CLI> skinny show device brian
Name:        brian
Id:          SEP00195659657A
version:     P002F202
Ip address:  Unknown
Port:        0
Device Type: 7941
Registered:  No
Lines:       1
  111 (Brian Candler)
Addons:      0
Speeddials:  0
*CLI> skinny show lines
Device Name          Instance Name                 Label
-------------------- -------- -------------------- --------------------
brian                       1 111                  Brian Candler
*CLI> skinny show line brian
*CLI> skinny show line 111
Line:             111
On Device:        brian
Line Label:       Brian Candler
Extension:        <not set>
Context:          from-skinny
CallGroup:
PickupGroup:
Language:         <not set>
Accountcode:      <not set>
AmaFlag:          Unknown
CallerId Number:  02074385820
CallerId Name:    Brian Candler
Hide CallerId:    No
CFwdAll:          <not set>
CFwdBusy:         <not set>
CFwdNoAnswer:     <not set>
VoicemailBox:     <not set>
VoicemailNumber:  <not set>
MWIblink:         0
Regextension:     <not set>
Regcontext:       <not set>
MoHInterpret:     default
MoHSuggest:       <not set>
Last dialed nr:   611
Last CallerID:    <not set>
Transfer enabled: No
Callwaiting:      No
3Way Calling:     No
Can forward:      No
Do Not Disturb:   No
NAT:              No
immediate:        No
Group:            0
Codecs:           0xc (ulaw|alaw)
Codec Order:      (none)

*CLI>

I tried "skinny reset brian" (without unplugging the phone), but nothing
changes.

If I unplug and reconnect the phone, and wait for it to reboot, it seems
OK after that.

I *think* the problem arises if the phone is left unused for a while, and
therefore decides to re-register.

Oh, and I should have said before: this is a Cisco CP-7941G phone,
firmware is TERM41.7-0-3-0S 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-04-08 07:25  candlerb       Note Added: 0085025                          
======================================================================




More information about the asterisk-bugs mailing list