The recommended action is to pour water (or other water-based liquid - fizzy or not) over it to cool it down and stop the fire spreading. Or better, to drop it in a bucket of water. If that is done, or a water-based extinguisher used, it would be fairly easy to contain the relatively small fire from a phone battery.
I suspect it's not really possible to properly put out the fire before the energy is all released from the battery, which happens in a matter of seconds once it properly takes hold, so containing it is almost definitely the best course of action.