fix: review comment

This commit is contained in:
Quan Luu
2022-09-15 06:51:56 +07:00
parent 95f863295b
commit cc707e8513

View File

@@ -44,7 +44,8 @@ class Regbot {
async register(srf) {
try {
const contactAddress = process.env.JAMBONES_REGBOT_CONTACT_USE_IP ? srf.locals.sbcPublicIpAddress : this.aor;
const contactAddress = process.env.JAMBONES_REGBOT_CONTACT_USE_IP ?
`${this.username}@${srf.locals.sbcPublicIpAddress}` : this.aor;
const req = await srf.request(`sip:${this.aor}`, {
method: 'REGISTER',
proxy: `sip:${this.ipv4}:${this.port}`,