The sipcapture module works great when you send hepv3 packets over the UDP transport however if kamailio start listening those hepv3 packtes on TCP and sending those hepv3 on TCP it will concern about it.
**This is what Kamilio receives over TCP.**
T 52.10.155.177:47283 -> 172.19.8.21:9060 [AP] HEP3.0................... ......... ...........[............. W*y6... . ..h...... .................OPTIONS sip:edge.rarevase.com;transport=tcp SIP/2.0. Via: SIP/2.0/TCP 172.19.16.130:53083;rport;branch=z9hG4bKPj66df463f-ca4b-4f98-ba17-722fe3fc4a92;alias. From: sip:asterisk@172.19.16.130;tag=86ebab1d-eb4e-4986-898d-c7392b6b747b. To: sip:edge.rarevase.com. Contact: sip:asterisk@172.19.16.130:53083;transport=TCP. Call-ID: ed24ab3c-4f42-4a9d-8e2d-9a3acd5b5b70. CSeq: 3809 OPTIONS. Max-Forwards: 70. User-Agent: Asterisk PBX 13.8.0. Content-Length: 0. .
## T 52.10.155.177:47283 -> 172.19.8.21:9060 [AP] HEP3.................... ......... ...................[..... W*y6... . ..|...... .................SIP/2.0 200 OK. Via: SIP/2.0/TCP 172.19.16.130:53083;rport=53083;received=172.19.16.130;branch=z9hG4bKPj66df463f-ca4b-4f98-ba17-722fe3fc4a92;alias. From: sip:asterisk@172.19.16.130;tag=86ebab1d-eb4e-4986-898d-c7392b6b747b. To: sip:edge.rarevase.com;tag=24voZr. Call-ID: ed24ab3c-4f42-4a9d-8e2d-9a3acd5b5b70. CSeq: 3809 OPTIONS. Max-Forwards: 70. Content-Length: 0. Supported: path,gruu,outbound. Accept: */*. Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,INFO,UPDATE,SUBSCRIBE,NOTIFY,REFER,MESSAGE,REGISTER. .
**This are the logs on the Kamailio.**
`May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: INFO: <core> [parser/parse_fline.c:144]: parse_first_line(): ERROR:parse_first_line: method not followed by SP May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: ERROR: <core> [parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 0) May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: DEBUG: <core> [parser/msg_parser.c:604]: parse_msg(): parse_msg: invalid message May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: ERROR: <core> [parser/msg_parser.c:690]: parse_msg(): ERROR: parse_msg: message=<HEP3#003<98>> May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: ERROR: <core> [receive.c:173]: receive_msg(): core parsing of SIP message failed (52.10.155.177:59607/2)`
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599
Hopefully @adubovikov can follow up on this one and assert if it is an issue or misconfiguration.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-217423876
kamailio's sipcapture module curently do now only SREV_NET_DGRAM_IN hook.
``` /* register DGRAM event */ if(sr_event_register_cb(SREV_NET_DGRAM_IN, hep_msg_received) < 0) { LM_ERR("failed to register SREV_NET_DGRAM_IN event\n"); return -1; }
``` and currently kamaillo's tcp_read.c don't have any possibility to do custom hook. Maybe if we can implement it similar way as for udp_read.c this can solve the issue.
base on my prevision tests it should be in
``` int receive_tcp_msg(char* tcpbuf, unsigned int len, struct receive_info* rcv_info, struct tcp_connection* con) {
.... if(unlikely(sr_event_enabled(SREV_NET_DGRAM_IN))) { .... if(sr_event_exec(SREV_NET_DGRAM_IN, (void*)sredp)<0) { /* data handled by callback - continue to next packet */ return 0; } return receive_msg(tcpbuf, len, rcv_info);
}
``` of course it should be called SREV_NET_STREAM_IN not DGRAM..
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-217425742
@miconda
can we replace sr_event_enable to register_nonsip_msg_hook and use it in both transports UDP/TCP ?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-217434090
The nonsip msg hook works for all transports, you can change to it if it helps.
There is also SREV_NET_DATA_IN, but that probably needs some extra handling for its response code not to continue processing inside receive_msg().
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-217439789
unfortunately the non_sip_hook doesn't work in this case, because kamailio does msg parse before call hooks. I will keep using event_exec for DGRAM and add DATA_IN as second alternative for TCP/SCTP streams.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-217796892
Is anything else needed here or you sorted out all the variants?
We can add a new core event if it simplifies things.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-232359851
Daniel,
let me prepare the patch for a core event. Unfortunately I can do it only next week.
Wbr, Alexandr
On 13 July 2016 at 15:47, Daniel-Constantin Mierla <notifications@github.com
wrote:
Is anything else needed here or you sorted out all the variants?
We can add a new core event if it simplifies things.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/issues/599#issuecomment-232359851, or mute the thread https://github.com/notifications/unsubscribe/AF36ZWvjEYgq0jTFZ4RG1gFdFKOzD_iQks5qVOx2gaJpZM4IXogo .
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Since these commits https://github.com/kamailio/kamailio/commit/181308465ac54ca4a1404eb3f3f189fc... https://github.com/kamailio/kamailio/commit/4e789387f8cfe72fa9e8d43f9963033d...
kamailio can receive HEP in any streaming protocol and use directly $hep pseudovariables . At first HEP will arrive to the event_route[sipcapture:request] there you can decide if this is SIP duplication and send to kamaialio's parser or reports and insert it directly to any report's table: log, rtcp etc...
I think we can close the ticket.
--- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/599#issuecomment-237553236
Closed #599.