Major MGCP locking fixes (bug #2696)