Associate Trunk to a Extension


How can i associate Trunk to a Extension.

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)

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 and there are no custom contexts compatible…


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… very simple…