Summary: | ASTERISK-12405: [patch] Add 'iax2 set debug peer <peer>' | ||
Reporter: | Michiel van Baak (mvanbaak) | Labels: | |
Date Opened: | 2008-07-17 16:46:36 | Date Closed: | 2008-07-21 14:19:30 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_iax2 |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080718__issue13103_iax2_set_debug_peer.diff ( 1) 2008071900__issue13103_iax2_set_debug_peer.diff ( 2) 2008071901__issue13103_iax2_set_debug_peer.diff | |
Description: | some channel drivers already have the possibility to enable debugging on peer/user basis. IAX2 lacks this. Since IAX2 is often used as a routing protocol between a lot of boxen, and a central routing box, debugging can be a pain as you can only enable all debugging, or disable it at all. Right now the best way to debug is running tcpdump and/or wireshark, but a debug limited on a single peer/user will be great Asked on #asterisk-dev and there it was agreed that it would be a good idea. Because it has bitten me some times already I'll take the bet and see what I can do. | ||
Comments: | By: Brett Bryant (bbryant) 2008-07-18 16:38:50 mvanbaak, i've uploaded a patch for you to test that has this feature. By: Michiel van Baak (mvanbaak) 2008-07-19 03:06:34 It compiles, I get the 'iax2 set debug peer' command, but that's basically it. If I enable debugging on a specific peer I get no debug output of any kind. And, small text issue: asterisk*CLI> iax2 set debug peer speakup01 SIP Debugging Enabled for IP: XXX.XXX.XXX.XXX:4569 asterisk*CLI> Attached patch replaces that SIP with IAX2 By: Michiel van Baak (mvanbaak) 2008-07-19 03:15:09 looks like you forgot the function iax_showframe() [edit] never mind. By: Michiel van Baak (mvanbaak) 2008-07-19 04:45:22 New patch uploaded that addresses two things: This one actually shows the debug output for a specific peer. Not sure if it's the correct way to do it though (function iax_outputframe) When disabling iax2 debug, memset the debugaddr struct to 0 to shut up debug output By: Brett Bryant (bbryant) 2008-07-20 17:01:10 mvanbaak, thanks for testing and reviewing. As for iax_outputframe, I'm not sure why iaxdebug would effect it since iax_showframe is in a different file. Is that all you had to change? By: Digium Subversion (svnbot) 2008-07-21 12:47:07 Repository: asterisk Revision: 132470 U trunk/channels/chan_iax2.c ------------------------------------------------------------------------ r132470 | bbryant | 2008-07-21 12:47:06 -0500 (Mon, 21 Jul 2008) | 11 lines Add "iax2 set debug peer" command and remove deprecated iax2 debug commands that conflicted with adding new features to the newer debug commaands. (closes issue ASTERISK-12405) Reported by: mvanbaak Patches: 2008071901__issue13103_iax2_set_debug_peer.diff uploaded by mvanbaak (license 7) Tested by: bbryant, mvanbaak ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=132470 |