  Shelstad's character identity is an equality between sums of characters of
tempered representations in corresponding $L$-packets of two real, semisimple,
linear, algebraic groups that are inner forms to each other. We reconstruct
this character identity in the case of the discrete series, using index theory
of elliptic operators in the framework of $K$-theory. Our geometric proof of
the character identity is evidence that index theory can play a role in the
classification of group representations via the Langlands program.
