Similar to https://github.com/otalk/sdp-jingle-json (c657c35e24354395b449e414442d42af0b99f09d & 3ddcfc0c1c618056013aea4ff0a9bf864f467171), use information about both the role and direction and add some helper methods