Call forwarding unconditionally

Hi All,

I have Asterisk 1.6 , the basic calls are working good for me,

i wanna test the CFU for my number; so added the following in the extensions.conf file

exten => 8862,1,Goto(8863,test)
exten => 8863,1(test),Dial(SIP/8863@192.168.27.189)
exten => 8863,2,Hangup()

; here, the 8862 is my extension and wanna forward the calls to 8863.

But i see nothing is happening with this configs,

Can some one guide me what exactly i need to do for making this CFU working.

Kind Regards
SenthilK
9042009394

Can you paste asterisk CLI output when you make a call?

–Satish

Well, I see a few things that are wrong I think.

You want to forward extension 8862 to extension 8863 priority test.

But extension 8863 has a priority 1, not test.

Think you should configure extension 8863 as follows:

exten => 8863,1,NoOp(Extension 8863)
same => n(test),Dial(SIP/extension@something)
same => n,Hangup()

And in your example it looks like you forward extension 8863 to itself, “Dial(SIP/8863@192.168.27.189)” or is that same extension number on another server?

Hope this helps you.

Hi all,

thank you very much for the response,

i made this below code and it worked for me the CFU and CFNA. ( CFB is still not working. )

For CFU :
exten => 8862,1,Dial(SIP/8863)
exten => 8862,2,Hangup

For CFNA:
exten => 8862,1,Dial(SIP/8862,10)
exten => 8862,2,Dial(SIP/8863)
exten => 8862,3,Hangup

but i need the CFB working ? what i should add to make the Call forwarding Busy to work ?

please suggest me.

Kind Regards
SenthilK
9190420009394

Mmm… think I have overlooked something…

You want CFU and CFB.

That means you have to set the values of your wanted forward number and check before sending a call to an account if there is a forward on that account.

To set the forward I use:

exten => _21.,1,Answer()
same => n,Set(DB(CFIM/${CALLERID(NUM)})=${EXTEN:4})
same => n,Playback(vm-saved)
same => n,SayDigits(${EXTEN:4})
same => n,Hangup()

The user calls 21forwardnumber. ie 211234567890, the forward number is 1234567890

Then I have a macro:

[macro-callforwarding]
exten => s,1,Set(temp=${DB(CFIM/${ARG1})})
exten => s,n,GotoIf(${temp}?cfi:nocfi)
exten => s,n(cfi),NoOp( CFI Found)
exten => s,n,Dial(SIP/${temp}@trunk)
exten => s,n,Hangup()
exten => s,n(nocfi),NoOp(No CFI found)

And I call the macro before every connection:

exten => _1234,1,Macro(callforwarding,${EXTEN})
same => n,Dial(SIP/1234)
same => n,Hangup()

Think this should help you…

PS. to remove the forward:

exten => _**21,1,Answer()
same => n,Set(Before=${DB_DELETE(CFIM/${CALLERID(num)})})
same => n,Playback(call-fwd-cancelled)
same => n,Hangup()