IVR working internally only =[

I have an IVR working now at the internal number 1235, but from outside it does not work 100%. The answer works, but when the IVR try to read the database the call ends with a “Goodbye”, this is the code on extensions_custom.conf:

[from-internal-custom]
exten => 1235,1,Answer
exten => 1235,2,Wait(1)
exten => 1235,3,Playback(custom/bem-vindo)
exten => 1235,4,Read(NUMBER,custom/digite-o-numero-do-cartao,19,3)
exten => 1235,5,MYSQL(Connect connid 172.16.1.40 root trojanadm teste)
exten => 1235,6,MYSQL(Query resultid ${connid} SELECT senha FROM cartao$
exten => 1235,7,MYSQL(Fetch fetchid ${resultid} senha)
exten => 1235,8,MYSQL(Clear ${resultid})
exten => 1235,9,MYSQL(Disconnect ${connid})
exten => 1235,10,GotoIf($[ ${senha} != ‘’ ]?ok:no)
exten => 1235,11(no),Playback(invalid)
exten => 1235,12,Goto(1235,4)
exten => 1235,13(ok),Authenticate(${senha},5)
exten => 1235,14(reiniciar),Read(opcao,custom/menu,1,3)
exten => 1235,15,GotoIf($[ ${opcao} = 1 ]?saldos:nx1)

exten => 1235,16(nx1),GotoIf($[ ${opcao} = 2 ]?bloqueio:nx2)
    exten => 1235,17(nx2),GotoIf($[ ${opcao} = 3 ]?desbloq:nx3)
    exten => 1235,18(nx3),GotoIf($[ ${opcao} = 4 ]?reiniciar:err)
    exten => 1235,19,Wait(1)
    exten => 1235,20(saldos),Goto(saldoapp,s,1)
    exten => 1235,21(bloqueio),Goto(bloqueioapp,b,1)
    exten => 1235,22(desbloq),Goto(desbloqueioapp,d,1)
    exten => 1235,23(err),Playback(invalid)
    exten => 1235,24,Goto(from-internal-custom,1235,4)

I created a inbound route “any DID / any CID” redirecting to mycustomapp that is a misc destination to 1235, when i call to the external number the first lines of the small application works and it says welcome and type the number, but when tryies to read the database, applications end with goodbye.

If i call the same application by the internal number 1235, it works beautiful.

=[ What am i doing wrong?

OK, now i solved this problem, it is because the inbound extension is in another language and the language file does not exist, but now it is working.

But i have an another problem, the line becomes busy if the user hangup.
=[[[[[

Ok i solved the problem enabling the option busy detection from dahdi thak you friends.