Sometimes Kamailio modules don’t behave how you expect them to, and you want to dive a little deeper into what’s going on.
If we load the debugger.so
module in our kamailio.cfg file, we can get a bit more of an insight.
For example, if we wanted to deep dive into what RTPengine was thinking we’d include:
loadmodule "debugger"
modparam("debugger", "mod_level_mode", 1)
modparam("debugger", "mod_level", "rtpengine=3")
And bam, now when we run Kamailio we’ll get all the logic that rtpengine exposes when being called.
By setting cfgtrace
we can enable a config trace as well, and as we step through our Kamailio config file for a SIP message, we can see what’s going on at every step.
So if you’re like me, you can use the debugger module, combined with reading through the source code, to prove every single time that the issue is with my not understanding the function properly, and never the logic of the Kamailio module!