• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
   AsteriskGuru Archives Forum Index -> Asterisk-Dev
View previous topic :: View next topic  
Author Message
dvossel at digium.com
Guest





PostPosted: Wed May 06, 2009 4:35 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

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.
http://bugs.digium.com/view.php?id=0014207


Diffs
-----

/branches/1.4/channels/iax2-parser.h 192499
/branches/1.4/channels/iax2-parser.c 192499
/branches/1.4/channels/chan_iax2.c 192499

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
dvossel at digium.com
Guest





PostPosted: Thu May 14, 2009 5:05 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

Quote:
On 2009-05-14 12:43:42, angler wrote:
> I suggest changing "Start Message" to "First Message" to keep it consistant with "Last Message".

yea, I like that. I think I'll change them to "FirstMsg" and "LastMsg" to save room.


- David


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


On 2009-05-06 12:07:50, David Vossel wrote:
Quote:

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

(Updated 2009-05-06 12:07:50)


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 192499
/branches/1.4/channels/iax2-parser.c 192499
/branches/1.4/channels/chan_iax2.c 192499

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
russell at digium.com
Guest





PostPosted: Thu May 14, 2009 5:18 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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



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

This looks very good.

The one suggestion that I have is that it would also be useful to be more explicit in the output whether the message you indicate was received or sent.


- Russell


On 2009-05-06 12:07:50, David Vossel wrote:
Quote:

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

(Updated 2009-05-06 12:07:50)


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 192499
/branches/1.4/channels/iax2-parser.c 192499
/branches/1.4/channels/chan_iax2.c 192499

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
dvossel at digium.com
Guest





PostPosted: Thu May 14, 2009 7:43 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

(Updated 2009-05-14 15:29:37.298190)


Review request for Asterisk Developers.


Changes
-------

fixed typo in code comment


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 (updated)
-----

/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


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
dvossel at digium.com
Guest





PostPosted: Thu May 14, 2009 7:43 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

(Updated 2009-05-14 15:28:26.161675)


Review request for Asterisk Developers.


Changes
-------

New output with RX and TX specified, show netstats has LastMsg now.

*CLI> iax2 show netstats
-------- LOCAL --------------------- -------- REMOTE --------------------
Channel RTT Jit Del Lost % Drop OOO Kpkts Jit Del Lost % Drop OOO Kpkts FirstMsg LastMsg
(None) 1000 0 40 0 0 0 0 0 0 0 0 0 0 0 0 Rx:NEW Rx:ACK
1 active IAX channel

*CLI> iax2 show channels
Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format FirstMsg LastMsg
(None) 10.24.20.218 iaxy 12476/01974 00003/00003 00000ms 0000ms 0040ms unknow Rx:NEW Rx:ACK
1 active IAX channel


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 (updated)
-----

/branches/1.4/channels/chan_iax2.c 194476
/branches/1.4/channels/iax2-parser.h 194476
/branches/1.4/channels/iax2-parser.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


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
russell at digium.com
Guest





PostPosted: Thu May 14, 2009 10:09 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

-----------------------------------------------------------
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:
Quote:

-----------------------------------------------------------
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




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
dvossel at digium.com
Guest





PostPosted: Fri May 15, 2009 4:45 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

(Updated 2009-05-15 12:35:27.356456)


Review request for Asterisk Developers.


Changes
-------

Updated diff fixes some of Russell's comments. The enum switch case is not possible in 1.4, so this patch is only for Trunk.


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 (updated)
-----

/trunk/channels/iax2-parser.h 194685
/trunk/channels/iax2-parser.c 194685
/trunk/channels/iax2.h 194685
/trunk/channels/chan_iax2.c 194685

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
russell at digium.com
Guest





PostPosted: Fri May 15, 2009 5:25 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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



/trunk/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1959>

I know that this isn't new code, but go ahead and change it to:

static const char * const iaxs[] = {



/trunk/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1960>

I have a few comments on this part ...

1) Why not just declare the argument type to be the enum instead of doing a cast here?

2) While using the enum in this fashion does force you to update the switch statement, it does not force the programmer to update the array of strings.

I think I would rather see the strings be defined inside of the switch statement.

const char *cmd = "Unknown";
switch (iax_subclass) {
case IAX_COMMAND_NEW:
cmd = "NEW";
break;
case IAX_COMMAND.....
...
}
ast_copy_string(str, cmd, len);


- Russell


On 2009-05-15 12:35:27, David Vossel wrote:
Quote:

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

(Updated 2009-05-15 12:35:27)


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
-----

/trunk/channels/iax2-parser.h 194685
/trunk/channels/iax2-parser.c 194685
/trunk/channels/iax2.h 194685
/trunk/channels/chan_iax2.c 194685

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
dvossel at digium.com
Guest





PostPosted: Fri May 15, 2009 6:10 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

(Updated 2009-05-15 13:54:46.725282)


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 (updated)
-----

/trunk/channels/iax2-parser.h 194685
/trunk/channels/iax2-parser.c 194685
/trunk/channels/chan_iax2.c 194685
/trunk/channels/iax2.h 194685

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
russell at digium.com
Guest





PostPosted: Fri May 15, 2009 7:30 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

Ship it!


After these last tweaks, this looks good.

Thanks, David!


/trunk/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1962>

Actually, I'm not sure this is needed at all.

If the destination buffer isn't big enough, it will just get part of "Unknown" since you're using a length limited copy. Also, if the subclass is invalid, you'll get "Unknown".



/trunk/channels/iax2-parser.c
<http://reviewboard.digium.com/r/246/#comment1961>

I have one last set of comments:

Instead of the big else block, just put a return inside the if block to reduce indentation.

Also, our coding guidelines for formatting say that you align case with switch, which will reduce the indentation one more level.


- Russell


On 2009-05-15 13:54:46, David Vossel wrote:
Quote:

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

(Updated 2009-05-15 13:54:46)


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
-----

/trunk/channels/iax2-parser.h 194685
/trunk/channels/iax2-parser.c 194685
/trunk/channels/chan_iax2.c 194685
/trunk/channels/iax2.h 194685

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
dvossel at digium.com
Guest





PostPosted: Fri May 15, 2009 7:57 pm    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

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

(Updated 2009-05-15 15:49:03.921398)


Review request for Asterisk Developers.


Changes
-------

Russell's Tweaks


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 (updated)
-----

/trunk/channels/chan_iax2.c 194685
/trunk/channels/iax2-parser.h 194685
/trunk/channels/iax2-parser.c 194685
/trunk/channels/iax2.h 194685

Diff: http://reviewboard.digium.com/r/246/diff


Testing
-------

tested iax2 show netstats and iax2 show channels, output is shown above.


Thanks,

David


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
thp at westhawk.co.uk
Guest





PostPosted: Mon May 18, 2009 9:54 am    Post subject: [asterisk-dev] [Code Review] IAX2 "Ghost" channels

On 15 May 2009, at 21:49, David Vossel wrote:

Quote:

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

(Updated 2009-05-15 15:49:03.921398)


Review request for Asterisk Developers.


Changes
-------

Russell's Tweaks


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


Whilst you are changing that - any chance you can display the
'encryption' status flag too?

Tim.


Tim Panton - Web/VoIP consultant and implementor
www.westhawk.co.uk




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-Dev All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™