Is there any example showing WebRTC usage in C/C++

N
nora@undilutedtruth.com
Wed, Dec 13, 2023 2:10 PM

I’m trying to use pjsip as a library for a WebRTC C/C++ application that uses a custom signaling, but I can’t find any examples using pjsip with WebRTC. An example that shows how to use the WebRTC api would be great.

I’m trying to use pjsip as a library for a WebRTC C/C++ application that uses a custom signaling, but I can’t find any examples using pjsip with WebRTC. An example that shows how to use the WebRTC api would be great.
AW
Andreas Wehrmann
Wed, Dec 13, 2023 4:24 PM

Am 13.12.2023 um 15:10 schrieb nora@undilutedtruth.com:

I’m trying to use pjsip as a library for a WebRTC C/C++ application
that uses a custom signaling, but I can’t find any examples using
pjsip with WebRTC. An example that shows how to use the WebRTC api
would be great.

I don't think there is a ready to use example.
You need a way to exchange SDP (WebRTC leaves open how you do that),
you need a working DTLS setup and I believe ICE is also involved.
pjmedia and pjnath offer the building blocks for this;

Unfortunately, that's all I can contribute; haven't done it myself (yet).

Best Regards,
Andreas

Am 13.12.2023 um 15:10 schrieb nora@undilutedtruth.com: > > I’m trying to use pjsip as a library for a WebRTC C/C++ application > that uses a custom signaling, but I can’t find any examples using > pjsip with WebRTC. An example that shows how to use the WebRTC api > would be great. > I don't think there is a ready to use example. You need a way to exchange SDP (WebRTC leaves open how you do that), you need a working DTLS setup and I believe ICE is also involved. pjmedia and pjnath offer the building blocks for this; Unfortunately, that's all I can contribute; haven't done it myself (yet). Best Regards, Andreas
AA
Andrés Alonso
Thu, Dec 14, 2023 9:26 AM

I'm currently working on something similar, that also requires SIP for
signalling and libwebrtc for media.
I'm trying to do the signalling with PJSIP, but struggling to integrate
both libs. Any feedback would be appreciated.
My approach to this has been:

  • First took the easy route. Using PJSUA-LIB, try to replace the SDP
    in the *on_call_sdp_created
    *callback with the one generated by libwebrtc PeerConnection API. This is
    what I'm currently trying to do, but so far failing due to SDP validation
    errors.
  • Next step will be to try at PJSIP level, by creating a custom INVITE
    request with libwebrtc SDP in msg.body.
  • And I guess the proper way to do it, would be to create your own custom
    media transport adapter. As described here
    https://docs.pjsip.org/en/latest/specific-guides/media/transport_adapter.html#implementing-a-custom-transport-adapter.
    This seems to be the right way but also a lot more complicated.

Can anyone clarify if the first two solutions are even worth trying?
Many thanks.

Regards,
Andrés

On Wed, Dec 13, 2023 at 5:25 PM Andreas Wehrmann a.wehrmann@yandex.com
wrote:

Am 13.12.2023 um 15:10 schrieb nora@undilutedtruth.com:

I’m trying to use pjsip as a library for a WebRTC C/C++ application
that uses a custom signaling, but I can’t find any examples using
pjsip with WebRTC. An example that shows how to use the WebRTC api
would be great.

I don't think there is a ready to use example.
You need a way to exchange SDP (WebRTC leaves open how you do that),
you need a working DTLS setup and I believe ICE is also involved.
pjmedia and pjnath offer the building blocks for this;

Unfortunately, that's all I can contribute; haven't done it myself (yet).

Best Regards,
Andreas


Visit our blog: http://blog.pjsip.org

pjsip mailing list -- pjsip@lists.pjsip.org
To unsubscribe send an email to pjsip-leave@lists.pjsip.org

I'm currently working on something similar, that also requires SIP for signalling and libwebrtc for media. I'm trying to do the signalling with PJSIP, but struggling to integrate both libs. Any feedback would be appreciated. My approach to this has been: - First took the easy route. Using PJSUA-LIB, try to replace the SDP in the *on_call_sdp_created *callback with the one generated by libwebrtc PeerConnection API. This is what I'm currently trying to do, but so far failing due to SDP validation errors. - Next step will be to try at PJSIP level, by creating a custom INVITE request with libwebrtc SDP in msg.body. - And I guess the proper way to do it, would be to create your own custom media transport adapter. As described here <https://docs.pjsip.org/en/latest/specific-guides/media/transport_adapter.html#implementing-a-custom-transport-adapter>. This seems to be the right way but also a lot more complicated. Can anyone clarify if the first two solutions are even worth trying? Many thanks. Regards, Andrés On Wed, Dec 13, 2023 at 5:25 PM Andreas Wehrmann <a.wehrmann@yandex.com> wrote: > > > Am 13.12.2023 um 15:10 schrieb nora@undilutedtruth.com: > > > > I’m trying to use pjsip as a library for a WebRTC C/C++ application > > that uses a custom signaling, but I can’t find any examples using > > pjsip with WebRTC. An example that shows how to use the WebRTC api > > would be great. > > > > I don't think there is a ready to use example. > You need a way to exchange SDP (WebRTC leaves open how you do that), > you need a working DTLS setup and I believe ICE is also involved. > pjmedia and pjnath offer the building blocks for this; > > Unfortunately, that's all I can contribute; haven't done it myself (yet). > > > Best Regards, > Andreas > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list -- pjsip@lists.pjsip.org > To unsubscribe send an email to pjsip-leave@lists.pjsip.org >