Associate Trunk to a Extension

Hi

How can i associate Trunk to a Extension.

example:
i have extension 100 and 200, and have 2 trunks (OUT_1 and OUT_2)

i want to force all calls from 100 to OUT_1 and 200 to OUT_2…

i tried this method (editing /etc/asterisk/extensions_custom.conf)

[macro-dialout-trunk-predial-hook]
exten => s,1,goto(${AMPUSER},1)
exten => 100,1,Set(DIAL_TRUNK=OUT_1)

but not works… on call said busy line…

i have freepbx 2.8.1.4 and there are no custom contexts compatible…

regards
Nuno

Create two outbound routes; one that will use OUT_1, and the other that will use OUT_2. Then in the patterns, put the extension number in the callerID field.

i.e. for route that uses OUT_1, use the pattern /100
for route that uses OUT_2, use the pattern /200

Thanks,
-Rob

thanks… very simple…