Admin Sign In

Laravel 11 Voice CPaaS Portal

Voice Engine CPaaS

Laravel 11 & Reverb
Reverb WebSockets Online :8080
Active
Signaling engine on calls.devsro.xyz
Total Minutes Used
0
0 seconds cumulative audio
Call Success Rate
100%
Completed calls vs failed attempts
Registered Apps
0
Active tenant projects

Recent Completed Calls

Latest call sessions with duration and audio playback

Call ID Caller Callee Duration Status Reason Recording Time
No call history recorded yet.

Tenant Applications & Credentials

Manage developer apps, API keys, Webhooks, and FCM Push credentials

App Name App ID API Key API Secret Webhook FCM VoIP IVR Notice Status Actions

Call Detail Records (CDR) & Audio Audit

Complete historical logs with duration, status, and audio playback

Call ID App ID Caller Callee Duration Status Reason Audio Recording Timestamp

Interactive In-Browser Live Call Simulator

Simulate real two-way WebRTC calling between Rider and Driver with live audio and automatic recording

Endpoint A: Rider

Caller Device

Idle
00:00
Ready. Click "Call Driver" to start WebRTC session.
Endpoint B: Driver

Callee Device (Partner)

Listening
No incoming calls right now
00:00
Listening on Reverb presence channel for calls...

Developer Integration Quickstart

Ready-to-use SDKs and client implementations for Flutter, React Native, Web, and Backend

1. Add Dependencies (`pubspec.yaml`)

dependencies:
  flutter:
    sdk: flutter
  flutter_webrtc: ^0.11.0
  pusher_channels_flutter: ^2.2.1
  http: ^1.2.0

2. Complete Flutter Calling Service (`voice_service.dart`)

import 'package:flutter_webrtc/flutter_webrtc.dart';
import 'package:pusher_channels_flutter/pusher_channels_flutter.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;

class DevsroVoiceService {
  final String serverUrl = 'https://calls.devsro.xyz';
  final String appId = 'TARGET_APP_ID';
  final String userId;
  final String token;

  RTCPeerConnection? _peerConnection;
  MediaStream? _localStream;
  PusherChannelsFlutter pusher = PusherChannelsFlutter.getInstance();

  DevsroVoiceService({required this.userId, required this.token});

  Future initialize({required Function(Map) onIncomingCall}) async {
    // 1. Initialize Pusher for Laravel Reverb
    await pusher.init(
      apiKey: 'rxuexjdw8cjdw7dtkyq3',
      cluster: 'mt1',
      host: 'calls.devsro.xyz',
      wsPort: 443,
      wssPort: 443,
      useTLS: true,
      onEvent: (event) {
        if (event.eventName == 'cpaas.call.incoming') {
          final data = jsonDecode(event.data);
          if (data['calleeId'] == userId) {
            onIncomingCall(data);
          }
        }
      },
    );
    await pusher.subscribe(channelName: 'presence-app.$appId');
    await pusher.connect();
  }

  Future dial({required String calleeId, String? channelId}) async {
    final res = await http.post(
      Uri.parse('$serverUrl/api/v1/calls/initiate'),
      headers: {'Content-Type': 'application/json', 'Authorization': 'Bearer $token'},
      body: jsonEncode({'callerId': userId, 'calleeId': calleeId, 'channelId': channelId}),
    );
    final callData = jsonDecode(res.body);
    _listenToCallChannel(callData['callId'], isCaller: true);
  }

  void _listenToCallChannel(String callId, {required bool isCaller}) async {
    await pusher.subscribe(channelName: 'call.$callId');
  }
}

1. Install Packages

npm install react-native-webrtc pusher-js

2. React Hook (`useVoiceCall.ts`)

import { useEffect, useRef, useState } from 'react';
import { RTCPeerConnection, mediaDevices } from 'react-native-webrtc';
import Pusher from 'pusher-js';

export function useVoiceCall({ appId, userId, token }: { appId: string; userId: string; token: string }) {
  const [callState, setCallState] = useState<'idle' | 'ringing' | 'connected'>('idle');
  const pusherRef = useRef(null);

  useEffect(() => {
    const pusher = new Pusher('rxuexjdw8cjdw7dtkyq3', {
      wsHost: 'calls.devsro.xyz',
      wssPort: 443,
      forceTLS: true,
      enabledTransports: ['ws', 'wss'],
      cluster: 'mt1'
    });

    const channel = pusher.subscribe(`presence-app.${appId}`);
    channel.bind('cpaas.call.incoming', (data: any) => {
      if (data.calleeId === userId) {
        setCallState('ringing');
      }
    });

    pusherRef.current = pusher;
    return () => pusher.disconnect();
  }, [appId, userId]);

  const initiateCall = async (calleeId: string) => {
    const res = await fetch('https://calls.devsro.xyz/api/v1/calls/initiate', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` },
      body: JSON.stringify({ callerId: userId, calleeId })
    });
    const callData = await res.json();
    setCallState('ringing');
  };

  return { callState, initiateCall };
}

HTML Web Client Integration

<!-- Include Pusher JS -->
<script src="https://calls.devsro.xyz/js/pusher.min.js"></script>
<script src="https://calls.devsro.xyz/sdk/v1/voice-engine.js"></script>

<script>
  const client = new VoiceEngine({
    serverUrl: 'https://calls.devsro.xyz',
    appId: 'TARGET_APP_ID',
    token: 'USER_TOKEN',
    userId: 'rider_101'
  });

  client.on('call:incoming', ({ callId, callerId, accept, reject }) => {
    if (confirm(`Incoming call from ${callerId}. Accept?`)) {
      accept();
    } else {
      reject();
    }
  });

  // Dial
  document.getElementById('call-btn').onclick = () => {
    client.call({ targetId: 'driver_202' });
  };
</script>

1. Generate User Session Token (Server-to-Server)

curl -X POST https://calls.devsro.xyz/api/v1/tokens/create \
  -H "Content-Type: application/json" \
  -H "x-api-secret: TARGET_API_SECRET" \
  -d '{"userId": "rider_101", "role": "rider", "channelId": "trip_99"}'

2. Programmatic Call Initiate

curl -X POST https://calls.devsro.xyz/api/v1/calls/initiate \
  -H "Content-Type: application/json" \
  -H "x-api-secret: TARGET_API_SECRET" \
  -d '{"callerId": "rider_101", "calleeId": "driver_202", "channelId": "trip_99"}'

Register Device for Background Ringing (VoIP Push)

When your mobile app launches, register the device's FCM token so our server wakes up the phone when an incoming call arrives:

POST https://calls.devsro.xyz/api/v1/devices/register
Headers:
  x-api-key: TARGET_API_KEY
  Content-Type: application/json
Body:
  {
    "userId": "driver_202",
    "deviceToken": "fcm_token_from_firebase_messaging",
    "platform": "android"
  }