[RESOLVED] How can I select outbound trunk?

Hi all!

I’m totally new to Asterisk and I’m trying to see the big picture before installing it.

My question is, let’s say I have a regular phone line that I will use as INPUT and OUTPUT, and I also want to be able to place calls with VOIP, I would have 2 trunks, right? (phone line and VOIP).

How can I specify which trunk is used when I place a phone call from a regular phone? Can I just dial an extension then dial the number? How does it work exactly?

Thanks!

My question is, let’s say I have a regular phone line that I will use as INPUT and OUTPUT, and I also want to be able to place calls with VOIP, I would have 2 trunks, right? (phone line and VOIP).
Right

How can I specify which trunk is used when I place a phone call from a regular phone? Can I just dial an extension then dial the number? How does it work exactly? You would do this in extensions.conf

example
exten => _NXXXXXX,1,Dial(Zap/1/${EXTEN})
exten => _X.,1,Dial(IAX2/voip/${EXTEN})

exten => _NXXXXXX,1,Dial(Zap/1/${EXTEN}) Zap/1 is phone line
any seven digit number goes out phoneline

exten => _X.,1,Dial(IAX2/voip/${EXTEN}) Iax2/voip is connection to voip provider
_X. means any number send to voip provider

his way if I dail a seven digit number it goes to my phoneline all other numbers no matter waht lenght will go to voip provider

There are several ways to do it this just one example