{"action":"created","issue":{"url":"https://api.github.com/repos/sipcapture/homer/issues/295","repository_url":"https://api.github.com/repos/sipcapture/homer","labels_url":"https://api.github.com/repos/sipcapture/homer/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/sipcapture/homer/issues/295/comments","events_url":"https://api.github.com/repos/sipcapture/homer/issues/295/events","html_url":"https://github.com/sipcapture/homer/issues/295","id":328690226,"node_id":"MDU6SXNzdWUzMjg2OTAyMjY=","number":295,"title":"HEP3 parsing errors, Kamailio 5.1.3 as sipcapture server","user":{"login":"mishehu","id":1945182,"node_id":"MDQ6VXNlcjE5NDUxODI=","avatar_url":"https://avatars0.githubusercontent.com/u/1945182?v=4","gravatar_id":"","url":"https://api.github.com/users/mishehu","html_url":"https://github.com/mishehu","followers_url":"https://api.github.com/users/mishehu/followers","following_url":"https://api.github.com/users/mishehu/following{/other_user}","gists_url":"https://api.github.com/users/mishehu/gists{/gist_id}","starred_url":"https://api.github.com/users/mishehu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishehu/subscriptions","organizations_url":"https://api.github.com/users/mishehu/orgs","repos_url":"https://api.github.com/users/mishehu/repos","events_url":"https://api.github.com/users/mishehu/events{/privacy}","received_events_url":"https://api.github.com/users/mishehu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-01T23:41:46Z","updated_at":"2018-06-09T08:48:26Z","closed_at":null,"author_association":"NONE","body":"Greetings,\r\n\r\nWe recently upgraded our systems to homer 5, and are  using kamailio 5.1.3 on debian jessie as the sipcapture backend.  We're using OpenSIPS 2.4.1 also on debian jessie with proto_hep and siptrace to send the HEP3 packet over tcp to the kamailio server.  Half of the data never makes it into the database, and I see this in the kamilio logs:\r\n\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: ERROR: <script>: HEP VERSION 3 request from 52.X.X.X:50985\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: ERROR: <script>: HEP CHUNK Source IP 52.X.X.X request from 52.X.X.X:50985\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:363]: qm_malloc(): qm_malloc(0x7f7bcbdb8010, 136) called from sipcapture: hep.c: hepv3_get_chunk(914)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:408]: qm_malloc(): qm_malloc(0x7f7bcbdb8010, 136) returns address 0x7f7bcbedf418 frag. 0x7f7bcbedf3e0 (size=136) on 1 -th hit\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:471]: qm_free(): qm_free(0x7f7bcbdb8010, 0x7f7bcbedf418), called from sipcapture: hep.c: hepv3_get_chunk(1069)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:506]: qm_free(): freeing frag. 0x7f7bcbedf3e0 alloc'ed from sipcapture: hep.c: hepv3_get_chunk(914)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:363]: qm_malloc(): qm_malloc(0x7f7bcbdb8010, 136) called from sipcapture: hep.c: hepv3_message_parse(548)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:408]: qm_malloc(): qm_malloc(0x7f7bcbdb8010, 136) returns address 0x7f7bcbedf418 frag. 0x7f7bcbedf3e0 (size=136) on 1 -th hit\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:471]: qm_free(): qm_free(0x7f7bcbdb8010, 0x7f7bcbedf418), called from sipcapture: hep.c: hepv3_message_parse(749)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/mem/q_malloc.c:506]: qm_free(): freeing frag. 0x7f7bcbedf3e0 alloc'ed from sipcapture: hep.c: hepv3_message_parse(548)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: INFO: <core> [core/parser/parse_fline.c:144]: parse_first_line(): ERROR:parse_first_line: method not followed by SP\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: ERROR: <core> [core/parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 0)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/parser/msg_parser.c:600]: parse_msg(): invalid message\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: ERROR: <core> [core/parser/msg_parser.c:675]: parse_msg(): ERROR: parse_msg: message=<0#015#012Via: SIP/2.0/UDP 205.207.0.124;rport;branch=z9hG4bKcB2e5SU2rr2rc#015#012Max-Forwards: 68#015#012From: \"TFFtest\" <sip:123456@205.X.X.X>;tag=S3H6Bj8HScBNe#015#012To: <sip:3269@52.X.X.X:5060>;tag=5QB6rQ5X84rQr#015#012Call-ID: d54535c4-e08c-1236-65b1-525400a8231a#015#012CSeq: 123609750 ACK#015#012Content-Length: 0#015#012#015#012>\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: ERROR: sipcapture [sipcapture.c:2975]: nosip_hep_msg(): couldn't parse sip message\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/tcp_read.c:1328]: hep3_process_msg(): running hep3 handling event returned -1\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: ERROR: <core> [core/tcp_read.c:1334]: hep3_process_msg(): error running hep3 handling event: -1\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/tcp_read.c:1664]: release_tcpconn(): releasing con 0x7f7bc44780e8, state -2, fd=8, id=6 ([52.X.X.X]:50985 -> [52.X.X.X]:9061)\r\nJun  1 22:20:30 dtla-homer41 homer[9214]: DEBUG: <core> [core/tcp_read.c:1665]: release_tcpconn(): extra_data (nil)\r\n\r\nThe kamailio.cfg is pretty much identical to the default one for sipcapture, with the exception of changes for the tcp listener and database url.  The other differences are:\r\n\r\n#disable_tcp=yes\r\ntcp_accept_hep3=1\r\ntcp_accept_no_cl=yes\r\n\r\nOn the OpenSIPS 2.4.1 that is feed data, these are the pertinent snippets:\r\n\r\n#### HEP encapsulation protocol\r\nloadmodule \"proto_hep.so\"\r\nmodparam(\"proto_hep\", \"hep_id\", \"[homer41] 10.X.X.41:9061; transport=tcp; version=3\")\r\nmodparam(\"proto_hep\", \"homer5_on\", 1)\r\n\r\n#### siptrace module:  So that we can replicate the SIP messages to another server or to a database\r\nloadmodule \"siptrace.so\"\r\nmodparam(\"siptrace\", \"trace_id\", \"[homer41-st]uri=hep:homer41\")\r\n\r\nsip_trace(\"homer41-st\", \"d\"); gets called up in the main routing block upon an initial INVITE request.\r\n\r\nThe pcaps I captures on the wire have the data segment of the packet start with the value \"HEP3\" .\r\n\r\nPlease advise.  Thanks!"},"comment":{"url":"https://api.github.com/repos/sipcapture/homer/issues/comments/395952231","html_url":"https://github.com/sipcapture/homer/issues/295#issuecomment-395952231","issue_url":"https://api.github.com/repos/sipcapture/homer/issues/295","id":395952231,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTk1MjIzMQ==","user":{"login":"lmangani","id":1423657,"node_id":"MDQ6VXNlcjE0MjM2NTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1423657?v=4","gravatar_id":"","url":"https://api.github.com/users/lmangani","html_url":"https://github.com/lmangani","followers_url":"https://api.github.com/users/lmangani/followers","following_url":"https://api.github.com/users/lmangani/following{/other_user}","gists_url":"https://api.github.com/users/lmangani/gists{/gist_id}","starred_url":"https://api.github.com/users/lmangani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmangani/subscriptions","organizations_url":"https://api.github.com/users/lmangani/orgs","repos_url":"https://api.github.com/users/lmangani/repos","events_url":"https://api.github.com/users/lmangani/events{/privacy}","received_events_url":"https://api.github.com/users/lmangani/received_events","type":"User","site_admin":false},"created_at":"2018-06-09T08:48:26Z","updated_at":"2018-06-09T08:48:26Z","author_association":"MEMBER","body":"Hi @mishehu we're migrating off to our own capture servers - perhaps this is a good excuse to test a setup with `heplify-server` and see if the results change. You can find docker examples [here](https://github.com/sipcapture/homer-docker/tree/master/heplify-server)"}}
{"actor":{"display_login":"lmangani"}}