Troubled internet telephony company Vonage said Thursday that its settlement with US carrier Verizon over a patent dispute would cost the company $120m.

Vonage said that the cost of its settlement will be effectively capped at a maximum of $32m, in addition to the $88m already accrued and held in escrow.

The final terms of the resolution depend on how the Court of Appeals decides Vonage’s pending petition for rehearing regarding two of the Verizon patents.

If Vonage wins a rehearing on either of two patents or if the injunction on either patent is called off, Vonage will pay Verizon $80m. If Vonage does not win a rehearing, or if the stay is lifted reinstating the injunction, Vonage will pay $120m, which includes $2.5m payable to certain charities.

The VoIP company has been on the ropes after being found guilty of infringing three broad reaching VoIP patents owned by Verizon. The internet telephony company won a stay of injunction allowing it to keep signing up subscribers and implemented workarounds for some of the patented technologies.

“We’re pleased to put this dispute behind us and believe this settlement is in the best interests of Vonage and its customers,” said Sharon O’Leary, Vonage’s chief legal officer. “This settlement removes the uncertainty of legal reviews and long-term court action and allows us to continue focusing on our core business and customers.”

Earlier this month, Vonage won itself a bit of breathing space by announcing a settlement of another patent dispute with US cellco Sprint.

That settlement is valued at $80m, including $35m for past use of licence, $40m for a fully paid future licence, and $5m in prepayment for services.