Aastra Phone overriding dial plan


I am having trouble with the dialplan using Aastra 6757i with this dial plan, when forwarding is activated. This is my dialplan:

    ; Test
    exten => 0,1,NoOp(IN CALL : ${CALLERID(num)} => ${EXTEN})
    exten => 0,n,AGI(caller_id.php)
    exten => 0,n,Set(CALLERID(name)=0<-${CALLERID(name)})
    exten => 0,n,Dial(${PJSIP_DIAL_CONTACTS(1,1)},10)
    exten => 0,n,Dial(${PJSIP_DIAL_CONTACTS(2,2)},20)
    exten => 0,n,Hangup()

If Extension 1 has call forwarding activated, it doesnt go to Extension 2. It either goes to Voice Mail(if activated) or disconnects. The problem probably lies within the Aastra Phone, but does any of you know how I can fix this issue when called the extension 0, it follows the dialplan and if calling Extension 1, do whatever I programmed on the phone?