[sr-dev] [kamailio/kamailio] topoh: add additional safety checks (#1052)