FreePBX Stats Misleading

I know that this may be petty, but on my test box (Running the latest BETA), it shows that I have 6 phones online. This is a little misleading.

I actually only have 2 SIP phones online and 4 connections to an ITSP (2 IAX and 2 SIP). So, I guess it’s counting my trunks also.

Again, maybe I am being petty here. :slight_smile:

what are the names of your trunks. if I recall correctly we tried to limit it to ‘numbered’ sip and iax channels but that means that numbered trunks would get counted. It’s a lot more load to confirm each channel as an extension but it is a valid point…

Maybe instead of “Phones” … “Devices” ?

I have an IAX trunk to VoipStreet named IAX2/voipstreet. It’s just setup as one trunk with an incoming and outgoing settings. It is counting these as 2 phones. And I have 2 SIP trunks for Vitelity; SIP/Vitel-inbound & SIP/Vitel-outbound. It is counting both of these as a phone. Total of 4 Connections that are being included in the count.

I also have 2 SIP phones connected that are counted.

Or just “Device Connections” or something like that. Named phones makes me think of phones connected to the system. Devices makes me think that there are actually hardware devices connected to the system.

The reason that I brought it up is because this morning I was looking at it and scratching my head… “Why are there 6 phones connected to my system!!! Is there someone else attached to my test server?” That’s why I brought it up. Alarmed me for a sec until I had my coffee and realized what it was. :wink:

I’ll have to have a closer look - the intent was to try to count phones and not trunks which usually don’t have numeric names. Apparently that is not the case. Please go and file a bug against this so we can review. thanks.

Just for the record, all my trunks are named after their corresponding PSTN number - hence I have 16 ‘phones’ online but only 5 physical extensions…

There is another problem somewhere here…

On my test system, the statistics show one phone online.

The setup has seven SIP trunks plus four SIP devices; an SPA3000 as an analog trunk and an analog extension, a Polycom 501 and a Nokia E65.

core show hints gives:

[code:1] -= Registered Asterisk Dial Plan Hints =-
202@ext-local : SIP/202 State:Idle Watchers 1
201@ext-local : SIP/201 State:Idle Watchers 1
200@ext-local : SIP/200 State:Idle Watchers 0

  • 3 hints registered
    – Remote UNIX connection
    [/code:1]

Asterisk is seeing the extensions OK, so I don’t see where FreePBX’s one phone online comes from.

Current FreePBX main module versions are:

[code:1]Core setup 2.3.0beta2.3.4
Feature Code Admin setup 1.0.5.1
FreePBX Framework setup 2.3.0beta2.9
System Dashboard tool 0.2.5.3
Voicemail setup 2.0.3
[/code:1]

do a ‘sip show peers’ and ‘iax show peers’ - that is what is used to check the phones online (which should be IP Phones Online. And more important is which version of Asterisk.

Hi,
sip show peers gives (SIP Trunk usernames etc. trimmed)

[code:1]
Name/username Host Dyn Nat ACL Port Status
(name) (ip) N 5060 Unmonitored
(name) (ip) N 5060 OK (133 ms)
(name) (ip) N 5060 OK (58 ms)
(name) (ip) N 5060 OK (57 ms)
(name) (ip) N 5060 OK (58 ms)
(name) (ip) N 5060 OK (58 ms)
pstn-1/spa3000 192.168.0.54 5061 OK (16 ms)
(name) (ip) N 5060 OK (39 ms)
202/202 192.168.0.116 D N 5060 OK (218 ms)
201/201 192.168.0.54 D N 5060 OK (16 ms)
200/200 192.168.0.100 D N 5060 OK (39 ms)
11 sip peers [Monitored: 10 online, 0 offline Unmonitored: 1 online, 0 offline]
[/code:1]

I don’t have any IAX trunks or devices, ‘iax show peers’ says no such command…

Asterisk version is 1.4.7.1

I looked at ‘System Summary’ while looking for the Asterisk version, this gives slightly more sensible figures:

[code:1]System uptime: 3 weeks, 2 days, 7 hours, 18 minutes, 1 second
Last reload: 10 hours, 15 minutes, 9 seconds

Active Sip Channels: 2 Active IAX2 Channels: 0
SIP Registrations: 7 IAX2 Registrations: 0
SIP Peers
Online: 11
Offline: 0 IAX2 Peers
Online: 0
Offline: 0
Unmonitored: 0
[/code:1]

At this, ‘System Status’ is still showing 1 phone online, but there are actually three SIP extensions 200-202, as can be seen above.

The sip trunk ‘usernames’ are either alpha only or alphanumeric starting with a letter, the related usernames are mostly numeric with a couple of alpha-only ones.

thanks - I need you to not ‘trim’ the output though. Can you paste it as is. If there is a number or something you don’t want displayed, then edit if and change it to another number but otherwise leave it as is. The exact display may matter since the code that checks/reports this parses that output through a regex. (And I know there was a patch for asteriskinfo - we may also need to do something for this. (The development was done on 1.2 so it is reports on 1.4 that we need to clear things up if need be.)

thanks in advance for reposting.

OK, still masked but character-by character.
a = letter, 1 = number in original.

[code:1]Name/username Host Dyn Nat ACL Port Status
aaaaaaaaa/aaa-aa 111.111.1.111 N 5060 Unmonitored
aaaaaaaaaa/11111111 111.111.111.11 N 5060 OK (133 ms)
aaaaaaa-aa/1111111 111.11.11.11 N 5060 OK (57 ms)
aaaaaaa-aaa/1111111 111.11.11.11 N 5060 OK (58 ms)
aaaaaaa-aaa/1111111 111.11.11.11 N 5060 OK (58 ms)
aaaaaaa-aaa/1111111 111.11.11.11 N 5060 OK (57 ms)
pstn-1/spa3000 192.168.0.54 5061 OK (8 ms)
aaaaaaa-a/111111 84.92.5.189 N 5060 OK (39 ms)
202/202 192.168.0.116 D N 5060 OK (313 ms)
201/201 192.168.0.54 D N 5060 OK (9 ms)
200/200 192.168.0.100 D N 5060 OK (35 ms)
11 sip peers [Monitored: 10 online, 0 offline Unmonitored: 1 online, 0 offline]
[/code:1]

Here’s mine if it helps any from Asterisk 1.4.9:

[size=9][code:1]asterisk1*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
712345/712345 192.168.1.94 D 5061 Unmonitored
270/270 192.168.1.134 D 5061 OK (193 ms)
269/269 192.168.1.134 D 5061 OK (196 ms)
224/224 192.168.1.133 D 5060 OK (9 ms)
17471234567/17471234567 x.x.x.131 5060 Unmonitored
136 (Unspecified) D 0 UNKNOWN
128 192.168.1.37 D 10862 OK (210 ms)
110/110 192.168.1.18 D 5060 OK (10 ms)
102/102 192.168.1.94 D 5060 OK (8 ms)
101/101 192.168.1.101 D 5060 OK (11 ms)
1000 (Unspecified) D 0 Unmonitored
100/100 192.168.1.1 D 5060 OK (6 ms)
08449700000/username@voipus 216.127.66.119 N 5060 Unmonitored
01296700000/898765 x.x.x.183 N 5060 Unmonitored
01296700000/asterisk 192.168.1.94 5061 Unmonitored
01280800000/823456 x.x.x.183 5060 Unmonitored
01280800000/812345 x.x.x.183 5060 Unmonitored
01183200000/5123456 x.x.79.x N 5060 Unmonitored
18 sip peers [Monitored: 8 online, 1 offline Unmonitored: 8 online, 1 offline][/code:1][/size]

Status shows:

FreePBX Connections [ btw: I note that this heading is ‘hidden’, i.e. doesn’t show on the status page]

IP Phones Online = 15 [ should be 8 ]
IP Trunk Registrations = 6 [+1 (top in peer list) is to my SPA3102 for PSTN calls]

For hints:

[code:1]asterisk1*CLI>
-= Registered Asterisk Dial Plan Hints =-
1000@ext-local : SIP/1000 State:Unavailable Watchers 0
270@ext-local : SIP/270 State:Idle Watchers 0
269@ext-local : SIP/269 State:Idle Watchers 0
224@ext-local : SIP/224 State:Idle Watchers 0
136@ext-local : SIP/136 State:Unavailable Watchers 0
128@ext-local : SIP/128 State:Idle Watchers 0
110@ext-local : SIP/110 State:Idle Watchers 0
102@ext-local : SIP/102 State:Idle Watchers 0
101@ext-local : SIP/101 State:Idle Watchers 0
100@ext-local : SIP/100 State:Idle Watchers 0

  • 10 hints registered
    [/code:1]

Shows 8 extensions/IP Phones Online which is the correct number.

thanks all - there is a new dashboard but it requires a change to core which I will be getting out momentarily and then we need you guys to test for us.

Did this come out already? Sorry, not sure how the timing works here…

I see a change log for dashboard in my modules:

[code:1]System Dashboard tool 0.3 Enabled and up to date

Change Log for version 0.3
0.3.1: Fix issue with miscounting total registrations, minor styling details
0.3: Show IP phones and trunks separately (#2209)[/code:1]

But my version is at 0.3 not 0.3.1 - does it always show the online version and changelog? Is it not updateable because it is still pending core? (just for my future reference).

Many thanks,
Chris.

habile,

all that means is that we have not yet published 0.3.1. What you see in the changelog comes from the server xml file that is loaded. That same files tells you what is available. We sometimes checking changes including the changelog info without yet publishing. This means that you don’t have what is listed in that change log yet (unless you were to pull it direct from svn). There is no harm or issue. When it gets published you will be able to get to it.

I see the numbers have changed… and it’s a lot better, but…

IP Phones Online = 9 [I make it 8]
IP Trunks Online = 6 [if you don’t include my SPA3102 then yes]
IP Trunk Registrations = 6 [correct]

[code:1]asterisk1*CLI>
-= Registered Asterisk Dial Plan Hints =-
1000@ext-local : SIP/1000 State:Unavailable Watchers 0
270@ext-local : SIP/270 State:Idle Watchers 0
269@ext-local : SIP/269 State:Idle Watchers 0
224@ext-local : SIP/224 State:Idle Watchers 0
136@ext-local : SIP/136 State:Unavailable Watchers 0
128@ext-local : SIP/128 State:Idle Watchers 0
110@ext-local : SIP/110 State:Idle Watchers 0
102@ext-local : SIP/102 State:Idle Watchers 0
101@ext-local : SIP/101 State:Idle Watchers 0
100@ext-local : SIP/100 State:Idle Watchers 0

  • 10 hints registered
    [/code:1]

[code:1]asterisk1*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
719999/719999 192.168.1.94 D 5061 Unmonitored
270/270 192.168.1.134 D 5061 OK (196 ms)
269/269 192.168.1.134 D 5061 OK (196 ms)
224/224 192.168.1.133 D 5060 OK (11 ms)
17470000000/17470000000 198.65.166.131 5060 Unmonitored
136 (Unspecified) D 0 UNKNOWN
128 192.168.1.37 D 8644 OK (213 ms)
110/110 192.168.1.18 D 5060 OK (10 ms)
102/102 192.168.1.94 D 5060 OK (8 ms)
101/101 192.168.1.101 D 5060 OK (11 ms)
1000 (Unspecified) D 0 Unmonitored
100/100 192.168.1.1 D 5060 OK (7 ms)
08449000000/user@voipus 216.127.66.119 N 5060 Unmonitored
01296761111/800000 217.14.132.183 N 5060 Unmonitored
01296719999/asterisk 192.168.1.94 5061 Unmonitored
01280811111/811111 217.14.132.183 5060 Unmonitored
01280811111/822222 217.14.132.183 5060 Unmonitored
01181111111/5345678 217.10.79.23 N 5060 Unmonitored
18 sip peers [Monitored: 8 online, 1 offline Unmonitored: 8 online, 1 offline]
[/code:1]

Can you annotate the “sip show peers” output, and show me which ones are trunks, and which are peers? It’s hard to say what is going on without seeing that.

The way it counts is fairly simple - if the name matches the name of a trunk, it counts it as a trunk, otherwise it’s an IP phone. If there is an IP listed, it is ‘online’.

[quote=“gregmac”]Can you annotate the “sip show peers” output, and show me which ones are trunks, and which are peers? It’s hard to say what is going on without seeing that.

The way it counts is fairly simple - if the name matches the name of a trunk, it counts it as a trunk, otherwise it’s an IP phone. If there is an IP listed, it is ‘online’.[/quote]

Hi Greg,

I guess all those with a 192.168.x.x IP address are peers. The exception is my SPA3102 shown in the output as 719999/719999 [192.168.1.94] which is defined as a trunk for PSTN calls.

It’s entirely possible that I have the definition of said trunk a little screwed up - it works just fine but technically may not have the ideal definition.

The trunk name is actually: 01296719999 and here is the definition

[code:1]
[01296719999]
username=asterisk
type=peer
secret=shhhhh
port=5061
nat=never
insecure=port,invite
host=192.168.1.94
dtmfmode=rfc2833
context=from-internal
call-limit=50

[719999]
username=719999
type=peer
secret=spa3102
port=5061
nat=never
insecure=port,invite
host=dynamic
fromuser=719999
dtmfmode=rfc2833
context=from-pstn

[/code:1]

So, if I consider the SPA3102 a peer then I think your summary is correct - I can live with that :slight_smile: - thanks Greg.

Chris.

If you don’t set it up from the “trunks” GUI, then it won’t detect it as a trunk. Like i said, it matches the trunk name (that you see in freepbx trunk listings) against the asterisk peer list.

So for now, yeah, I guess you’ll have to live with it the way it is.

In the future when we implement abstracted ‘devices’, we’ll probably have to handle that sort of thing explicitly, so when you add a “Sipura 3102” to freepbx, it knows it has one fxs (user) and one fxo (trunk) and can just automatically take care of it.