0

I'am working on simple VoiceChat in C#. I am using Ozeki framework to make a call with user.

Everything works fine, but I have a problem when I want to make a call after call. After first call, I have to register my ip again using Ozeki method. But one of my port is still in use. So how can I clear port 5060 after call ?

This is method for register ip:

void Ozeki()
{
    softphone = SoftPhoneFactory.CreateSoftPhone(6000, 6200);

    microphone = Microphone.GetDefaultDevice();
    speaker = Speaker.GetDefaultDevice();
    mediaSender = new PhoneCallAudioSender();
    mediaReceiver = new PhoneCallAudioReceiver();
    connector = new MediaConnector();

    var config = new DirectIPPhoneLineConfig(local_ip, 5060);
    phoneLine = softphone.CreateDirectIPPhoneLine(config);
    phoneLine.RegistrationStateChanged += line_RegStateChanged;
    softphone.IncomingCall += softphone_IncomingCall;
    softphone.RegisterPhoneLine(phoneLine);
}

So again, how can I 'clear' port 5060?

Nedvid
  • 57
  • 1
  • 2
  • 12
  • I don't know Ozeki, but since the `softphone` is created with 5060 in its constructor, disposing it would probably free the port. I can't see if it actually implements `IDisposable` but it does have a `Dispose()` method. See http://www.camera-sdk.com/doc/html/cc4d8f7c-8caa-27a5-4c86-caa9b7de96be.htm – C.Evenhuis Jun 16 '17 at 19:19
  • Is this API free? – Kashif Iqbal Jul 07 '17 at 14:56
  • Nope, but you can use trial for 1 month :) – Nedvid Aug 23 '17 at 16:40

0 Answers0