When you file for bankruptcy, an "automatic stay" goes into effect and prohibits almost all collection activity.
If you are contacted, tell the debt collector you have filed bankruptcy and give them your case number. Sometimes the creditor might not be aware of your case, and they will most likely stop trying to collect.
If they don’t stop contacting you, tell the bankruptcy court. The court can sanction the collector for violating the automatic stay if they find the action is willful.