Queue Authentication Problems

Hey guys, i’ve been recently put in charge of a Trixbox installation running Asterisk 1.2.18. The server has been crashing lately so I was tasked to get a new server running as a backup in the event the primary dies.

I’ve gotten the server up and running with the same version and settings but I have run into a problem that I am pulling my hair out on.

On the current production server we have a queue that can only be entered if a PIN number is input and is valid. This works like a charm on the production server but for some reason it will not work on the new server I built. I copied every file I can see that pertains to asterisk, freepbx and trixbox from the production server but still no luck. The code for this authentication is below. It never seems to recognize any PIN even if it is correct.

[custom-support]
exten => s,01,Answer()
exten => s,02,Set(TIMEOUT(digit)=5)
exten => s,03,Set(TIMEOUT(response)=10)
exten => s,04,Set(tsupportbadpin=1)
exten => s,05,Wait(1)
exten => s,06,Read(tsupportpin|/var/lib/asterisk/sounds/support/supportpin|16|||)
exten => s,07,MYSQL(Connect connid localhost support mtisupport support)
exten => s,08,MYSQL(Query resultid ${connid} SELECT\ supportpin\ FROM\ pin\ WHERE\ supportpin="${tsupportpin}")
exten => s,09,MYSQL(Fetch fetchid ${resultid} txsupportpin)
exten => s,10,MYSQL(Clear ${resultid})
exten => s,11,MYSQL(Disconnect ${connid})
exten => s,12,GotoIf($[${tsupportpin} = “*”]?timeconditions,1,1)
exten => s,13,GotoIf(${ISNULL(${txsupportpin})}?15:14)
exten => s,14,Queue(103)
exten => s,15,Set(tsupportbadpin=$[${tsupportbadpin} + 1])
exten => s,16,Playback(/var/lib/asterisk/sounds/support/supportbadpin)
exten => s,17,GotoIf($[${tsupportbadpin}<7]?6:18)
exten => s,18,Queue(101)

I have checked the database and all is correct as well so I am lost. I am not savvy with Asterisk yet as this is my first time using it so any help would be greatly appreciated.

Thank You,