I would use c_trace without ignore passable and project the ray from the entity up, or whichever way best suits your situation. Or for a faster method for a sherical container just check if the entity is close to the container's centre(inside te container) by using vec_dist. But the second one would only work with a sphere.
Murphey's Law: << if anything can go wrong, it will >>