sipcapture / homer-api

HOMER 5: Back-End (API) DEPRICATED - use sipcapture/homer-app
http://sipcapture.org
27 stars 67 forks source link

Duplicated records on homer 5 #191

Closed davidcsi closed 5 years ago

davidcsi commented 5 years ago

Hello!

I'm using homer5 with the cfg in

https://github.com/sipcapture/homer-api/blob/da13a87b8e/examples/sipcapture/sipcapture.kamailio

And i'm seeding all records duplicated:

mysql> select date, method, reply_reason, source_ip, destination_ip from sip_capture_call_20190917 where callid = 'YTI5OWMzOTEwZTcxYTkxMzhkYzlmNmVjY2Y2YTE4NDY.';
+---------------------+--------+----------------------------------------+--------------+----------------+
| date                | method | reply_reason                           | source_ip    | destination_ip |
+---------------------+--------+----------------------------------------+--------------+----------------+
| 2019-09-17 16:56:07 | INVITE |                                        | 10.10.9.80   | 10.10.0.228    |
| 2019-09-17 16:56:07 | INVITE |                                        | 10.10.9.80   | 10.10.0.228    |
| 2019-09-17 16:56:07 | 100    | trying -- your call is important to us | 10.10.0.228  | 10.10.9.80     |
| 2019-09-17 16:56:07 | 100    | trying -- your call is important to us | 10.10.0.228  | 10.10.9.80     |
| 2019-09-17 16:56:07 | INVITE |                                        | 10.10.0.228  | 10.10.82.17    |
| 2019-09-17 16:56:07 | INVITE |                                        | 10.10.0.228  | 10.10.82.17    |
| 2019-09-17 16:56:07 | 100    | Trying                                 | 10.10.82.17  | 10.10.0.228    |
| 2019-09-17 16:56:07 | 100    | Trying                                 | 10.10.82.17  | 10.10.0.228    |
| 2019-09-17 16:56:07 | 200    | OK                                     | 10.10.82.17  | 10.10.0.228    |
| 2019-09-17 16:56:07 | 200    | OK                                     | 10.10.82.17  | 10.10.0.228    |
| 2019-09-17 16:56:07 | 200    | OK                                     | 10.10.0.228  | 10.10.9.80     |
| 2019-09-17 16:56:07 | 200    | OK                                     | 10.10.0.228  | 10.10.9.80     |
| 2019-09-17 16:56:07 | ACK    |                                        | 10.10.9.80   | 10.10.0.228    |
| 2019-09-17 16:56:07 | ACK    |                                        | 10.10.9.80   | 10.10.0.228    |
| 2019-09-17 16:56:07 | ACK    |                                        | 10.10.0.228  | 10.10.82.17    |
| 2019-09-17 16:56:12 | BYE    |                                        | 10.10.82.17  | 10.10.0.228    |
| 2019-09-17 16:56:12 | BYE    |                                        | 10.10.82.17  | 10.10.0.228    |
| 2019-09-17 16:56:12 | BYE    |                                        | 10.10.0.228  | 10.10.9.80     |
| 2019-09-17 16:56:12 | BYE    |                                        | 10.10.0.228  | 10.10.9.80     |
| 2019-09-17 16:56:13 | 200    | OK                                     | 10.10.9.80   | 10.10.0.228    |
| 2019-09-17 16:56:13 | 200    | OK                                     | 10.10.0.228  | 10.10.82.17    |
| 2019-09-17 16:56:13 | 200    | OK                                     | 10.10.9.80   | 10.10.0.228    |
| 2019-09-17 16:56:13 | 200    | OK                                     | 10.10.0.228  | 10.10.82.17    |
+---------------------+--------+----------------------------------------+--------------+----------------+
23 rows in set (0.00 sec)

Thanks for your help!

David

davidcsi commented 5 years ago

I think this is happening on the kamailio sending the signalling, closing

davidcsi commented 5 years ago

If anyone comes across this problem, make sure you have one OR the other: 1-

modparam("siptrace", "hep_mode_on", 1)

All tracing is done automatically.

2-

modparam("siptrace", "trace_flag", 22)

...

     sip_trace();
     seflag(22);

NOT BOTH.