mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fixed dial verb should use calling id from From header (#958)
* fixed dial verb should use calling id from From header * fix review comment * wip
This commit is contained in:
@@ -507,10 +507,13 @@ class TaskDial extends Task {
|
|||||||
...this.headers
|
...this.headers
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// get calling user from From header
|
||||||
|
const parsedFrom = req.getParsedHeader('from');
|
||||||
|
const fromUri = parseUri(parsedFrom.uri);
|
||||||
const opts = {
|
const opts = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
proxy: `sip:${sbcAddress}`,
|
proxy: `sip:${sbcAddress}`,
|
||||||
callingNumber: this.callerId || req.callingNumber,
|
callingNumber: this.callerId || fromUri.user,
|
||||||
...(this.callerName && {callingName: this.callerName}),
|
...(this.callerName && {callingName: this.callerName}),
|
||||||
opusFirst: isOpusFirst(this.cs.ep.remote.sdp)
|
opusFirst: isOpusFirst(this.cs.ep.remote.sdp)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user