Call Forwarding Asterisk

Hi all,
I am a beginner with asterisk. I want to manage a simple “call forwarding”.
I’ve 3 users which are 1000,2000,3000.
I want to forward calls from 1000 to 3000.

my extensions.conf file is like below,
[internal]
exten => 1000,1,Dial(SIP/User1)
exten => 1000,n,Hangup()

exten => 2000,1,Dial(SIP/User2)
exten => 2000,n,Hangup()

exten => 3000,1,Dial(SIP/User3)
exten => 3000,n,Hangup()

;call forwarding
exten => _21X.,1,NoCDR
exten => _21X.,2,Set(DB(CFIM/${CALLERID(NUM)}=${EXTEN:4})
exten => _21X.,3,Playback(vm-saved)
exten => _21X.,4,Hangup()

When I dial 213000 from the user with 1000, I hear message of “saved” but when I call 1000, no forwarding happens. Just 1000 dials and ends. How can I handle this?
Help please.
Thanks for reading me…

Ocean.

And where is the routine that evaluate the AstDB to know if the forward its’ enable? If that is your complete dialplan you are missing that part of code.

Thank you for replying,
That is my complete dial plan. What am I supposed to do to complete the missing part? Can you give me an idea?
Thanks.

Thank you for replying,
That is my complete dial plan. What am I supposed to do to complete the missing part? Can you give me an idea?
Thanks.

You have write-only database. You need to add code to read back what you have stored and to act on that.

Hmmm I see. Thank you for helping me.

If you want people to design code for you, there is a jobs forum, where you can ask for paid support.

I don’t need it. I just wanted to know what my mistake is and understand the logic. thanks for recommendation.