|
@@ -509,7 +509,7 @@ class ToTextBotAgent:
|
|
|
@singleton_keys
|
|
|
class BotAgent:
|
|
|
|
|
|
- def __init__(self, app, user_part_range=range(1001, 1011), host="192.168.100.159", port="5060", password="slibra@#123456"):
|
|
|
+ def __init__(self, app, user_part_range=range(1001, 1011), host=SIP_SERVER, port="5060", password="slibra@#123456"):
|
|
|
self.app = app
|
|
|
self.logger = app.logger
|
|
|
self.user_part_range, self.host, self.port, self.password = user_part_range, host, port, password
|
|
@@ -566,9 +566,9 @@ class BotAgent:
|
|
|
acfg.regConfig.retryIntervalSec = 10 # 重试间隔时间(秒)
|
|
|
acfg.regConfig.firstRetryIntervalSec = 10 # 首次重试间隔时间(秒)
|
|
|
|
|
|
- # acfg.natConfig.iceEnabled = True
|
|
|
- # acfg.natConfig.turnEnabled = True
|
|
|
- # acfg.natConfig.turnServer = f"stun:{self.host}:3478"
|
|
|
+ acfg.natConfig.iceEnabled = True
|
|
|
+ acfg.natConfig.turnEnabled = True
|
|
|
+ acfg.natConfig.turnServer = f"stun:{self.host}:3478"
|
|
|
# acfg.natConfig.turnUsername = "username"
|
|
|
# acfg.natConfig.turnPassword = "password"
|
|
|
|