juha-h / libbaresip-android

libbaresip for Android
Other
40 stars 29 forks source link

Fix stateless TLS SIP requests #42

Closed ndilieto closed 1 week ago

ndilieto commented 4 months ago

The request() function in re/src/sip/request.c fails with EINVAL when sending stateless requests (for example ACKs) to a TLS server, which makes SIP calls terminate.

This is because request() calls sip_send_conn() which always passes a NULL host to sip_transp_send(). This gets passed down to conn_send() in re/src/sip/transp.c and ultimately to tls_set_verify_server() which fails with EINVAL.

This patch replaces sip_send_conn() with sip_transp_send(), so that the host is passed down correctly.

juha-h commented 4 months ago

Thanks for the PR. I'll pass it on to re project.

juha-h commented 4 months ago

@ndilieto Could you open this PR in re project https://github.com/baresip/re so that I don't need to be in the middle?