drachtio / drachtio-server

A SIP call processing server that can be controlled via nodejs applications
https://drachtio.org
MIT License
237 stars 92 forks source link

TLS error #312

Closed sumit-kumar-iitm closed 12 months ago

sumit-kumar-iitm commented 12 months ago

I am trying running drachtio-server with TLS enabled, I have got the certificate from goDaddy. Below is my drachtio.conf.xml section for TLS

  <sip>
         <contacts>
            <contact external-ip="18.216.*.*">sip:*;transport=udp</contact>
            <contact external-ip="18.216.*.*">sips:*;transport=tls</contact>
        </contacts>
  </sip>
  <tls>
        <key-file>/home/admin/certs/key.pem</key-file>
        <cert-file>/home/admin/certs/cert.crt</cert-file>
        <chain-file>/home/admin/certs/bundle.crt</chain-file>
  </tls>

The drachtio server is not able to run then. I see below lines in the logs

2023-09-11 15:35:50.786495 tport_type_tls.c:229 tport_tls_init_master() tport_tls_init_master(0x55c035df8c80): tls key file (TPTAG_TLS_CERTIFICATE_KEY_FILE) is required and not specified
2023-09-11 15:35:50.786509 tport.c:1165 tport_zap_secondary() tport_zap_secondary(0x55c035df8c80): zap tport 0x55c035df8c80 from (null)/(null):(null), count(wss) is 0, count(tcp) is 0
2023-09-11 15:35:50.786521 tport.c:758 tport_listen() tport_listen(0x55c035e28600): tls_init_master(pf=2 tls/[172.31.25.82]:5061): Address family not supported by protocol
2023-09-11 15:35:50.786531 nta.c:2345 nta_agent_add_tport() nta: bind(18.216.242.164:5061;transport=tls;maddr=*): Address family not supported by protocol
2023-09-11 15:35:50.786537 DrachtioController::run: Error adding additional transport
davehorton commented 12 months ago

please refer to https://drachtio.org/docs/drachtio-server#tls

tls is a child tag of sip