Discussion:
Outbound Route via Extension
Nhadie Ramos
2007-08-16 14:16:38 UTC
Permalink
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

-------------------------------------------------------------------------
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/
B Boc
2007-08-17 16:14:43 UTC
Permalink
use 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








From: Nhadie Ramos <nhadie-g+A/7bpE/***@public.gmane.org>
Reply-To: amportal-users-5NWGOfrQmneRv+***@public.gmane.org
To: amportal-users-5NWGOfrQmneRv+***@public.gmane.org
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

-------------------------------------------------------------------------
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

_________________________________________________________________
Find a local pizza place, movie theater, and moreĀ….then map the best route!
http://maps.live.com/default.aspx?v=2&ss=yp.bars~yp.pizza~yp.movie%20theater&cp=42.358996~-71.056691&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=950607&encType=1&FORM=MGAC01
Vieri Di Paola
2007-08-17 17:46:36 UTC
Permalink
Post by B Boc
use 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/
B Boc
2007-08-17 19:07:01 UTC
Permalink
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 Boc
use 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/
Vieri Di Paola
2007-08-19 15:41:19 UTC
Permalink
Thank you.
Your post sort of answers a previous query I sent to
this ML:
[Amportal-users] feature codes for certain extensions
only

It requires manual work as it can't be done through
the freepbx interface but that's better than nothing.
;-)
Post by B Boc
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.
Subject: Re: [Amportal-users] Outbound Route via
Extension
Date: Fri, 17 Aug 2007 10:46:36 -0700 (PDT)
Post by B Boc
use the custom context module and put the
extensions
Post by B Boc
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
Post by B Boc
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,
Post by B Boc
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
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)
Post by B Boc
exten =>
_6XXXXXXXX,n,Macro(dialout-trunk,4,0${EXTEN},,)
exten =>
_6XXXXXXXX,n(skipsims),Macro(dialout-trunk,1,1052${EXTEN},,)
Post by B Boc
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...
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

-------------------------------------------------------------------------
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/

Loading...