[sr-dev] [kamailio/kamailio] Python exception handling fixes (PR #4044)