Route Extension to Trunk

Hey Guys,
at first, thank you for your work! Freepbx is a great pice of software and it’s beautiful.

My question: How to route a extension or a group of extensions to a specific trunk?

I’ve set up two trunks with different external pstn numbers.

snom phones (family) -> freepbx -> linksys spa trunk with number 1234
snom phones (my pstn) -> freepbx -> linksys spa trunk with number 5678

So what I want is that when my family calls someone, that freepbx routes the call to the trunk with the number 1234.

And when I call, freepbx should route the call to 5678.

Also when someone calls 1234 from the outside that freepbx routes the incoming call from trunk 1234 to my familys snoms, the same kind with my number.

How can I solve this?

Thank you very much!

In outbound routes use the CID field (fill in extension number) to limit what phones can access route.

Hi SkykingOH,

thank you for your answer.
I solved it the other way with the help of custom context and this video:

Yes, but the CID route replaces the custom context module that is not likely to be supported into the future.

Okay, so how does it work?
I set the CID in the first outbound route to my extensions number, but it didn’t succeed. Is there an wiki entry that describes how this works?

Thank you

What context is the extension in? If it is in your custom context it won’t work.