Interoperability with WebRTC

Last modified by Simon Morlat on 2020/08/10 15:26


Starting from version 3.9, liblinphone is inter-workable with both Google and Firefox WebRTC engines. This has been achieved by adding the following new capabilities to liblinphone/mediastreamer2/ortp:

  • DTLS support based on a branched mbedtls version available from An ongoing work is still in progress to this branch contributed to an official mbedtls version.
  • Possibility to target remote media port with multiplexed RTP/RTCP as described in  rfc5761
  • From version 4.4, support for RTP bundle mode as described in . RTP bundle mode consists in multiplexing RTP/RTCP of all media types (audio, video) to use a single UDP port. It speeds up ICE connectivity checks and reduces the number of used ports, that are a problem for NAT routers.



Liblinphone can receive a SIP incoming call coming from WebRTC out of the box. However, for outgoing calls to be generated with characteristics that allow the interoperability with WebRTC, it is recommended to perform the following configuration steps:

The functions referred below are from the C API. They of course also exist in all liblinphone supported languages, as a method following the target language's naming convention or as a property when relevant.

  • DTLS encryption mode is selected using with linphone_core_set_media_encryption with value LinphoneMediaEncryptionDTLS
  • Set a writable path for DTLS client certificates using function linphone_core_set_user_certificates_path
  • ICE should be enabled, with a STUN server configured:
    • create a LinphoneNatPolicy using linphone_core_create_nat_policy()
    • assign a stun server hostname using linphone_nat_policy_set_stun_server()
    • enable ICE with STUN support with linphone_nat_policy_enable_stun() and linphone_nat_policy_enable_ice()
    • assign the nat policy to the core with linphone_core_set_nat_policy()
  • Enable RTP bundling with linphone_core_enable_rtp_bundle() . Bundle mode automatically implies the use of rtcp-mux.


Enabling Chrome debug traces can be done with:

Chrome --enable-logging --v=4