Skip to content

Commit baf32ff

Browse files
committed
Warm transfer supports caller id
1 parent 4394b03 commit baf32ff

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ two.
387387
```ts
388388
const { complete, cancel, newSession } = await session.warmTransfer(
389389
transferToNumber,
390+
callerId, // optional, transferee will see this number if specified
390391
);
391392
```
392393

src/call-session/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class CallSession extends EventEmitter {
177177

178178
public async warmTransfer(
179179
target: string,
180+
callerId?: string,
180181
): Promise<
181182
{
182183
complete: () => Promise<void>;
@@ -186,7 +187,7 @@ class CallSession extends EventEmitter {
186187
> {
187188
await this.hold();
188189
// create a new session and user needs to talk to the target before transfer
189-
const newSession = await this.webPhone.call(target);
190+
const newSession = await this.webPhone.call(target, callerId);
190191
return {
191192
// complete the transfer
192193
complete: async () => {

0 commit comments

Comments
 (0)