[Spce-user] Can't count active calls for a given peer using kamctl
Martin Stix
ms at pluteus.at
Tue Mar 17 10:13:35 EDT 2015
Hi!
On my 3.7.1 this command always shows 0 for my peer-ID, which is 33
/usr/sbin/ngcp-kamctl proxy fifo profile_get_size peer 33
profile:: name=peer value=33 count=0
Any ideas?
Thanks
mit freundlichen Grüßen
best regards
Martin Stix
CEO
pluteus communication solutions
ms at pluteus.at
www.pluteus.at
Dampfsägestraße 17
3300 Amstetten
Austria
tel.: +43 7472 28165 20
fax.: +43 7472 28165 22
-----Ursprüngliche Nachricht-----
Von: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Joel S. | VOZELIA
Gesendet: Freitag, 13. März 2015 20:56
An: spce-user
Betreff: Re: [Spce-user] Can't count active calls for a given peer using kamctl
Ok found the problem!
I was looking in the wrong table for the peer ID.
Searching through the list I found a post with a different but related problem.
The solution here is to get the peer ID from the provisioning.voip_peer_hosts table.
mysql> select * from voip_peer_hosts where ip ='212.31.198.23';
+----+----------+------------+---------------+------+------+-----------+--------+-----------+--------+
| id | group_id | name | ip | host | port | transport | weight | via_route | via_lb |
+----+----------+------------+---------------+------+------+-----------+--------+-----------+--------+
| 91 | 5 | Inbound | 212.31.198.23 | NULL | 5060 | 1 | 1 | NULL | 0 |
+----+----------+------------+---------------+------+------+-----------+--------+-----------+--------+
1 row in set (0.00 sec)
mysql> quit
Bye
root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_get_size peer 91
profile:: name=peer value=91 count=14
root at xion:~#
Cheers,
Joel.
----- Original Message -----
> From: "Joel S. | VOZELIA" <joel at vozelia.com>
> To: "spce-user" <spce-user at lists.sipwise.com>
> Sent: Friday, March 13, 2015 5:53:39 PM
> Subject: Can't count active calls for a given peer using kamctl
> Hi,
>
> We are using fifo "profile_get_size" command to graph simultaneous
> calls in mr3.4.2.
>
> For some reason it is not working for some peers, and I don't know
> where to start looking...
>
> I need to graph calls that come from a peer with IP 212.31.198.23.
>
> Current total:
>
> root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_get_size total
> profile:: name=total value= count=53
> root at xion:~#
>
> Current from that peer:
>
> root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_list_dlgs total
> | grep to_uri | grep 212.31.198.23 | wc -l
> 48
> root at xion:~#
>
> Current from the rest:
>
> root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_list_dlgs total
> | grep to_uri | grep -v 212.31.198.23 | wc -l
> 5
> root at xion:~#
>
>
> So 48 + 5 = 53 ---> All OK so far.
>
>
> The above commands are not what we usually use, what we do is:
>
>
> root at xion:~# mysql kamailio -e'SELECT * FROM lcr_gw where ip_addr =
> "212.31.198.23";'
> +----+--------+------------+---------------+----------+------+--------+------------+-----------+-------+------+-------+---------+----------+--------+
>| id | lcr_id | gw_name | ip_addr | hostname | port | params |
>| uri_scheme
>| | transport | strip | tag | flags | defunct | group_id | prefix |
> +----+--------+------------+---------------+----------+------+--------+------------+-----------+-------+------+-------+---------+----------+--------+
>| 90 | 1 | Inbound1 | 212.31.198.23 | NULL | 5060 | NULL |
>| 1
>| | 1 | 0 | NULL | 91 | NULL | 5 | NULL |
> +----+--------+------------+---------------+----------+------+--------+------------+-----------+-------+------+-------+---------+----------+--------+
> root at xion:~#
>
> So, the peer ID for 212.31.198.23 would be "90":
>
> root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_get_size peer 90
> profile:: name=peer value=90 count=0
> root at xion:~#
>
> The strange this is, the count=0 is not correct, there are in fact 48
> as you can see earlier.
>
> Where can I start to look into this problem?
>
> If I try with a different peer:
>
> root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_list_dlgs total
> | grep to_uri | grep 217.15.95.45 | wc -l
> 1
> root at xion:~#
>
> root at xion:~# mysql kamailio -e'SELECT * FROM lcr_gw where ip_addr =
> "217.15.95.45";'
> +----+--------+-----------+--------------+----------+------+--------+------------+-----------+-------+------+-------+---------+----------+--------+
>| id | lcr_id | gw_name | ip_addr | hostname | port | params |
>| uri_scheme | transport | strip | tag | flags | defunct | group_id |
>| prefix |
> +----+--------+-----------+--------------+----------+------+--------+------------+-----------+-------+------+-------+---------+----------+--------+
>| 36 | 1 | Inbound2 | 217.15.95.45 | NULL | 5060 | NULL |
>| 1 |
>| 1 | 0 | NULL | 36 | NULL | 17 | NULL |
> +----+--------+-----------+--------------+----------+------+--------+------------+-----------+-------+------+-------+---------+----------+--------+
> root at xion:~#
>
> root at xion:~# /usr/sbin/ngcp-kamctl proxy fifo profile_get_size peer 36
> profile:: name=peer value=36 count=1
> root at xion:~#
>
>
> Maybe a kamailio restart is necessary? The peers that don't work have
> been added recently.
>
>
> Any ideas?
>
>
> Thank you in advanced.
>
> Best regards,
> Joel.
_______________________________________________
Spce-user mailing list
Spce-user at lists.sipwise.com
https://lists.sipwise.com/listinfo/spce-user
More information about the Spce-user
mailing list