Thanks for the idea!
This feature is also probably suitable to be implemented in the libruxc, to avoid passing data back and forth many times, rather than using the libruxc as it is now and do the retry in Kamailio module C code.
Then kamailio can get a modparam (and/or other options) to control it.
I added to my todo for libruxc, if you want to discuss more, let's do it with an issue for ruxc project (https://github.com/miconda/ruxc).