|
@@ -238,16 +238,15 @@ class SipConnection(object):
|
|
|
if "domain_dyn_tag" in self._config_info and "domain_dyn_log" in self._config_info:
|
|
|
return get_ip_from_logfile(self._config_info["domain_dyn_tag"], self._config_info["domain_dyn_log"])
|
|
|
|
|
|
- def start(self):
|
|
|
- self.log("starting ")
|
|
|
- self._core.use_files = True
|
|
|
- self._core.record_file = self._incoming_stream_file
|
|
|
+ def set_connection_info(self):
|
|
|
+ self._core.clear_proxy_config()
|
|
|
|
|
|
proxy_cfg = self._core.create_proxy_config()
|
|
|
|
|
|
domain = self.get_domain_info()
|
|
|
|
|
|
- proxy_cfg.identity_address = self._core.create_address('sip:' + self._config_info["username"] + '@' + domain + ':5060')
|
|
|
+ proxy_cfg.identity_address = self._core.create_address(
|
|
|
+ 'sip:' + self._config_info["username"] + '@' + domain + ':5060')
|
|
|
proxy_cfg.server_addr = 'sip:' + domain + ':5060'
|
|
|
proxy_cfg.register_enabled = True
|
|
|
self._core.add_proxy_config(proxy_cfg)
|
|
@@ -255,6 +254,13 @@ class SipConnection(object):
|
|
|
None, None, domain)
|
|
|
self._core.add_auth_info(auth_info)
|
|
|
|
|
|
+ def start(self):
|
|
|
+ self.log("starting ")
|
|
|
+ self._core.use_files = True
|
|
|
+ self._core.record_file = self._incoming_stream_file
|
|
|
+
|
|
|
+ self.set_connection_info()
|
|
|
+
|
|
|
while not self._is_quitting:
|
|
|
sleep(0.03)
|
|
|
self._core.iterate()
|