Search code examples
ioswebrtcechopjsip

How to enable WebRTC AEC in PJSIP 2.8 for iOS?


WebRTC AEC is already built in pjsip 2.8, I'm using these settings

   app_config.media_cfg.ec_options = PJMEDIA_ECHO_WEBRTC.rawValue
   app_config.media_cfg.ec_tail_len = 30

then init

    status = pjsua_init(&(app_config.cfg), &(app_config.log_cfg), &(app_config.media_cfg))

but it won't start, there should be 'WebRTC AEC mobile successfully created with options' at logs at least.

config_site.h includes

#define PJMEDIA_HAS_WEBRTC_AEC 1

UPDATE: I found the solution, PJMEDIA_ECHO_USE_SW_ECHO flag should be used to force SW ED instead of device EC.


Solution

  • PJMEDIA_ECHO_USE_SW_ECHO flag should be used to force SW ED instead of device EC.