Capacitor Voip
npm install capacitor-voipCapacitor Voip
``bash`
npm install capacitor-voip
npx cap sync
* initCore()
* login(...)
* outgoingCall(...)
* terminateCall()
* acceptCall()
* pauseOrResumeCall()
* toggleSpeaker()
* muteMicrophone()
* Interfaces
`typescript`
initCore() => Promise
Returns: Promise<CoreResult>
--------------------
`typescript`
login(params: AccountParams) => Promise
| Param | Type |
| ------------ | ------------------------------------------------------- |
| params | AccountParams |
Returns: Promise<LoginResult>
--------------------
`typescript`
outgoingCall(params: { address: string; }) => Promise<{ message: string; }>
| Param | Type |
| ------------ | --------------------------------- |
| params | { address: string; } |
Returns: Promise<{ message: string; }>
--------------------
`typescript`
terminateCall() => Promise
--------------------
`typescript`
acceptCall() => Promise
--------------------
`typescript`
pauseOrResumeCall() => Promise
--------------------
`typescript`
toggleSpeaker() => Promise
Returns: Promise<toogleSpeakerResult>
--------------------
`typescript`
muteMicrophone() => Promise
Returns: Promise<muteMicrophoneResult>
--------------------
#### CoreResult
| Prop | Type |
| ------------------ | -------------------- |
| status | boolean |
| core_version | string |
#### LoginResult
| Prop | Type |
| ------------- | -------------------- |
| success | boolean |
| message | string |
| account | string |
#### AccountParams
| Prop | Type |
| -------------------- | ------------------- |
| username | string |
| password | string |
| domain | string |
| transport_type | string |
#### toogleSpeakerResult
| Prop | Type |
| --------------------- | -------------------- |
| speaker_enabled | boolean |
| audio_type | string |
#### muteMicrophoneResult
| Prop | Type |
| -------------- | -------------------- |
| is_muted` | boolean |