mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2025-12-19 04:27:46 +00:00
per RFC 3261 the request-uri of REGISTER must not have userinfo (#72)
This commit is contained in:
@@ -124,13 +124,16 @@ class Regbot {
|
||||
}
|
||||
|
||||
this.logger.debug(`sending REGISTER for ${this.aor}`);
|
||||
const isIPv4 = /[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/.test(this.ipv4);
|
||||
const isIPv4 = /^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/.test(this.ipv4);
|
||||
|
||||
const proxy = `sip:${this.ipv4}${isIPv4 ? `:${this.port}` : ''};transport=${transport}`;
|
||||
const req = await srf.request(`${scheme}:${this.aor}`, {
|
||||
this.logger.debug({isIPv4}, `sending via proxy ${proxy}`);
|
||||
const req = await srf.request(`${scheme}:${this.sip_realm}`, {
|
||||
method: 'REGISTER',
|
||||
proxy,
|
||||
headers: {
|
||||
'From': this.from,
|
||||
'To': this.from,
|
||||
'Contact': `<${scheme}:${contactAddress};transport=${transport}>;expires=${DEFAULT_EXPIRES}`,
|
||||
'Expires': DEFAULT_EXPIRES
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user