My vet recommended that I give my dog some Advil or other human pain relief medication.
When my dog was in pain I just gave him some Advil in small enough doses and the vet said I should cut the aspirin in half and give the dog half one day and half the other day.
However if it's not helping then the vet said I could give the dog a whole aspirin but to try half an aspirin.
If the dog won't take the aspirin directly by mouth then you can crush the aspirin up and mix it in with some canned dog food and the dog will then ingest the aspirin that way.
Your dogs vet can also prescribe some dog pain relief medication but it will cost more than aspirin but if you can afford it then it will usually be better for your dog.
But if your dog is just in pain and you cannot take it to the vet then give the dog an aspirin and the pain should go away.