Feat/refer support conplex uri for refer-to refered-by header (#131)

* respond to reinvite request incase error

* support complex refer-to refer-by uri

* wip
This commit is contained in:
Hoan Luu Huu
2024-05-07 19:28:08 +07:00
committed by GitHub
parent d2807c69ed
commit 1baf7fa824
3 changed files with 11 additions and 10 deletions

View File

@@ -1038,8 +1038,9 @@ Duration=${payload.duration} `
const response = await this.uac.request({
method: 'REFER',
headers: {
'Refer-To': stringifyUri(uri),
'Referred-By': stringifyUri(u),
// Make sure the uri is protected by <> if uri is complex form
'Refer-To': `<${stringifyUri(uri)}>`,
'Referred-By': `<${stringifyUri(u)}>`,
...customHeaders
}
});

14
package-lock.json generated
View File

@@ -20,7 +20,7 @@
"cidr-matcher": "^2.1.1",
"debug": "^4.3.4",
"drachtio-fn-b2b-sugar": "^0.1.0",
"drachtio-srf": "^4.5.31",
"drachtio-srf": "^4.5.35",
"express": "^4.19.2",
"pino": "^8.20.0",
"sdp-transform": "^2.14.2"
@@ -1707,9 +1707,9 @@
}
},
"node_modules/drachtio-srf": {
"version": "4.5.31",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.31.tgz",
"integrity": "sha512-/M4J8h2aqHtMXWr8/UHngKQsY9sQQxjdd23jDTSpNVpCwgZ2/xZFhbg/B/UCjrarSRzbyDCvuluOAtaPRSw7Hw==",
"version": "4.5.35",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.35.tgz",
"integrity": "sha512-4LOb6Rjie8OHpUdqjhU8Zpkc6rquA4LBLqjH419bAJFKG/XqMYeIqPo7PF3GLy5TGghrx487RTP0DmFbH5B01g==",
"dependencies": {
"debug": "^3.2.7",
"delegates": "^0.1.0",
@@ -6659,9 +6659,9 @@
"requires": {}
},
"drachtio-srf": {
"version": "4.5.31",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.31.tgz",
"integrity": "sha512-/M4J8h2aqHtMXWr8/UHngKQsY9sQQxjdd23jDTSpNVpCwgZ2/xZFhbg/B/UCjrarSRzbyDCvuluOAtaPRSw7Hw==",
"version": "4.5.35",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.35.tgz",
"integrity": "sha512-4LOb6Rjie8OHpUdqjhU8Zpkc6rquA4LBLqjH419bAJFKG/XqMYeIqPo7PF3GLy5TGghrx487RTP0DmFbH5B01g==",
"requires": {
"debug": "^3.2.7",
"delegates": "^0.1.0",

View File

@@ -38,7 +38,7 @@
"cidr-matcher": "^2.1.1",
"debug": "^4.3.4",
"drachtio-fn-b2b-sugar": "^0.1.0",
"drachtio-srf": "^4.5.31",
"drachtio-srf": "^4.5.35",
"express": "^4.19.2",
"pino": "^8.20.0",
"sdp-transform": "^2.14.2"