Inbound routing per trunk


I was wondering if there is a way to inbound route by trunk?.

I have 3 separate voip accounts at localphone. I want to fix that if I get a call at trunk 1, it should forward to a specific extension, and someone calls trunk 2 or 3, it gets connected to an IVR.

I looked into the inbouding routing config, but can’t fix it. Anyone who can get me on the way?