Cingular Wireless will refund $18.5 million to thousands of former California customers who were penalized for canceling their mobile phone service because they had trouble making and receiving calls.

The settlement announced Thursday with the California Public Utilities Commission ends a lengthy battle revolving around Cingular’s treatment of dissatisfied subscribers from January 2000 through April 2002.