[Asterisk-Users] call forwarding, most basic case
Ferdy Riphagen
f.riphagen at tiscali.nl
Sat Jul 2 16:21:26 MST 2005
Yair,
One option is like this:
1) User dials ext. 154 to activate call forward (to voicemail)
2) User dials ext. 155 to de-activate call forward
3) Macro to check incoming calls for database entry's
4) The local extention must use that macro (or other way of screening)
1)
exten => 154,1,Answer
exten => 154,2,Set(DB(CFIM/${CALLERIDNUM})=${CALLERIDNUM})
exten => 154,3,Hangup
2)
exten => 155,1,Answer
exten => 155,2,DBdel(CFIM/${CALLERIDNUM})
exten => 155,3,Hangup
3)
[macro-test]
exten => s,1,Set(CFIM=${DB(CFIM/${ARG1})})
exten => s,2,GotoIf(${CFIM} = "CFIM/${ARG1}"?1|1)
exten => s,3,Dial(${ARG2}|${ARG3}|${ARG5})
exten => 1,1,VoiceMail(u${CFIM})
4)
exten => 202,1,Macro(test|${EXTEN}|SIP/202|15||tr)
Regards,
/* Ferdy */
http://asterisk.nsec.nl
info(AT)nsec(DOT)nl
Yair Hakak wrote:
> hello all,
>
> i need some help and after trying the wiki i'm even more confused than i was.
>
> i'm trying to set up call forwarding and running into problems...
> i want the most basic call forwarding imaginable.
>
> 1. caller dials extension (say, 154)
> 2. dialplan is updated to forward caller's extension (based on
> CALLERIDNUM) to voicemail, instead of ringing his endpoint.
> 3. caller is disconnected.
>
> as you can see, i don't want any *21 or #21, and then the number, i
> dont even want the caller to be able to pick the number to forward to,
> the simplest case possible, and a different extension (155) to turn
> the forwarding off (for now, then i'll put them in a menu together or
> something.)
>
> so, i know i need an extension like this:
>
> exten =>154,1, Answer
> exten => 154,2,DBput(CFIM/${CALLERIDNUM}=Voicemail(u{CALLERIDNUM})
> exten =>153,3, Hangup
>
> but line 2 is giving me fits, and the documentation is a bit thin. i'm
> confused about the families in the database - do i have to create
> them, or are they aready there?
>
> of course, if i'm barking up the wrong tree and there's a much simpler
> way to do this please tell me.
>
> thanks,
> yair
> _______________________________________________
> 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