[Asterisk-Users] Setting a "Forward" to an external number
onyourphone
Thorben Jensen
thorben at thorben.dk
Fri Feb 18 23:37:14 MST 2005
asterisk-users-bounces at lists.digium.com wrote:
> Hi!
>
> Maybe I have just been looking on the wrong pages but there is a
> question that is very important for me. I already studied some
> Demo-Dialplans and made some basic experiences with Asterisk.
> But what I
> need to find out is how I can handle this.
>
> I am leaving my office and I want to tell asterisk to forward
> calls now
> to my mobile phone by just hitting a key (on my IP-Phone) or
> by using a
> special key-sequence.
>
> How can this be handled because I need to change the dialplan
> based on
> some information coming from a device attached to a channel.
> When back in my office I hit the key again and the calls are
> now routed
> to my IP-Phone (or ISDN-Phone on zap-channel) again.
>
> With IP-Phones I can imagine just unregistering the phone and
> having a
> dialplan with a fallback-option or something like that. But what if I
> want to tell asterisk to forward calls from now on to a
> number I want to
> manually add just for today (hitting a key, entering the new target
> number and that's it). where can I find some information on
> how to make
> this feature available.
This is the way we do it, we have it call the local extension as well as a
mobile number, and then you choose where to pick up:
[applications]
exten => _*22*.,1,Answer()
exten => _*22*.,2,DBput(DUAL/${CALLERIDNUM}=${EXTEN:4})
exten => _*22*.,3,PlayBack(call-fwd-parallel)
exten => _*22*.,4,PlayBack(activated)
exten => _*22*.,5,Hangup
exten => **22,1,Answer()
exten => **22,2,DBdel(DUAL/${CALLERIDNUM})
exten => **22,3,PlayBack(call-fwd-parallel)
exten => **22,4,PlayBack(de-activated)
exten => **22,5,Hangup
[macro-dial]
exten => s,1,DBget(DUAL=DUAL/${ARG2})
exten => s,2,Dial(${ARG1}&${OUTGOING}/${DUAL},20,wW)
exten => s,3, VoiceMail(su${ARG2})
exten => s,102,Dial(${ARG1},20,Ww)
exten => s,103,VoiceMail(su${ARG2})
exten => s,203,VoiceMail(sb${ARG2})
More information about the asterisk-users
mailing list