This repository contains a Flutter-based MVP for real-time VOIP audio calls using Agora's SDK. It includes three components:
- Caller App: Flutter app to initiate call requests.
- Listener App: Flutter app to receive and accept calls.
- Agora Backend: Node.js/Express server for secure Agora RTC token generation.
The MVP allows callers to request audio calls, notifies listeners via push notifications, and connects the first listener to accept. Firebase handles authentication, Firestore manages call states, and FCM delivers notifications. Call duration tracking and accept/reject dialogs are implemented.
- Caller: Start call, notify listeners, show duration.
- Listener: Accept/reject calls via dialogs, join first, show duration.
- Backend: Secure token generation.
- Firebase: Auth, Firestore, FCM.
- Email/Password based login (Firebase Auth).
- Trigger call requests with a button.
- Show active register listeners count
- Send push notifications to listeners.
- Show "waiting for listener" and "call in progress" states.
- First listener to accept joins; others are blocked.
- Display call duration.
- Email/Password login (Firebase Auth).
- Receive call requests via push notifications (foreground/background/terminated).
- Accept/reject calls with dialogs.
- First listener to accept joins; others are blocked.
- Display call duration.
- Uses Agora VOIP SDK for audio calls (no PSTN).
- Backend generates tokens due to client-side errors (
Agora: Error: ErrorCodeType.errTokenExpired,
). - Firebase for auth, Firestore, and FCM.
- Clone:
git clone https://github.com/your-username/agora-voip-flutter.git
- Firebase: Run
firebase init
andflutterfire configure
incaller_app
/listener_app
. Addgoogle-services.json
,GoogleService-Info.plist
, andassets/firebase_service_account.json
. - Agora: Add
.env
withAGORA_APP_ID
,AGORA_APP_CERTIFICATE
,API_URL
in apps and backend. - Run:
npm start
inagora_backend
,flutter run
in apps.
For any questions or collaboration inquiries, feel free to reach out via GitHub Issues or connect on LinkedIn.
- Portfolio: offfahad.netlify.app
- LinkedIn: linkedin.com/in/offfahad
- GitHub: github.com/offfahad