[asterisk-dev] [Code Review] IAX2 "Ghost" channels

Russell Bryant russell at digium.com
Thu May 14 18:00:25 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/246/#review780
-----------------------------------------------------------



/branches/1.4/channels/chan_iax2.c
<http://reviewboard.digium.com/r/246/#comment1953>

    Could you use a #define that explains the use of this bit?



/branches/1.4/channels/chan_iax2.c
<http://reviewboard.digium.com/r/246/#comment1954>

    You can also just initialize these as "".



/branches/1.4/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1957>

    Declare as: static const size_t



/branches/1.4/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1958>

    Actually, it would be better to handle this as a switch statement on the subclass value.  You will need to declare the argument type as an enum instead of an int.  That way, when a new command type gets added, you will get a compiler warning that code needs to be added to this function.



/branches/1.4/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1955>

    This will blow up on a negative subclass arg.



/branches/1.4/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1956>

    I would use ast_copy_string() here.


- Russell


On 2009-05-14 15:29:37, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/246/
> -----------------------------------------------------------
> 
> (Updated 2009-05-14 15:29:37)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.
> 
> For example: in the 'iax2 show channels' output below the registration happening in the second entry is to a device that has been removed from the network.  This entry will exist in the show channels output for quite sometime as Asterisk attempts to register with the device.  Being able to view that this "Channel" is in fact a registration, and that the last message is a REGREQ which has not received an ACK, makes this entry much more obvious. 
> 
> This is technically a new feature, but due to the amount of confusion this has caused I purpose placing it in the 1.4 and 1.6.x branches as well.  This may or may not resolve the issue it is associated with, but it will help weed out those having an actual issue with excess "Ghost" channels from those seeing something normal like a pending registration.  It will also help diagnose the cause of the excessive "Ghost" channels some users are reporting. 
> 
> --------------EXAMPLE OUTPUT-------------
> 
> *CLI> iax2 show channels
> Channel               Peer             Username    ID (Lo/Rem)  Seq (Tx/Rx)  Lag      Jitter  JitBuf  Format  Start Message  Last Message
> IAX2/iaxy-15318       10.24.20.218     iaxy        12718/10329  00002/00002  00000ms  0000ms  0040ms  unknow  NEW            ACK    
> (None)                10.24.16.238     (None)      15109/00000  00001/00000  00000ms  0000ms  0040ms  unknow  REGREQ         REGREQ 
> 
> 
> *CLI> iax2 show netstats
>                            -------- LOCAL ---------------------  -------- REMOTE --------------------
> Channel               RTT  Jit  Del  Lost   %  Drop  OOO  Kpkts  Jit  Del  Lost   %  Drop  OOO  Kpkts Start Message
> IAX2/iaxy-15318      1000    0   40     0   0     0    0      0    0    0     0   0     0    0      0 NEW    
> (None)               1000    0   40     0   0     0    0      0    0    0     0   0     0    0      0 REGREQ 
> 2 active IAX channels
> 
> 
> This addresses bug 0014207.
>     https://issues.asterisk.org/view.php?id=0014207
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/channels/iax2-parser.h 194476 
>   /branches/1.4/channels/iax2-parser.c 194476 
>   /branches/1.4/channels/chan_iax2.c 194476 
> 
> Diff: http://reviewboard.digium.com/r/246/diff
> 
> 
> Testing
> -------
> 
> tested iax2 show netstats and iax2 show channels, output is shown above.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list