Ozeki VoIP not receiving audio

768 views Asked by At

I have been working on a Softphone project in c# and have been using Ozeki VoIP SDK.

So far I have got the softphone successfully registering and making outbound calls. However, I can not hear the called party but they can hear me. (Me being the softphone and called party being a Cisco SPA504G Phone)

2-Way audio is fine when using other applications (Such as X-Lite)

The SIP Trace shows I am sending but not receiving any RTP packages, is this something I have done wrong in my code (See below) or an issue on the PBX side. (Thirdlane PBX)

 void CreateCall()
    {
        string numberToDial = txtNum.Text;
        logOutput("Call " + numberToDial);
        txtLog.ScrollToCaret();

        call = softphone.CreateCallObject(phoneLine, numberToDial);
        call.CallStateChanged += call_CallStateChanged;
        call.Start();
    }

    private void SetupDevices()
    {
        connector.Connect(microphone, mediaSender);
        connector.Connect(mediaReceiver, speaker);

        mediaSender.AttachToCall(call);
        mediaReceiver.AttachToCall(call);

        microphone.Start();
        speaker.Start();
    }



    void call_CallStateChanged(object sender, CallStateChangedArgs e)
    {
        if (e.State == CallState.Answered)
        {
            WireUpCallEvents();
        }

        if (e.State == CallState.Completed)
        {
            WireDownCallEvents();
        }

        logOutput("Call state: " + e.State);
    }

    private void WireUpCallEvents()
    {
        call.CallStateChanged += (call_CallStateChanged);
        SetupDevices();
    }

    private void WireDownCallEvents()
    {
        call.CallStateChanged -= (call_CallStateChanged);
    }
1

There are 1 answers

0
CloudTheWolf On BEST ANSWER

After trying another extension on another PBX I found that the issue was caused by the additional setting "nat" not being set. Once I set this with the value "yes" I was able to get 2-way audio on both parties.

This was a Thridlane PBX so the setting was in "Selected Tenants PBX" => "Extensions and Contacts" => "User Extensions" => (The extension number I was using) => Phone.