So if we are looking for an outgoing group, we will get the outgoing call number X, where X is the value of 'position', not the outgoing group at position X.

Is that the expected behaviour? If that is correct, you should update the comment that describes the function.