Summary:ASTERISK-01431: Re: 1110 - asterisk -rx "sip show peers" or "iax2 show channels" etc does not give full response.
Reporter:chrisorme (chrisorme)Labels:
Date Opened:2004-04-19 07:10:36Date Closed:2004-09-25 02:51:24
Versions:Frequency of
Description:Re: 1110 - asterisk -rx "sip show peers" or "iax2 show channels" etc does not give full response.


This is identical and reported in 1110 but I cannot reopen that bug as I do not have the required privilege and/or am not the reporter.
I didn't want to bother the bug marshalls personally by email as I thought that would be very rude so I opened this bug which you can close a duplicate?  Hope that's ok, It's the only way I could see to do the same sort of thing.
This bug is in 4/15 CVS, which CVS were you using bkw ?
Is it fixed in more recent CVS which I have not noticed, sorry if that's the case.

Bug demonstration (for me)

[root@raven]# asterisk -rx "sip show peers"
Name/username    Host                 Mask             Port     Status
[root@raven]# asterisk -rx "sip show peers"
Name/username    Host                 Mask             Port     Status
[root@raven]# asterisk -rx "sip show peers"
Name/username    Host                 Mask             Port     Status
<snip lots of entries>
ata186/ata186  X.X.X.X  (D)  5060     OK (67 ms)
<snip lots more entries>
fwd/278XXX  5060     OK (78 ms)

Maybe you can post these comments into the 1110 as feedback and reopen it if you want ?
Comments:By: Brian West (bkw918) 2004-04-19 09:59:30

Na this is fine.. I was testing with asterisk -rx "show diaplan" which is a bout 4 pages long and it delivered it all.  And "show modules" was usually cut in half and isn't any more.


By: chrisorme (chrisorme) 2004-04-19 10:08:34

I have no problem either doing asterisk -rx "show dialplan".

However, when trying asterisk -rx "sip show peers" or asterisk -rx "iax show peers" it gets chopped off with no peers and just titled like my 'paste' above from console above.  Sorry for nattering on but could you check that, maybe defining a fwd or iaxtel account ?

Was this fixed between 4/15 and now in the CVS and I just didn't see it and am being stupid (again)?

By: Brian West (bkw918) 2004-04-19 10:28:44

works fine here.. how many peers you have?  I have about 30


By: chrisorme (chrisorme) 2004-04-19 10:32:56

about 10 sip peers and about 5 iax peers.

By: Brian West (bkw918) 2004-04-19 10:41:04

this sounds like a local issue... can anyone else confirm this?  I get full results .... hrm.


By: Brian West (bkw918) 2004-04-19 10:42:46

i'm on cvs-head.. have you tried that?

By: chrisorme (chrisorme) 2004-04-19 10:48:37

no. I'm 3 days behind on '-head' but on '-head 4/15' on production box.  
I'll compile the most recent CVS on a dev box and re-test and report back.  
Probably should have done that before reporting - sorry.

(Thanks very very much for the latency reporting patch btw. - C)

By: chrisorme (chrisorme) 2004-04-19 11:23:28

Seems a less serious problem with latest 'head'..  (on a different machine)
zaptel/libpri/asterisk all rm -rf 'ed and checked out afresh.

I run asterisk with safe_asterisk if that is relevant ?

[root@chatterbox asterisk]# safe_asterisk
[root@chatterbox asterisk]# asterisk -rx "sip show peers"
Name/username    Host                 Mask             Port     Status
[root@chatterbox asterisk]# asterisk -rx "sip show peers"
Name/username    Host                 Mask             Port     Status
seahaven1/seaha  (Unspecified)   (D)  0        Unmonitored
devata1864/deva  (Unspecified)   (D)  0        UNKNOWN
devata1863/deva  (Unspecified)   (D)  0        UNKNOWN
   -- Remote UNIX connection
[root@chatterbox asterisk]#

Seems better though.  I only had half a dozen failure with latest CVS on issuing about 100 asterisk -rx 's.  

Possible suggestion to repeat my experience ...
Maybe try issuing asterisk -rx "sip show peers" and asterisk -rx "iax2 show peers" fifty times -> 100 times each after just starting asterisk afresh after kill -9 ing both safe_asterisk and the asterisk processes and running safe_asterisk and seeing if you get a failure or 6?

The problem seems worst when asterisk is just started (but has booted) (buffered?) and the more lines that need to be output (my sip show peers is worse than iax2 show peers for just giving headers).  
Anyway it's repeatability is down from giving me only the headers about 50% of the time to now only giving me the headers about 5-10% of the time now.

I can probably live with that.

By: Olle Johansson (oej) 2004-04-21 15:37:47

I've re-opened 1110... THis is still a bug.