fix: moved twilio inside integrations folder
This commit is contained in:
parent
e0544df4bc
commit
27f405144d
@ -62,7 +62,7 @@ class TwilioSettings(Document):
|
||||
frappe.throw(_("Twilio API credential creation error."))
|
||||
|
||||
def get_twilio_voice_url(self):
|
||||
url_path = "/api/method/crm.twilio.api.voice"
|
||||
url_path = "/api/method/crm.integrations.twilio.api.voice"
|
||||
return get_public_url(url_path)
|
||||
|
||||
def get_application(self, twilio, friendly_name=None):
|
||||
|
||||
@ -69,11 +69,11 @@ class Twilio:
|
||||
return identity.replace('(at)', '@')
|
||||
|
||||
def get_recording_status_callback_url(self):
|
||||
url_path = "/api/method/crm.twilio.api.update_recording_info"
|
||||
url_path = "/api/method/crm.integrations.twilio.api.update_recording_info"
|
||||
return get_public_url(url_path)
|
||||
|
||||
def get_update_call_status_callback_url(self):
|
||||
url_path = "/api/method/crm.twilio.api.update_call_status_info"
|
||||
url_path = "/api/method/crm.integrations.twilio.api.update_call_status_info"
|
||||
return get_public_url(url_path)
|
||||
|
||||
def generate_twilio_dial_response(self, from_number: str, to_number: str):
|
||||
@ -228,7 +228,7 @@ const note = ref({
|
||||
async function updateNote(_note, insert_mode = false) {
|
||||
note.value = _note
|
||||
if (insert_mode && _note.name) {
|
||||
await call('crm.twilio.api.add_note_to_call_log', {
|
||||
await call('crm.integrations.twilio.api.add_note_to_call_log', {
|
||||
call_sid: _call.value.parameters.CallSid,
|
||||
note: _note.name,
|
||||
})
|
||||
@ -243,14 +243,14 @@ let { style } = useDraggable(callPopup, {
|
||||
})
|
||||
|
||||
async function is_twilio_enabled() {
|
||||
return await call('crm.twilio.api.is_enabled')
|
||||
return await call('crm.integrations.twilio.api.is_enabled')
|
||||
}
|
||||
|
||||
async function startupClient() {
|
||||
log.value = 'Requesting Access Token...'
|
||||
|
||||
try {
|
||||
const data = await call('crm.twilio.api.generate_access_token')
|
||||
const data = await call('crm.integrations.twilio.api.generate_access_token')
|
||||
log.value = 'Got a token.'
|
||||
intitializeDevice(data.token)
|
||||
} catch (err) {
|
||||
@ -286,7 +286,7 @@ function addDeviceListeners() {
|
||||
device.on('incoming', handleIncomingCall)
|
||||
|
||||
device.on('tokenWillExpire', async () => {
|
||||
const data = await call('crm.twilio.api.generate_access_token')
|
||||
const data = await call('crm.integrations.twilio.api.generate_access_token')
|
||||
device.updateToken(data.token)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user