[SR-Dev] git:janakj/bdb: - port from opensips r4526, credits goes to bogdan