feat: Add voice channel support for Chatwoot

This commit is contained in:
Sojan
2025-04-27 00:48:05 -07:00
parent ef6949e32d
commit 8d660df4c4
24 changed files with 559 additions and 18 deletions
@@ -0,0 +1,21 @@
/* global axios */
import ApiClient from '../ApiClient';
class VoiceAPI extends ApiClient {
constructor() {
// Use empty string for resource to avoid duplicate 'accounts' in URL
super('', { accountScoped: true });
}
// Initiate a call to a contact
initiateCall(contactId) {
// Get the account ID from the current URL
const accountId = this.accountIdFromRoute;
// Make sure we have the right endpoint path
return axios.post(
`/api/v1/accounts/${accountId}/contacts/${contactId}/call`
);
}
}
export default new VoiceAPI();