[Spce-user] Can't count active calls for a given peer using kamctl

Joel S. | VOZELIA joel at vozelia.com
Fri Mar 13 12:53:39 EDT 2015


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.



More information about the Spce-user mailing list