Mack,
The language modules take advantage of the fact that those other languages (e.g. Lua, Python) are higher-level, _interpreted_ languages, and that their interpreters provide an API for embedding them into C programs. One cannot easily embed an on-the-fly C compiler into a C program.
Writing a Kamailio module is certainly the easiest way to call a custom C function from route script, and it's not terribly hard to get started. If your needs are very simple, you don't have to make extensive study of the module API. Just follow/modify this example module:
https://github.com/kamailio/kamailio/tree/master/modules/print
'print' is a stub that doesn't do anything, but provides a skeleton from which you can build your own module.
I suppose you could also embed your C function into a library that can be called from an interpreted language supported by Kamailio (Lua, Python, Perl, etc.), but that seems like it would be vastly more complicated than writing a Kamailio module.
Finally, are you one hundred percent sure that the functionality you need cannot be achieved any other way?
-- Alex