XMPP: Jingle code ported & adapted/fixed, original credits to tsearle
(work in progress)