Retrieve a list of phone numbers.
This endpoint supports pagination and filtering by voice assistant or squad.
Parameters:
request (Request): The FastAPI request object.
skip (int): The number of phone numbers to skip (for pagination).
limit (int): The maximum number of phone numbers to return.
voice_assistant_id (Optional[int]): Filter by voice assistant ID.
squad_id (Optional[int]): Filter by squad ID.
db (AsyncSession): The database session (injected).
organization_id (Optional[str]): The organization ID from the API key or request.
Returns:
List[PhoneNumber]: A list of phone numbers.
Raises:
HTTPException:
- 400: If organization ID is missing
- 404: If filtered voice assistant or squad is not found
- 500: If an unexpected error occurs during retrieval