the other solution is elegant and straightforward but let me make 3 points
in favour of using the custom contexts over that approach.
1. when you set up a new extension you simply select which context to use
for that extension no additional mods to the dialplan. so if you expect
additional extensions then custiom contexts will be a better solution
2. with custom contexts you can extend the concept and enable and disable
features that you do or don't wnat either office to have because the custom
context is basically controlling what gets included in
extenions_additional.conf [can't remember if it is extensions_additional
or additional_extensions] and hence what features each office gets. Like a
poorman's muliti tennant. Not totally there but more control than you have
today
3. if you ever want to not allow one office to call another office
extensions you will have the framework to do so. just look for the files
with the local extensions and include or exclude it in the custom context
and if necessary create a custom include with just the extensions you want
to be available to that custom context
So if your plans include any of the above then custom context is the better
solution.
From: Vieri Di Paola <vieridipaola-/***@public.gmane.org>
Reply-To: amportal-users-5NWGOfrQmneRv+***@public.gmane.org
To: amportal-users-5NWGOfrQmneRv+***@public.gmane.org
Subject: Re: [Amportal-users] Outbound Route via Extension
Date: Fri, 17 Aug 2007 10:46:36 -0700 (PDT)
Post by B Bocuse the custom context module and put the extensions
in different context
then set the appropriate route in the custom
context's outbound route.
you have to install it yourself because it is not
part of the standard
install
Subject: [Amportal-users] Outbound Route via
Extension
Date: Thu, 16 Aug 2007 22:16:38 +0800
Hi All,
is it possible to choose outbound route by checking
the extension of the
caller?
e.g extension that starts with 3 goes to outbound
route 1 extension that
starts with 4 goes to outbound route 2. Basically,
i'm hosting two(2)
office, extension 3XXX is office 1 and extensions
4XX is office 2, they
both have the same dialling pattern so i need to
choose route based on
source.
thank you
Nhadie
I used a different approach. I leave the default
context untouched but in extensions_custom.conf I add
a plan such as:
exten => _6XXXXXXXX,1,GotoIf($["${CALLERID(num)}" =
"4170"]?specialperms)
exten => _6XXXXXXXX,n,GotoIf($["${CALLERID(num)}" =
"4171"]?specialperms)
exten => _6XXXXXXXX,n,GotoIf($["${CALLERID(num)}" =
"4172"]?specialperms)
exten =>
_6XXXXXXXX,n,Macro(dialout-trunk,4,0${EXTEN},,)
exten =>
_6XXXXXXXX,n,Macro(dialout-trunk,1,1052${EXTEN},,)
exten =>
_6XXXXXXXX,n,Macro(dialout-trunk,2,00${EXTEN},,)
exten => _6XXXXXXXX,n,Macro(outisbusy,)
exten =>
_6XXXXXXXX,n(specialperms),GotoIfTime(12:00-14:59|mon-fri|*|*?skipsims)
exten =>
_6XXXXXXXX,n,Macro(dialout-trunk,4,0${EXTEN},,)
exten =>
_6XXXXXXXX,n(skipsims),Macro(dialout-trunk,1,1052${EXTEN},,)
exten =>
_6XXXXXXXX,n,Macro(dialout-trunk,2,00${EXTEN},,)
exten => _6XXXXXXXX,n,Macro(outisbusy,)
So only if the caller is 4170, 4171 or 4172, a certain
outbound route sequence is chosen.
(there's also a time condition you shouldn't mind
because I just copied and pasted)
What I don't know is if ${CALLERID(num)} is worth
trusting...
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today!
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Amportal-users mailing list
Amportal-users-5NWGOfrQmneRv+***@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/amportal-users
_________________________________________________________________
Puzzles, trivia teasers, word scrambles and more. Play for your chance to
win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/