makeCall static method

Future<void> makeCall(
  1. String target
)

Make a SIP call

target can be:

Example:

await VoipPlugin.makeCall('1002');

Implementation

static Future<void> makeCall(String target) async {
  if (!_initialized) {
    throw Exception('VoIP Plugin not initialized. Call VoipPlugin.initialize() first.');
  }

  if (!SipService.isRegistered) {
    throw Exception('Not registered. Please register first.');
  }

  try {
    debugPrint('═══════════════════════════════════════');
    debugPrint('📞 VoIP PLUGIN: MAKING CALL');
    debugPrint('═══════════════════════════════════════');
    debugPrint('Target: $target');
    debugPrint('═══════════════════════════════════════');

    await SipService.makeCall(target);
  } catch (e, stackTrace) {
    debugPrint('❌ Make call error: $e');
    debugPrint('Stack trace: $stackTrace');
    rethrow;
  }
}