Call entering from specific trunk to a ring group

Hello, I have two gateways with three SIM cards configured as a SIP trunk on freepbx. I’m trying to redirect incoming calls to a ring group based on each SIM card, but I don’t know how to do it.

For example, I have a SIM card with the number 111 11 11 11, another with 222 22 22 22 and the last one with 333 33 33 33. I want to redirect the external calls received on the first number to extension 201, the calls received on the second number to extension 202 and the third one to both extensions.

I’ve been searching a lot but I cannot figure it out and I’m in a hurry. I will appreciate any help.

Make an inbound route for each DID and point each route at the extension it needs to ring.

I already did it a while ago but when I do that and I call to the SIM number I receive a message “the number you have called is not in service”. Also asterisk log shows me this: “Received an unknown call with DID set to 246”) in new stack