[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, 1.8.6

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:
Distribution Version:
Debian 8 jessie
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:

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.

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 ]

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:' and Freeswitch sofia.conf.xml containing:

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

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?

Generated at Sun Jun 16 11:58:43 CDT 2019 using Jira 8.1.0#801000-sha1:2e1cd1bb771978cda2c5e8f3f10539ab180613f6.