sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
778 stars 368 forks source link

RTPEngine with OpenSIPS : Called with SDP without DTLS fingerprint #232

Closed mvenkatesh431 closed 8 years ago

mvenkatesh431 commented 8 years ago

I am using following setup OpenSIPS 2.2 devel with wss support. sipjs 0.7 as websocket client RTPEngine 4.4

I have two web users like 1000 and 2000. Both are registered to OpenSIPS through the WSS. Whenever i made call between the 1000 to 2000 or vice versa, i am getting error saying "\ Failed to set remote offer sdp: Called with SDP without DTLS fingerprint".**

I am using default opensips.cfg script. here is the url of the script http://www.opensips.org/Documentation/Tutorials-WebSocket-2-1

Basically I am calling rtpengine_offer like this. $var(rtpengine_flags) = "ICE=force-relay DTLS=passive"; rtpengine_offer("$var(rtpengine_flags)"); I am doing same for the rtpengine_answer also.

Interesting thing is I am not getting any errors, if i call the rtpengine_offer and answer without any parameters. Call is connecting and i am able to get two way video.

And also, If i try same thing with WS (i.e web clients registers to OpenSIPS through WS) it is working fine with the parameters.

Here i am attaching the rtpengine log, calling end web client log, called end web client log.

any help is greatly appreciated. Thank you in advance. rtpengine log.txt opensips and rtpengine comms.txt receiving end.txt calling party log.txt

rfuchs commented 8 years ago

According to the log, you're instructing rtpengine to translate the DTLS-SRTP call to plaintext RTP ("transport-protocol": "RTP/AVP"). Do you have anything in your config that would do that?

mvenkatesh431 commented 8 years ago

I am calling the rtpengine_offer like below.

if (isflagset(SRC_WS) && isbflagset(DST_WS)) $var(rtpengine_flags) = "ICE=force-relay DTLS=passive"; else if (isflagset(SRC_WS) && !isbflagset(DST_WS)) $var(rtpengine_flags) = "RTP/AVP replace-session-connection replace-origin ICE=remove"; else if (!isflagset(SRC_WS) && isbflagset(DST_WS)) $var(rtpengine_flags) = "UDP/TLS/RTP/SAVPF ICE=force"; else if (!isflagset(SRC_WS) && !isbflagset(DST_WS)) $var(rtpengine_flags) = "RTP/AVP replace-session-connection replace-origin ICE=remove";

rtpengine_offer("$var(rtpengine_flags)");

Both are web clients so first if supposed to execute. After removing the all other if conditions it is working. Thanks.

But still i need to figure out why other if conditions are executing.

rfuchs commented 8 years ago

Can't help you there, I'm not familiar with the OpenSIPS internals. I notice that some instances in the code above are isflagset while others are isbflagset. Not sure if that means anything though.

soulofmischief87 commented 8 years ago

Venkatesh,

You have to set these flags in order for the condition to met. Please look at the following https://github.com/etamme/federated-sip/wiki/RTPEngine-offer-answer-in-opensips .

On Thu, Apr 7, 2016 at 9:57 AM, Richard Fuchs notifications@github.com wrote:

Can't help you there, I'm not familiar with the OpenSIPS internals. I notice that some instances in the code above are isflagset while others are isbflagset. Not sure if that means anything though.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/sipwise/rtpengine/issues/232#issuecomment-206919384

mvenkatesh431 commented 8 years ago

Thanks all, Now it is working. I needed to setup the flags properly.

dubeyvishal commented 7 years ago

Venkatesh,

I know its closed, Can you please share your config file. I am facing same issue.

Thanks, Vishal

prathibhacdac commented 1 year ago

I am also facing the same issue. Can you share the config file?