[Asterisk-Users] Call Forward or DND

Kristian Kielhofner kris at krisk.org
Mon Mar 7 15:23:34 MST 2005


Anton Krall wrote:
> Guys.
> 
> Im trying to implement some kind of call forward or DND, I checked the wiki
> and there are some examples of call forwards but I was wondering if anybody
> has implemented one that will let you forward calls to SIP, IX or ZAP
> channels alike? For example, forwardto another extension, to an outside
> number or directly to voicemail (ala DND).
> 
> Thx!

Anton,

	Very easy with Goto()...

	Lets say you have a "friends" context that allows calls to any number 
or extension.  This is all you have to do:

[macro-stdexten]
exten => s,1,DBGet(TRANSEXT=DNDFWD/${ARG1})
exten => s,2,Goto(friends,${TRANSEXT})
exten => s,102,Dial(SIP/${ARG1},2) ; or whatever you use now...
exten => s,103,Voicemail(u${ARG1}) ; you get the point...
exten => s,104,Hangup ; duh

	Then if you really wanted to get fancy-in-the-pantsy, you could setup 
another extension like so:

[internal-phones-only]
exten => 1000,1,Answer
exten => 1000,2,Read(FWDNO)
exten => 1000,3,DBPut(DNDFWD=${CALLERIDNUM}/${FWDNO})
exten => 1000,4,Playback(vm-goodbye)
exten => 1000,5,Hangup

...or something like that...

--
Kristian Kielhofner



More information about the asterisk-users mailing list