It's now possible to authenticate an ejabberd server against friendica. See auth_ejabberd.php for details how to install.