Skip to main content

Customizing Phone Numbers for Audio Call Appointments

To fetch and populate phone numbers for audio call appointments based on the participant model, you can override the get_phone_numbers function within the AppointmentView class. This function retrieves the phone numbers associated with the participant model and returns them as a list of tuples. Each tuple contains the phone number in both display and raw formats.

class AppointmentView(AppointmentBaseView):
# Other configurations and methods...

def get_phone_numbers(self):
'''
If the appointment type is a phone call, override this method to populate a list of mobile numbers.
This method should return a list of tuples, each containing the phone number in both display and raw formats.
For example: [('+91XXXXXXXXXX', "+91XXXXXXXXXX")]
'''
# Custom logic to fetch phone numbers from the participant model
# Replace the example phone number with actual data retrieval
return [('+917021640519', '+917021640519')]

Explanation:

  • Override the get_phone_numbers function in the AppointmentView class to fetch phone numbers for audio call appointments from the participant model.
  • Customize the logic within this method to retrieve the phone numbers associated with the participants as needed.
  • Return a list of tuples where each tuple contains the phone number in both display and raw formats. Update the example phone number with the actual data retrieved from the participant model.
  • By modifying this function, you can ensure that the phone numbers for audio call appointments are accurately populated based on the participant's data stored in the application.