One possible way of doing this would be to use a collision callback. Inside the callback, you check your dynamic body and see which side of the object is he coming from (looking at velocity direction). Depending on the direction, you cancel the collision or you let it collide.