[Asterisk-Users] call redirection from outside line?

Josiah Bryan jbryan at productiveconcepts.com
Tue Apr 5 07:08:52 MST 2005


On Monday 04 April 2005 7:43 pm, Adam Goryachev wrote:
> On Mon, 2005-04-04 at 16:44 -0500, Scott Nelson wrote:
> > On Apr 4, 2005, at 3:04 PM, Jacob Cazzell wrote:
> > > I looked around but I can't quite figure this configuration out.  I
> > > would like the ability to allow a user to call in to a number and be
> > > able to transfer back out after entering a "passcode" (to prevent just
> > > anyone from making calls through my system).
> >
> > That is the DISA application.  See
> > http://www.voip-info.org/wiki-Asterisk+cmd+DISA
>
> Or for much tighter control on destination numbers they can call, you
> could just drop them into a context that has various extensions
> configured which will restrict them to dialling a 'local number' or
> whatever you prefer....
>
> PS, this might also be possible with DISA, never looked, but there is
> always more than one way to skin a cat :)

Or, for much more flexible control of authentication, you could use a custom 
AGI script + 'fake' DISA context (e.g. exten => s,1,Background(dialtone))..

Which is what i did for our shop.. wrote a simple Perl script that 
authenticates the users:

[login]
exten => _7.,1,AGI(login.pl|${EXTEN:1})

You could also use login.pl sans the arg, which would cause login.pl to prompt 
for extension using 'vm-extension'. Upon successful authentication, login.pl 
redirects the call to 'internal,s,1' (or whatever you want to call it.) My 
'internal' context looks something like this:

[internal]
exten => s,1,Background(dialtone)

include => extensions
include => local
include => longdistance

exten => t,1,Goto(s,1,)
exten => i,1,Playback(pbx-invalid)
exten => i,n,Goto(s,1,)


The timeout logic is a bit more complex (counts the number of timeouts and 
hangs up after 2 timeouts, etc.) - same with the 'invalid' logic...but you 
get the idea.

If anybody wants more info, feel free to ask. I also have the dialtone.gsm 
file available - or its easy enough to record your own.


Cheers!
-josiah

-- 
Josiah Bryan
IT Coordinator
Productive Concepts, Inc.
jbryan at productiveconcepts.com
(765) 964-6009, ext. 224



More information about the asterisk-users mailing list