[Home]

Summary:ASTERISK-11598: sip debug can't be stopped
Reporter:pj (pj)Labels:
Date Opened:2008-03-07 13:56:56.000-0600Date Closed:2008-04-02 10:23:19
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 12169-debugoff.diff
( 1) 12169-debugoff-2.diff
( 2) 12169-debugprint.diff.txt
Description:when turn on sip debug globally or on per peer basis, it can't be stopped,
it seems, that affected are only tls peers


****** ADDITIONAL INFORMATION ******

steps to reproduce:
sip set debug on <or> sip set debug peer xxx
sip set debug off

sip debug continues for tls peers until asterisk restart
Comments:By: Russell Bryant (russell) 2008-03-14 15:46:39

Please apply the attached patch and tell me what "sip show settings" says the sipdebug value is when the problem happens.

Also, please provide some example console output that shows what should not be showing up after you say "sip set debug off".

Finally, please check to see if you have any "sipdebug" setting in sip.conf.

By: pj (pj) 2008-03-15 04:05:59

when sp debug is turned on, "sip show settings" shows:
 SIP Debug: 2
when do "sip set debug off" it shows:
 SIP Debug: 0
but cli output still continues to show debug messages (below) from tls peers...
I haven't any "sipdebug" setting in sip.conf.
running: SVN-trunk-r105677 + bug11972-8.diff.txt


[Mar 15 10:01:33]
<--- SIP read from TLS://85.216.201.137:37598 --->
REGISTER sip:ipbx.i.cz:5061 SIP/2.0
Via: SIP/2.0/TLS 85.216.201.137:0;branch=z9hG4bK78f33702;rport
Max-Forwards: 70
From: <sip:726@ipbx.i.cz>;tag=as3ded5622
To: <sip:726@ipbx.i.cz>
Call-ID: 1fc017fb1c335ab92901893903a7d9e4@10.0.0.2
CSeq: 970 REGISTER
User-Agent: Asterisk PBX SVN-trunk-r103314
Authorization: Digest username="726", realm="ipbx.i.cz", algorithm=MD5, uri="sip:ipbx.i.cz:5061", nonce="1bd3742a", response="46aca21ca22004bee7f000ca57db9ace", opaque=""
Expires: 120
Contact: <sip:726@85.216.201.137:5061;transport=TLS>
Event: registration
Content-Length: 0



By: Jason Parker (jparker) 2008-04-01 14:19:27

Stab in the dark here..  Does this help at all?

I think that req->debug is just never getting cleared.

By: Jason Parker (jparker) 2008-04-01 14:20:39

eh, nevermind.  That isn't going to help at all.

By: Jason Parker (jparker) 2008-04-01 15:21:48

Give 12169-debugoff-2.diff a shot..  That one actually makes sense.

By: pj (pj) 2008-04-02 09:54:20

Jason, your patch solved this issue, thanks.
SVN-trunk-r105733 + 12169-debugoff-2.diff

By: Digium Subversion (svnbot) 2008-04-02 10:22:10

Repository: asterisk
Revision: 112431

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r112431 | file | 2008-04-02 10:22:09 -0500 (Wed, 02 Apr 2008) | 7 lines

Since the SIP request structure gets reused multiple times with TCP handling we have to clear the debug state or else we will keep spitting out debug even after it has been turned off.
(closes issue ASTERISK-11598)
Reported by: pj
Patches:
     12169-debugoff-2.diff uploaded by qwell (license 4)
Tested by: pj

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

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

By: Digium Subversion (svnbot) 2008-04-02 10:23:19

Repository: asterisk
Revision: 112436

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c

------------------------------------------------------------------------
r112436 | file | 2008-04-02 10:23:18 -0500 (Wed, 02 Apr 2008) | 15 lines

Merged revisions 112431 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r112431 | file | 2008-04-02 12:26:51 -0300 (Wed, 02 Apr 2008) | 7 lines

Since the SIP request structure gets reused multiple times with TCP handling we have to clear the debug state or else we will keep spitting out debug even after it has been turned off.
(closes issue ASTERISK-11598)
Reported by: pj
Patches:
     12169-debugoff-2.diff uploaded by qwell (license 4)
Tested by: pj

........

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

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