[Asterisk-Users] Call Forward or DND

Anton Krall akrall-lists at intruder.com.mx
Mon Mar 7 18:06:23 MST 2005


Interesating approach.... Sounds very logical.. I guess it's a mix of all
the ideas given... You can validate the desired forward number using
variables and len just to check it's a valid one... And then use the goto
based on the phones context... As you put it, its flexible... Also, some
checks to see if the forward extension its their own, then goto voicemail...
 

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Kristian
Kielhofner
Sent: Lunes, 07 de Marzo de 2005 06:50 p.m.
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Call Forward or DND

Howard Lowndes wrote:
> On Tue, 2005-03-08 at 10:48, Anton Krall wrote:
> 
>>Nice idea.. Now, also We would need to check the number of 
>>digitsentered, if more than X, then call is an outside number, is less 
>>than X, then its an internal extension..
> 
> 
> Simple.
> 
> SetGlobalVar(DIGITS=4)
> GotoIf($[${LEN(${EXTEN}) > ${DIGITS}]?s-ext:s-int)
> 
>>Sounds good? 

I don't like to shoot down other users' ideas, but I feel that this is a
situation where there is clearly one superior way to accomplish this task:

A GotoIf/SetVar is completely unnecessary.  Again, use the context that your
internal sip phones use, and a goto() into that context with the forwarded
number:

Goto(my-internal-sipphones,1234)
Goto(my-internal-sipphones,8005551212)

	The first argument is the context, the next argument is the number. 
Your internal sip phones should be able to reach each other via "extension"
dialing and (hopefully) be able to reach outside numbers as well.  No
gotoif's, etc. needed.  It gives you the ability to forward calls to ANY
number that your sip phones can call (via THEIR context). 
Very flexible.

--
Kristian Kielhofner
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list