<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 8/31/2012 9:50 PM, Juan Pablo L. wrote:
<blockquote
cite="mid:DUB402-EAS126A96BAF0F133039421128D9A50@phx.gbl"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font size="2"><span style="font-size: 10pt;">
<div class="PlainText">Hi, yes we have a block of DIDs,
externally you would dial 2802002 and the gateway will send
to the PBX 2002 which is the extension number. Then the PBX
should decide if 2002 is allowed to get the call or it
should present an IVR with an error message. Thanks.<br>
<br>
</div>
</span></font></blockquote>
<font size="2">Try something like this:<br>
Add the variable in the user XML configs like you did. In this
example we'll use:<br>
</font><font size="2"><tt><variable name="</tt></font><tt><font
size="2">allow_</font></tt><font size="2"><tt>incoming_calls"
value="false"/></tt></font><font size="2"><br>
<br>
I'm not sure how you route the incoming DID block, but you could
do something like this in your public.xml file or in a file in
conf/dialplan/public/:</font><font size="2"><tt><br>
<extension name="Routing Inbound DIDs"><br>
<condition field="destination_number"
expression="^(280(20\d\d))$"><br>
<action application="set_user" data="$2@${domain}"/><br>
<action application="transfer" data="$1 XML default"/><br>
</condition><br>
</extension><br>
</tt></font><font size="2"><br>
Then near the top of default.xml you could do something like this:<br>
</font><font size="2"><tt><extension name="Handle inbound
exceptions"><br>
<condition field="${allow_incoming_calls}"
expression="^false$"/><br>
<condition field="destination_number"
expression="^280(20\d\d)$"><br>
<action application="log" data="INFO Call to extension $1
being routed to IVR"/><br>
<action application="ivr" data="my_ivr"/><br>
</condition><br>
</extension><br>
</tt></font><font size="2"><br>
Naturally you'll need to build "my_ivr" or otherwise do something
with the call. Standard disclaimer applies: I dropped this in off
the top of my head so be sure to tinker with it if it doesn't work
the first time. :)<br>
<br>
-MC<br>
</font>-----Original Message-----<br>
<blockquote
cite="mid:DUB402-EAS126A96BAF0F133039421128D9A50@phx.gbl"
type="cite"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">
<br>
From: Michael Collins<br>
Sent: 1 Sep 2012 03:41:46 GMT<br>
To: FreeSWITCH Users Help<br>
Subject: Re: [Freeswitch-users] prevent internal extensions
from getting calls from outside<br>
<br>
</div>
</span></font>
<div>How is the caller getting to the extension in the first
place? Do you have a block of DIDs or is the caller dialing an
ext at an auto attn?<br>
-MC<br>
<br>
On Friday, August 31, 2012, Juan Pablo L. <<a
moz-do-not-send="true"
href="mailto:jpablolorenzetti@hotmail.com">jpablolorenzetti@hotmail.com</a>>
wrote:<br>
> Hi, i have a gateway that allows us to call outside and
allows calls to reach the extensions from outside,<br>
> but i have a bunch of extensions that we dont want to be
able to receive calls from outside.<br>
> We have a block of numbers, if any of those numbers is
dialed from the PSTN or any external network<br>
> the call will be routed, through the external gateway, to
the PBX so it is up to the PBX to decide<br>
> if the call should reach the extension or not. there are
some restrictions .. i can not have different number segments<br>
> for the extensions, they all are in the same segment, a
given extension could not be allowed to be reached from outside<br>
> at this time but it may be reachable in a latter time (due
to change in the user status in the company), etc ...<br>
> i tried to put a variable in the directory for a user but
when the call arrives at the PBX and the PBX is routing<br>
> that variable is not available yet and i m having trouble
figuring out when that variable is available before bridging the
call<br>
> so i can use it as a condition to route the call.<br>
><br>
> any hint will on how to deal with will help. thanks!<br>
>
_________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a moz-do-not-send="true" href="http://www.cudatel.com">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
> <a moz-do-not-send="true" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
><br>
<br>
-- <br>
Michael S Collins<br>
Twitter: @mercutioviz<br>
<a moz-do-not-send="true" href="http://www.FreeSWITCH.org"
target="_blank">http://www.FreeSWITCH.org</a><br>
<a moz-do-not-send="true" href="http://www.ClueCon.com"
target="_blank">http://www.ClueCon.com</a><br>
<a moz-do-not-send="true" href="http://www.OSTAG.org"
target="_blank">http://www.OSTAG.org</a><br>
<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
</body>
</html>