diff --git a/src/core/index.ts b/src/core/index.ts index 24b355d..5bb9002 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -113,15 +113,16 @@ export const vsipAPI: VsipAPI = { speakerVolume: speakerVolume, }, actions: { - init (domain, username, password, pnExtraHeaders) { + init (domain, username, password, socketInterfaces, pnExtraHeaders) { try { + socketInterfaces = socketInterfaces && socketInterfaces.length > 0 ? socketInterfaces : [ `wss://${domain}` ] openSIPSJS = new OpenSIPSJS({ configuration: { session_timers: false, uri: `sip:${username}@${domain}`, password: password }, - socketInterfaces: [ `wss://${domain}` ], + socketInterfaces, sipDomain: `${domain}`, sipOptions: { session_timers: false,