<p>Hi Henningw,,<br>
I further went thru the logs of kamailio, and i see the below happening.</p>
<p>tls [tls_server.c:169]:  tls_get_connect_server_name[]: xavp with outbound server name not found<br>
tls [tls_server.c:152]:  tls_get_connect_server_id[]: found xavp with outbound server id: btip.176.com</p>
<p>Its strange its able to find the client profile based on server_id , but not able to find using the server_name</p>
<p>In tls_complete_init( )</p>
<p>if (c->flags & F_CONN_PASSIVE) {<br>
state=S_TLS_ACCEPTING;<br>
dom = tls_lookup_cfg(cfg, TLS_DOMAIN_SRV,<br>
&c->rcv.dst_ip, c->rcv.dst_port, 0, 0);<br>
} else {<br>
state=S_TLS_CONNECTING;<br>
sname = tls_get_connect_server_name();<br>
srvid = tls_get_connect_server_id();<br>
dom = tls_lookup_cfg(cfg, TLS_DOMAIN_CLI,<br>
&c->rcv.dst_ip, c->rcv.dst_port, sname, srvid);<br>
}</p>
<p>Am acting as client, so it will hit the else part</p>
<p>the call to  sname = tls_get_connect_server_name(); //failed with below logs<br>
tls [tls_server.c:169]:  tls_get_connect_server_name[]: xavp with outbound server name not found</p>
<p>the call to   srvid = tls_get_connect_server_id();  // success with below logs<br>
tls [tls_server.c:152]:  tls_get_connect_server_id[]: found xavp with outbound server id: btip.176.com</p>
<p>And futher down in the function : as sname is NULL, it is not setting the server name extension in client hello message.</p>
<p>#ifndef OPENSSL_NO_TLSEXT<br>
if (sname!=NULL) {<br>
if(!SSL_set_tlsext_host_name(data->ssl, sname->s)) {<br>
if (data->ssl)<br>
SSL_free(data->ssl);<br>
if (data->rwbio)<br>
BIO_free(data->rwbio);<br>
goto error;<br>
}<br>
LM_DBG("outbound TLS server name set to: %s\n", sname->s);<br>
}<br>
#endif</p>
<p>Am i missing anything here w.r.t configuration ? or is it a bug ? which has been fixed in later versions ? Please help !!</p>
<p>Regards,<br>
Mahesh.B</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1938?email_source=notifications&email_token=ABO7UZPJG3DM7C2UGSEN45LQZRSL5A5CNFSM4HILTDM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMBSCI#issuecomment-567810313">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIO2YNPHJCTEBXGFE3QZRSL5ANCNFSM4HILTDMQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZIANAUBICEBGAENLZLQZRSL5A5CNFSM4HILTDM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMBSCI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1938?email_source=notifications\u0026email_token=ABO7UZPJG3DM7C2UGSEN45LQZRSL5A5CNFSM4HILTDM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMBSCI#issuecomment-567810313",
"url": "https://github.com/kamailio/kamailio/issues/1938?email_source=notifications\u0026email_token=ABO7UZPJG3DM7C2UGSEN45LQZRSL5A5CNFSM4HILTDM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMBSCI#issuecomment-567810313",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>