All options working, but 1 not

[from-internal-custom]
exten => 1235,1,Answer
exten => 1235,2,Wait(1)
exten => 1235,3,Playback(custom/bem-vindo)
exten => 1235,4(reiniciar),Read(opcao,custom/menu,1,3)
exten => 1235,5,GotoIf($[ ${opcao} = 1 ]?saldos:nx1)
exten => 1235,6(nx1),GotoIf($[ ${opcao} = 2 ]?bloqueio:nx2)
exten => 1235,7(nx2),GotoIf($[ ${opcao} = 3 ]?desbloq:nx3)
exten => 1235,8(nx3),GotoIf($[ ${opcao} = 4 ]?reiniciar:err)
exten => 1235,8(saldos),Goto(saldosapp,s,1)
exten => 1235,9(bloqueio),Goto(bloqueioapp,b,1)
exten => 1235,10(desbloq),Goto(desbloqueioapp,d,1)
exten => 1235,11(err),Playback(invalid)
exten => 1235,12,Goto(from-internal-custom,1235,4)

I am very confused, the code above works properly but the option 1 not. The saldosapp is working, if i execute the command goto(saldosapp,s,1), without the if, it works properly.

You’ve got two priority “8” lines in the dial plan. Either change the second 8 to nine or simply replace all but priority 1 with “n” as this removed the need for individual line numbers.

Thank you friend the problem was solved, sorry for this!

I have another question…
Every time that i try to get a string from mysql it does not work for nothing:

exten => b,2,MYSQL(Connect connid 172.16.1.40 root qwe123 teste)
exten => b,3,MYSQL(Query resultid ${connid} select stat from cartao SET where numero=’${NUMBER}’)
exten => b,4,MYSQL(Fetch fetchid ${resultid} estado)
exten => b,6,GotoIf($[ ‘${estado}’ != ‘Bloqueado’ ]?ok:no)

What am i doing wrong here? I checked the database a lot of times, and Bloqueado is there but never read.

A similar case is this:
exten => s,7,MYSQL(Query resultid ${connid} SELECT servidor FROM parametros WHERE idparametros=‘1’)
exten => s,8,MYSQL(Fetch fetchid ${resultid} tabserv)
exten => s,9,MYSQL(Clear ${resultid})
exten => s,10,MYSQL(Query resultid ${connid} SELECT (limite_avista/100) as limitediv FROM ${tabserv} WHERE matricula=’${matricula}’)
exten => s,11,MYSQL(Fetch fetchid ${resultid} avista)
exten => s,12,MYSQL(Clear ${resultid})

It is a table that the developer changes the name, if i static type the name of the table, it works. Again: It does not want to read strings from mysql, only numbers =[