This might be a case of simply not using physics based collision detection for this. Physics bodies cannot detect collisions with concave shapes. The inside of a circle is concave. You could setup a complex multi-body octagon made up of 8 rectangular bodies (or 10 or more depending on how smooth you wanted it). But that’s a lot of work. What might be easier is a simple math check. Is the circle with radius R inside the larger circle.
In the Tutorial: Non-physics collision detection ( https://coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/ ) there is a function to detect when two circles are touching each other. In your case, you want them to touch. You would need to adjust the math a bit to make sure the edges stay inside. If the function returns false, don’t let the movement happen.
Rob