You test the status of the call after line 3 and exit. You really need to see exactly what value you are getting for ${HANGUPCAUSE} when the line is busy. You follow that with a Dial for the other number.
Note that your line 4 is redundant, as a successful call will never reach it, and it will be inferred if an unsuccessful one drops off the end of the dialplan.
exten => 12,1,Dial(SIP/${EXTEN},10)
same => n,GotoIf($["${DIALSTATUS}" = “BUSY”]?busy:unavail)
same => n(unavail),Dial(SIP/13,10)
same => n,Hangup()
same => n(busy),Dial(SIP/13,10)
same => n,Hangup()