Enum problem

When a call comes into the following dial plan, the call will just exit non-zero on the 5th priority and never try the second record. Using asterisk 1.2.1 at the moment. Any help would be appreciated.

exten => _X.,1,Wait(2)
exten => _X.,2,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c,e164.isdn.net)}|counter=0)
exten => _X.,3,GotoIf($["${counter}"<"${sipcount}"]?4:7)
exten => _X.,4,Set(counter=$[${counter}+1])
exten => _X.,5,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,${counter},e164.isdn.net)})
exten => _X.,6,GotoIf($["${counter}"<"${sipcount}"]?4:7)
exten => _X.,7,NoOp(“No valid entries in e164.isdn.net for ${EXTEN} or no answer”)
exten => _X.,8,Goto(s-${DIALSTATUS}|1)