A company that provides cellular phone billing services on Friday reached an $87 million settlement of a patent infringement case that had threatened to send it into bankruptcy.

The settlement is far less than the $128 million a jury had ordered Boston Communications Group Inc. and its co-defendants to pay Freedom Wireless Inc., a small, privately held firm that had sued over patents.