[Asterisk-Users] Setting a "Forward" to an external number on
your phone
Rich Adamson
radamson at routers.com
Fri Feb 11 16:23:49 MST 2005
> 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.
Here's one way to do that... (the example below was being used to
activate/deact the ivr on our system):
; toggle the ivr by dialing this extension
exten => 3950,1,DBget(ISIVRON=FEAT/ivron) ; if success, step 2, else 102
exten => 3950,2,GotoIf(${ISIVRON} == yes?3:102)
exten => 3950,3,DBdel(FEAT/ivron)
exten => 3950,4,Background(npi-ivroff)
exten => 3950,5,Hangup
exten => 3950,102,DBput(FEAT/ivron=yes)
exten => 3950,103,Background(npi-ivron)
exten => 3950,104,Hangup
On whatever sip phone your using, program a key to autodial 3950. First
time activates it, the second call deacts it. If you can't program
a key, then just dial 3950. (I have a softkey on my Cisco 7960
defined to do that.)
Then in your the dialplan entry for your exten, just insert the
necessary DBget and check its value. If 'yes', send the call to
your cell phone. If no, ring your extension.
If you forget to start the call forwarding before leaving the office,
then use whatever pstn facility you have to dial x3950 to activate
it remotely.
Rich
More information about the asterisk-users
mailing list