Create different contexts and assign them to the extensions

[trunk1]
exten => .X,1,Dial(....)

[trunk2]
exten => .X,Dial(....)

and in sip.conf or iax.conf

[exten1]
...
context = trunk1

[exten2]
....
context=trunk2

Marco escribió:
Hi everybody,
I need to use different outbound routes from calls started by different
extensions; I mean, that the extension "A" when dialing "011543..." has
to get access always on the 1st trunk, the extension "B" when dialing
another number has always to access the outside world on the 2nd trunk,
and so on.
Some kind of solution I thought involved the use of a "fake dialcode",
whic is prepended to the dial number and then stripped from an "Outbound
route" section (and then the trunk is dialed):

ext. A "call 011543..." ---->  prepend 41 ---> Outbound route for "41|."
---> Appropriate trunk dial "."

The only matter is that I have NO clue on where to append this code for
outgoing calls from these specific extensions.
If anyone has a simpler idea (yeah, mine is pretty twisted %) ) or knows
how to put a code before the dial string of an extension, let me know!
Thanks in advance,

Marco



_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to