From fa0662fb0044efc218dc9fa99527db3e14966c49 Mon Sep 17 00:00:00 2001 From: areski Date: Wed, 9 Dec 2020 19:27:19 +0100 Subject: [PATCH] [fix](sipaccount) allow to pass InviterOptions when making call --- src/lib/SipAccount.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/SipAccount.ts b/src/lib/SipAccount.ts index e5a95fa..6a410ff 100644 --- a/src/lib/SipAccount.ts +++ b/src/lib/SipAccount.ts @@ -11,6 +11,7 @@ import { } from 'sip.js' import { TransportOptions } from 'sip.js/lib/platform/web' +import { InviterOptions } from "sip.js/lib/api" import { phoneStore } from '../index' import { NEW_USERAGENT } from '../actions/sipAccounts' import { SessionStateHandler, getFullNumber } from '../util/sessions' @@ -118,7 +119,7 @@ export default class SIPAccount { }) } - makeCall(number: string) { + makeCall(number: string, options: InviterOptions) { const state = phoneStore.getState() // @ts-ignore const sessionsLimit: number = state.config.phoneConfig.sessionsLimit @@ -146,7 +147,7 @@ export default class SIPAccount { if (target) { console.log(`Calling ${number}`) - const inviter = new Inviter(this._userAgent, target) + const inviter = new Inviter(this._userAgent, target, options) // An Inviter is a Session const outgoingSession: Session = inviter // Setup outgoing session delegate