How to use a particular trunk as part of [from-internal]

Hello,

I’ve created a call file that receives the phone number of our customer on a website.
Here’s the format:

Channel: Local/".$_POST[‘phonenumber’]."@from-internal/n
MaxRetries: 3
RetryTime: 5
WaitTime: 15
Context: websitecallback
Extension: 2

Now, here’s the situation.
We call landlines and mobiles in this country
Format for landlines is 02 XXX XXXX
Format for mobiles is 09XX XXX XXXX

We have two sip trunks
When we need to call the landlines, we use the sip trunk #1
We can also use sip trunk #1 for mobile calls as well and they’re clear, but they’re expensive.

When we need to call the mobiles, we use the sip trunk #2

Back to the callfiles, when you pass them through from-internal, the calls go the way we want them to. Landlines go through sip trunk #1 and mobiles go through sip trunk #2. Here’s my question:

How can I make all calls (mobile and landline) of these callfiles go through sip trunk #1?

Please help!
Regards,
Mark

The easiest way I can think of would be to simply add a prefix and an outbound route that utilizes it. For example, update your call generation file so it does something like:
Channel: Local/777".$_POST[‘phonenumber’]."@from-internal/n

Then update your outbound routes for Trunk #1 so that it has patterns that match “777” in the prefix area. For example, you could add an extra outbound route for Trunk 1 that could be something like:

Prefix: 777 Pattern: 02 XXX XXXX
Prefix: 777 Pattern: 09XX XXX XXXX

That would strip off the 777, and pass the calls out the first trunk.

That’s what I was thinking, but figured there may be a better way… upon execution, that was the easiest way.
Thanks so much!!