Trying to create an extension that will toggle an enum value in our database... exten => s,1,MYSQL(Connect connid localhost myuser tmppass asterisk) exten => s,n,MYSQL(Query resultid ${connid} UPDATE\ night_service\ SET\ status=(SELECT\ CASE\ status\ WHEN\ \'y\'\ THEN\ \'n\'\ ELSE\ \'y\'\ END)); exten => s,n,MYSQL(Clear ${resultid}) exten => s,n,MYSQL(Disconnect ${connid}) exten => s,n,Hangup This is saying its exiting with a 0 value, and then I get a busy. Does anyone see what I did wrong here? I'm sure its simple, just not to me :). Rob
> Trying to create an extension that will toggle an enum value in our > database... > > exten => s,1,MYSQL(Connect connid localhost myuser tmppass asterisk) > exten => s,n,MYSQL(Query resultid ${connid} UPDATE\ night_service\ SET\ > status=(SELECT\ CASE\ status\ WHEN\ \'y\'\ THEN\ \'n\'\ ELSE\ \'y\'\ > END)); > exten => s,n,MYSQL(Clear ${resultid}) > exten => s,n,MYSQL(Disconnect ${connid}) > exten => s,n,Hangup > > This is saying its exiting with a 0 value, and then I get a busy. Does > anyone see what I did wrong here? I'm sure its simple, just not to me :). > > RobWhy dont you use an agi ?