Added a lock around nextCallID