sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.42k stars 431 forks source link

Call failed Call attempt was answered with INVITE 200 OK (Error) but an error occurred setting the remote description.. #1075

Open fcltd opened 6 months ago

fcltd commented 6 months ago

Trying to test the "examples/SIPExamples/PlaySounds", but keep getting this error:

SIPSorcery Play Sounds Demo press ctrl-c to exit... Call failed Call attempt was answered with INVITE 200 OK (Error) but an error occurred setting the remote description.. Call to ***** failed. Exiting...

The target gets the call Ok, but once answered it immediately hangs up, and that error is thrown.

The only thing that was changed in the code was this:

        ` // Place the call and wait for the result.` 
       `  var dstUri = $"sip:{DESTINATION}@{SIP_SERVER}";` 

        ` var callTask = userAgent.Call(dstUri, SIP_USERNAME, SIP_PASSWORD, voipMediaSession); `

to be able to specify the SIP server username/password.

Any help would be immensely appreciated, thank you!