Summary:ASTERISK-01585: Strange things with sip show channels
Reporter:connor (connor)Labels:
Date Opened:2004-05-10 20:24:22Date Closed:2004-09-25 02:45:08
Versions:Frequency of
Environment:Attachments:( 0) sipchan.txt
( 1) siptomgcpsession.txt.gz
Description:Getting strange channels when I do sip show channel     7708445882  2010811536@  00101/00003  00000ms  0000ms  UNKN  (d)   billy-line  003094c3-1c  00102/00104  00000ms  0000ms  UNKN  (d)   billy-line  003094c3-1c  00102/00104  00000ms  0000ms  UNKN  (d)     6787753282  1063297332@  00101/00003  00000ms  0000ms  UNKN  (d)     6787753282  851380209@6  00102/00004  00000ms  0000ms  UNKN  (d)


Attached is more detail info doing sip show channel 2010811536
Comments:By: mustdie (mustdie) 2004-05-10 21:25:42

I can confirm the same kind of behavior. I also can confirm that Qualify=yes in sip.conf makes 'sip show channels' output list of devices which are being 'pinged' by asterisk.

By: Brian West (bkw918) 2004-05-10 21:28:19

the pinged hosts are there because of the 15000ms delayin destruction.

By: Olle Johansson (oej) 2004-05-11 03:01:16

A "SIP channel" is any SIP dialogue we have. "SIP Show Channels" show active SIP dialogues. The dialogue is active for a while after tear-down.
"SIP show subscriptions" show SIP channels used for subscribe. "SIP show registry" show those that are active for registrations. MustDie point out the SIP Show Channels also show active, but not yet killed, SIP dialogues for OPTIONS - Qualify. These maybe could be marked as such not to worry users about a lot of active calls.

The (d) in the listing says that this channel is going to be destroyed. We've added a delay to destruction.

Again, you're not using the latest CVS head. Please update and see if the behaviour is still there. I can't see any OPTIONS calls hanging there, scheduled for destruction.

By: Mark Spencer (markster) 2004-05-11 16:32:56

I've added a feature called "sip history" which you can use (enable sip history after starting your asterisk process) to be able to do "sip show history <callno>" and get the complete history of the call.

By: connor (connor) 2004-05-11 17:17:03

Running latest cvs, can't find ANYTHING about sip history or sip show history...

By: Mark Spencer (markster) 2004-05-11 20:09:08

Sorry, try again, apparently it didn't make the commit.

By: connor (connor) 2004-05-11 20:48:23

okay, here is 2 sip show historys on 2 of those strange channels..    "unknown"   AC997092-15  00101/00102   UNKN  (d)
1. Rx              INVITE sip:8435259603@ SIP/2.0
2. TxResp          SIP/2.0 100 Trying
3. TxResp          SIP/2.0 180 Ringing
4. TxResp          SIP/2.0 180 Ringing
5. TxResp          SIP/2.0 183 Session Progress
6. Rx              CANCEL sip:8435259603@ SIP/2.0
7. TxRespRel       SIP/2.0 487 Request Terminated
8. TxResp          SIP/2.0 200 OK
9. Rx              CANCEL sip:8435259603@ SIP/2.0
10. TxRespRel       SIP/2.0 487 Request Terminated
11. TxResp          SIP/2.0 200 OK
12. Rx              ACK sip:8435259603@ SIP/2.0
13. ReTx            SIP/2.0 487 Request Terminated
14. ReTx            SIP/2.0 487 Request Terminated
15. ReTx            SIP/2.0 487 Request Terminated
16. ReTx            SIP/2.0 487 Request Terminated
17. ReTx            SIP/2.0 487 Request Terminated
18. MaxRetries      (Critical)    5224438     75f497700c5  00102/00102   UNKN  (d)
1. TxReqRel        INVITE sip:5224438@ SIP/2.0
2. Rx              SIP/2.0 100 Trying
3. Rx              SIP/2.0 183 Session Progress
4. TxReqRel        CANCEL sip:5224438@ SIP/2.0
5. SchedDestroy    15000 ms
6. Rx              SIP/2.0 200 OK
7. CancelDestroy
8. TxReq           ACK sip:5224438@ SIP/2.0
9. Rx              BYE sip:6616832218@ SIP/2.0
10. TxResp          SIP/2.0 200 OK

By: Diego Ercolani (dercol) 2004-05-13 19:49:24

Hallo, same issue with grandstream budgetone 100 firmware ver and even
Another strange thing is that when I call from/to budgetone and then hangup from it, asterisk (last cvs) doesn't hangup channel.
You can hangup only if you hangup the other end or you send a soft hangup command.
I've tryied also with LIPZ4 softphone. With this phone there isn't this problem and asterisk correctly hungs up.
Before I was running asterisk middle april cvs and there wasn't this problem.
I've also included a sip debug session of a SIP to MGCP call

edited on: 05-13-04 19:00

By: oliver (oliver) 2004-05-13 20:33:23

Hey all,

I'm seeing the same problem here, in the latest CVS HEAD-branch.  It seems to have been introduced at most a few weeks ago.  It might be noteworthy that it's symptoms look very similar to the bug described in ticket ASTERISK-1000055.  It seems to be triggered when an IP-address chan_sip tries to communicate with doesn't respond an all, or stops responding in the middle of a conversation, resulting in the connection never beeing closed down properly and lingering around until Asterisk is restarted or chan_sip unloaded and reloaded.

I have an Asterisk-box which registers to FWD, but which sometimes loses connectivity for a short time.  All registration-requests during that time, will never be closed as well.  "sip show channels" sometimes shows hundreds of them and at some point, Asterisk will run out of FD's and stops accepting any calls at all until restarted.

It can probably be reproduced by putting something like this in your "sip.conf":

register => 1234:1234@

("" is a routable IP-address that's not in use and doesn't respond with anything at the moment).



By: Mark Spencer (markster) 2004-05-16 12:21:30

I can't duplicate your issue oliver.  If i call something that doesn't exist, eventually the "autodestruct" comes back and cleans it up in about 15 seconds.

Anyway I've put in a couple of fixes that might be relevant for some or all of the things you're seeing.  Please let me know.

By: Mark Spencer (markster) 2004-05-16 12:22:00

Just to clarify, this is CVS head only.

By: khb (khb) 2004-05-17 01:04:10

I also have seen the failure of autodestruction of SIP channels that oliver reports.  Most of the time the destruction seems to work but over a period of several hours enough channels stay around until asterisk runs out of RTP ports and then you have to restart. In my observation this happens only with one host (sipgate) strangely. The only calls made during those are OPTIONS packets via the qualify peer feature.  I am still testing these failures, will report back.

By: Mark Spencer (markster) 2004-05-17 02:41:20

Again having output from sip history on those would be useful.

By: Mark Spencer (markster) 2004-05-18 23:56:19

Cannot duplicate the problem even with register, so i'm downgrading this to minor.

By: Brian West (bkw918) 2004-05-19 00:01:46

I think the problem has gone away.. I can't duplicate it now.  Can anyone else?

By: khb (khb) 2004-05-19 00:39:36

I don't know yet.  But it seem a combination of network/host availability or response time and perhaps timeouts set in asterisk.  It's definitely real, but didn't use to happen at all. I only saw it the first time last week, after upgrading my sip channels with most of the recent patches.

By: oliver (oliver) 2004-05-19 07:13:58

Hey Mark,

I've waited a few days to be sure, but my problem seems to have gone away after your latest fixes in CVS.  Thnx!  :-)



By: Mark Spencer (markster) 2004-05-19 18:04:39

Fixed in CVS