[otr] migrate to ver. 4.0.0 (backport from master)