Skip to content

Commit

Permalink
Feat/refer support conplex uri for refer-to refered-by header (#131)
Browse files Browse the repository at this point in the history
* respond to reinvite request incase error

* support complex refer-to refer-by uri

* wip
  • Loading branch information
xquanluu authored May 7, 2024
1 parent d2807c6 commit 1baf7fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions lib/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1baf7fa

Please sign in to comment.