<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hi All,</p>
<p><br>
</p>
<p>I'm trying to diagnose an issue with Asterisk 13 and PJSIP where TLS connections are being randomly closed by Asterisk. I'm currently testing the latest GIT version which uses Bundled PJSIP 2.6.</p>
<p><br>
</p>
<p>Phones are set to register every 120 seconds, so connections shouldn't be timing out.</p>
<p><br>
</p>
<p>I have a feeling this is related to the PJSIP keepalive options (<a href="https://trac.pjsip.org/repos/ticket/95" target="_blank" class="x_OWAAutoLink" id="LPlnk226859" previewremoved="true">https://trac.pjsip.org/repos/ticket/95</a>):</p>
<p><br>
</p>
</div>
<blockquote style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px; margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div dir="ltr" style="font-size: 12pt;">
<p>PJSIP_TCP/TLS_KEEP_ALIVE_INTERVAL</p>
</div>
</blockquote>
<div dir="ltr" style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<p><br>
</p>
<p>I have tried setting these in the pjsip config, however, it doesn't appear to be working:</p>
<p></p>
<p><br>
</p>
</div>
<blockquote style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px; margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div dir="ltr" style="font-size: 12pt;">
<p>'netstat --timers -tn' shows that keepalives are not currently is use:</p>
</div>
<div dir="ltr" style="font-size: 12pt;">
<p><br>
</p>
</div>
<div dir="ltr" style="font-size: 12pt;">tcp 0 0 <DESTINATION IP>:5060 <SROURCE IP>:39395 ESTABLISHED off (0.00/0/0)</div>
<div dir="ltr" style="font-size: 12pt;">tcp 0 0 <DESTINATION IP>:22 <SROURCE IP>:61282 ESTABLISHED keepalive (195.31/0/0)</div>
<div dir="ltr" style="font-size: 12pt;"><b>tcp 0 0 <DESTINATION IP>:5061 <SROURCE IP>:46216 ESTABLISHED off (0.00/0/0)</b></div>
<div dir="ltr" style="font-size: 12pt;"><b>tcp 0 0 <DESTINATION IP>:5061 <SROURCE IP>:47727 ESTABLISHED off (0.00/0/0)</b></div>
<div dir="ltr" style="font-size: 12pt;"><b>tcp 0 0 <DESTINATION IP>:5061 <SROURCE IP>:56087 ESTABLISHED off (0.00/0/0)</b></div>
<div dir="ltr" style="font-size: 12pt;">tcp 0 704 <DESTINATION IP>:22 <SROURCE IP>:59566 ESTABLISHED on (0.04/0/0)</div>
<div dir="ltr" style="font-size: 12pt;">tcp 0 0 <DESTINATION IP>:5060 <SROURCE IP>:39394 ESTABLISHED off (0.00/0/0)</div>
<div dir="ltr" style="font-size: 12pt;">tcp 0 0 <DESTINATION IP>:5060 <SROURCE IP>:46139 ESTABLISHED off (0.00/0/0)</div>
</blockquote>
<div dir="ltr" style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<p style="font-size: 12pt;"></p>
<br>
<p style="font-size: 12pt;"></p>
<p style="font-size: 12pt;"><br>
</p>
<p style="font-size: 12pt;">Would <span style="color: rgb(36, 39, 41); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px;">SO_KEEPALIVE need to be defined when setting up sockets in Asterisk?</span></p>
<p style="font-size: 12pt;"><span style="color: rgb(36, 39, 41); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px;"><br>
</span></p>
<p><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif"><span style="font-size: 15px;">Best regards,</span></font></p>
<p><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif"><span style="font-size: 15px;"><br>
</span></font></p>
<p><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif"><span style="font-size: 15px;">Ross</span></font></p>
</div>
<br>
<p></p>
</div>
</body>
</html>