+ if {'video.device', 'video.resolution', 'video.framerate', 'video.max_bitrate'}.intersection(notification.data.modified):
if {'video.device', 'video.resolution', 'video.framerate'}.intersection(notification.data.modified) or settings.video.device != self.video_device.name:
status = pjsip_tls_transport_start(self._obj, &tls_setting, &local_addr, NULL, 1, &self._tls_transport)
if status in (PJSIP_TLS_EUNKNOWN, PJSIP_TLS_EINVMETHOD, PJSIP_TLS_ECACERT, PJSIP_TLS_ECERTFILE, PJSIP_TLS_EKEYFILE, PJSIP_TLS_ECIPHER, PJSIP_TLS_ECTX):
raise PJSIPTLSError("Could not create TLS transport", status)
elif status != 0:
raise PJSIPError("Could not create TLS transport", status)
return 0
cdef int _stop_tls_transport(self) except -1:
self._tls_transport.destroy(self._tls_transport)
self._tls_transport = NULL
return 0
cdef int _set_dns_nameservers(self, list servers) except -1:
cdef int num_servers = len(servers)
cdef pj_str_t *pj_servers
cdef int status
cdef pj_dns_resolver *resolver
if num_servers == 0:
return 0
resolver = pjsip_endpt_get_resolver(self._obj)
if resolver == NULL:
raise SIPCoreError("Could not get DNS resolver on endpoint")
_rtp_port_usable_count = _rtp_port_count - _rtp_port_count % 2 # we need an even number of ports, so we won't use the last one if an odd number is provided
if _rtp_port_usable_count < 2:
raise SIPCoreError("RTP port range should contain at least 2 ports")