Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCP Information not being displayed #54

Open
arainero opened this issue Oct 16, 2017 · 18 comments
Open

RTCP Information not being displayed #54

arainero opened this issue Oct 16, 2017 · 18 comments

Comments

@arainero
Copy link

Hello,

I am currently using the latest homer-docker version and I am having difficulty getting RTCP information displayed under QoS reports.

When I check the database I see there is JSON information there. I looked at the apache logs and I don't see anything unusual there either. I don't know what config files or logs to post that would be helpful. So please, let me know and I will provide them.

Also, is there a way to set a timezone for the docker images? They currently don't use the host timezone. Everything appears to be set in "Etc/UTC". I tried changing it, but nothing appears to stick.

@dougbtv
Copy link
Member

dougbtv commented Oct 16, 2017

Thanks for the report on this one, there's a couple things here as a todo...

Firstly... RTCP info hasn't been verified on homer-docker (at least by me), so, it can use a full-out double check on that, and then Travis CI tests to verify that it's there.

Regarding the timezone, can you try changing the value in the homer.env file and see if that works and let us know. This one: https://github.com/sipcapture/homer-docker/blob/master/homer.env

@arainero
Copy link
Author

arainero commented Oct 16, 2017

Thanks @dougbtv

This is what I see in the database for call id "[email protected]:5060". This would be considered proper RTCP data, right?

mysql> mysql> SELECT * FROM rtcp_capture WHERE correlation_id IN ('[email protected]:5060');
+-----+---------------------+------------------+---------------------------------------------------+-------------+-------------+----------------+------------------+-------+--------+------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id  | date                | micro_ts         | correlation_id                                    | source_ip   | source_port | destination_ip | destination_port | proto | family | type | node         | msg                                                                                                                                                                                                                                                                                                                                                                                                                               |
+-----+---------------------+------------------+---------------------------------------------------+-------------+-------------+----------------+------------------+-------+--------+------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 202 | 2017-10-16 14:16:37 | 1508163397664937 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3309146077,"ntp_timestamp_usec":1043740842,"octets":39200,"rtp_timestamp":546897920, "packets":245},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3209013755}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}    |
| 235 | 2017-10-16 14:16:42 | 1508163402664195 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3393032157,"ntp_timestamp_usec":905578410,"octets":79360,"rtp_timestamp":3539200, "packets":496},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3209341435}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}       |
| 263 | 2017-10-16 14:16:47 | 1508163407672750 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3476918237,"ntp_timestamp_usec":1026701228,"octets":119360,"rtp_timestamp":1087504640, "packets":746},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3209669640}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}  |
| 294 | 2017-10-16 14:16:52 | 1508163412664562 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3560804317,"ntp_timestamp_usec":3816562858,"octets":159360,"rtp_timestamp":2154693120, "packets":996},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3209996795}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}  |
| 327 | 2017-10-16 14:16:57 | 1508163417664412 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3644690397,"ntp_timestamp_usec":371332778,"octets":199360,"rtp_timestamp":3221881600, "packets":1246},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3210324475}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}  |
| 360 | 2017-10-16 14:17:02 | 1508163422664674 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3728576477,"ntp_timestamp_usec":3566217130,"octets":238880,"rtp_timestamp":547685120, "packets":1493},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3210652155}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}  |
| 396 | 2017-10-16 14:17:07 | 1508163427664353 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3812462557,"ntp_timestamp_usec":2423657130,"octets":279040,"rtp_timestamp":4326400, "packets":1744},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3210979835}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}    |
| 433 | 2017-10-16 14:17:12 | 1508163432664116 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3896348637,"ntp_timestamp_usec":129761962,"octets":311520,"rtp_timestamp":954074112, "packets":1947},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3211307515}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}   |
| 469 | 2017-10-16 14:17:17 | 1508163437665147 | [email protected]:5060 | 10.10.10.42 |       16647 | 10.11.11.25   |            19131 |     1 |      2 |    1 | homer01:3442 | { "sender_information":{"ntp_timestamp_sec":3980234717,"ntp_timestamp_usec":526272170,"octets":351520,"rtp_timestamp":2021262592, "packets":2197},"ssrc":551677255,"type":200, "report_blocks":[{"source_ssrc":0,"highest_seq_no":0,"fraction_lost":0,"ia_jitter":0,"packets_lost":1,"lsr":0,"dlsr":3211635261}],"report_count":1,"sdes_ssrc":551677255,"sdes_chunk_ssrc":16777216,"sdes_information": [],"sdes_report_count":0}  |
+-----+---------------------+------------------+---------------------------------------------------+-------------+-------------+----------------+------------------+-------+--------+------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9 rows in set (0.00 sec)

I modified the homer.env to be "America/New_York" did a docker-compose down, then a docker-compose build (is this step necessary?), and finally docker-compose up.

The time didn't change. I also modified the .travis.yml file too. I noticed it had timezone settings as well. Neither change seemed to make a difference.

I'm not very familiar with Travis CI. If there is something I should read to do a Travis CI test please let me know.

@dougbtv
Copy link
Member

dougbtv commented Oct 16, 2017

Thanks for the extra info. No action necessary on your part, for making the new travis CI tests (unless you want to contribute, which would be much appreciated as always).

I'm going to open a new issue for the timezone, I'll reference this issue.

@arainero
Copy link
Author

arainero commented Oct 18, 2017

@dougbtv

I'm starting to wonder if the timezone might be the reason the RTCP stats aren't displayed. Is there an easy way to confirm this or is that not possibly the case?

@dougbtv
Copy link
Member

dougbtv commented Oct 18, 2017 via email

@arainero
Copy link
Author

@dougbtv

I see that the date column has a different time from the "ntp_timestamp_sec" entry. Would this do it?

You can see the differences I'm talking about from my previous post.

@arainero
Copy link
Author

@lmangani do you have any thoughts on this?

@lmangani
Copy link
Member

I still need to review the exact details, but time is extracted from the packets so that's most likely what was sent. Mind internally to HOMER everything is and should be UTC in order for things to correlate correctly, multiple timezones will confuse the pairing or completely impair it.

@arainero
Copy link
Author

@lmangani Ok, I see what you mean about everything being in UTC for consistency. That makes me believe it may not be a time issue after all then.

Is there anything you want me to provide to you to help narrow this down?

@sudermanjr
Copy link
Contributor

I can't comment on the TZ stuff because I run everything in UTC. However, I do have RTCP stats working in homer-docker. What I had to do was edit the preferences.php on the webapp to read:

define('RTCP_TABLE_PARTITION', 0);

I got some info here:
sipcapture/homer-api#161

Looks like the some of the default config in the homer-docker capture stuff uses a single table to handle all the rtcp data instead of a rotated table like the other information. This configuration tells the webapp to use a single table to find that info. Worked like a charm for me.

@lmangani
Copy link
Member

@sudermanjr well caught! This is indeed the issue and needs to be reflected in defaults.

@arainero
Copy link
Author

Hey @lmangani, I am going to revisit this now. I am inside the homer-webapp container and I see that inside homer-api/api there is the following:

Authentication RestApi autoload.php preferences_example.php COPYING RestService configuration_example.php Database Statistic index.php

Do I need to rename preferences_example.php to preferences.php or does it utilize preferences_example.php as default?

Also, what is the best way to modify files within a container? I am not the most experienced with Docker and was wondering if I could just edit it or if there was a process involved?

Thank you.

@arainero
Copy link
Author

I think I was going about this incorrectly. Instead of modifying the files within the container I realized that there was a preferences.php file in homer-docker/webapp. I added:

define('RTCP_TABLE_PARTITION', 0);

to the prefercenes.php file and I still can't get RTCP stats to show.

This is with a fresh docker install. @sudermanjr, did you have to do anything else for it to work? I also tried:

define('RTCP_TABLE_PARTITION', 1);

@arainero
Copy link
Author

I just got it to work! I didn't know I had to do a docker-compose build after modifying the files (it makes sense now). I thought that after taking the container down and modifying the environment file in there it would work fine, but I was incorrect.

Thank you all for the help with this.

@lmangani
Copy link
Member

lmangani commented Jan 25, 2018

I'll change the defaults to avoid this in the future! Images are being rebuilt, if you feel like trying to confirm it now works without modification, that's super super welcome!

EDIT: new default is:

define('RTCP_TABLE_PARTITION', 1);

@arainero
Copy link
Author

arainero commented Jan 25, 2018

I did not try your build yet, but I did test "define('RTCP_TABLE_PARTITION', 1);" and "define('RTCP_TABLE_PARTITION', 0);" and only "define('RTCP_TABLE_PARTITION', 0);" works for me. If it is set to 1 the data does not show. (this was after doing a docker-compose build).

What does the 0/1 do for the RTCP table partition? I tried looking around for an answer and it wasn't clear.

Would changing it to a value of "1" and looking up data that was recorded when it was "0" make a difference?

@vtzan
Copy link

vtzan commented Sep 6, 2018

Dear Team,

I have verified that RTCP Stats to work for current homer-docker on multi-containers installation the
value on preferences.php that resides on /var/www/html/api in the homer-webapp container should be set to 0.

define('RTCP_TABLE_PARTITION', 0);

This is needed because all the RTCP the data is saved to the rtcp_capture table

The rotating tables are created successfully in the DB though.

rtcp_capture_all_20180906
rtcp_capture_all_20180907
rtcp_capture_all_20180908 

Thanks

Vasilios Tzanoudakis

@adubovikov
Copy link
Member

https://github.com/sipcapture/homer-app/releases/tag/1.1.32
also the packages are in the repository. Please update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants