[FS-9657] FS does not send Homer Encapsulation Protocol packets for inbound TLS messages Created: 21/Oct/16  Updated: 08/Mar/19  Resolved: 26/Feb/19

Status: Closed
Project: FreeSWITCH
Component/s: mod_sofia
Affects Version/s: 1.6.10
Fix Version/s: 20.19.2, fs-next-release

Type: Bug Priority: Minor
Reporter: Daniel Greenwald Assignee: Mike Jerris
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File freeswitch-1.8.1-tls-capture.patch    
CPU Architecture:
x86-64
Kernel:
Linux
Userland:
GNU/Linux
Distribution:
Debian
Distribution Version:
Debian 8 jessie
Compiler:
gcc
FreeSWITCH GIT Revision: FreeSWITCH Version 1.6.10-17-726448d~64bit (-17-726448d 64bit)
GIT Master Revision hash:: FreeSWITCH Version 1.6.10-17-726448d~64bit (-17-726448d 64bit)
Target Version:

 Description   
When in TCP or UDP mode, Freeswitch sends HEP packets for SIP messages it sends and receives. In TLS mode it only sends HEP for outbound SIP messages. Not for inbound sip messages sent to freeswitch.

 Comments   
Comment by William King [ 21/Oct/16 ]
Which HEP version are you using? v1 or v3?
Comment by William King [ 21/Oct/16 ]
Wrong ticket marked.
Comment by Daniel Greenwald [ 21/Oct/16 ]
Same results with either v1 or v3.
Comment by Alex Sibyakin [ 23/Jan/18 ]
Due to a long period of inactivity, this issue is due to be close within 1 week. If problem is still present please test it against latest commit from master branch and leave a comment here or contact me directly via alex@freeswitch.com
Comment by Tom Parrott [ 21/Aug/18 ]
Hi

Please can this be re-opened, it is still very much a problem, and present in 1.8.1.

Original discussion here: https://groups.google.com/forum/#!msg/homer-discuss/JYHilnN4WqY/sHdN7b6jBAAJ
Comment by Tom Parrott [ 21/Aug/18 ]
I am using sngrep with the -L 'udp:127.0.0.1:9060' and Freeswitch sofia.conf.xml containing:

    <param name="capture-server" value="udp:127.0.0.1:9060"/>

I then run in fs_cli

sofia global capture on

I can see outbound SIP packets over TLS connections in sngrep, but not responses or inbound packets.

Comment by Tom Parrott [ 21/Aug/18 ]
I've found a fix for this, it looks like the original feature adding this missed the inbound TLS logging.

Here is a patch that implements it.

diff -ru freeswitch-1.8.1-orig/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c freeswitch-1.8.1/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c
--- freeswitch-1.8.1-orig/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c 2018-08-17 15:04:27.000000000 +0000
+++ freeswitch-1.8.1/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c 2018-08-21 15:30:39.153375464 +0000
@@ -468,6 +468,9 @@
   if (self->tp_master->mr_dump_file)
     tport_dump_iovec(self, msg, n, iovec, veclen, "recv", "from");

+ if (self->tp_master->mr_capt_sock)
+ tport_capt_msg(self, msg, n, iovec, veclen, "recv");
+
   /* Mark buffer as used */
   msg_recv_commit(msg, N, 0);

Comment by Mike Jerris [ 28/Aug/18 ]
please create a pull request for this
Comment by Tom Parrott [ 29/Aug/18 ]
Thanks Mike, I have created that now https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/1578/diff
Comment by Tom Parrott [ 03/Sep/18 ]
Hi @mike is the PR I supplied acceptable? Thanks
Comment by Tom Parrott [ 07/Oct/18 ]
Do you know whether this is acceptable to be merged, and if so, approximately how long until that happens?

Thanks
Tom
Generated at Thu Apr 25 03:17:10 CDT 2019 using JIRA 7.3.3#73014-sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.