Ed Greenberg
2005-Oct-19 02:29 UTC
[Asterisk-Users] Persistant connection for MYSQL command
When doing mysql commands, such as: exten => _X.,1,MYSQL(Connect connid localhost dbuser dbpass dbname) exten => _X.,2,MYSQL(Query resultid ${connid} SELECT\ scriptname\ from\ mac2pin\ where\ userid=${CALLERIDNAME}) exten => _X.,3,MYSQL(Fetch fetchid ${resultid} AGIScript) exten => _X.,4,GotoIf($[${AGIScript} = NULL]?5:7) exten => _X.,5,AGI(${DefaultAGIScript},${EXTEN}) exten => _X.,6,Goto(_X.,8) exten => _X.,7,AGI(${AGIScript},${EXTEN}) exten => _X.,8,MYSQL(Clear ${resultid}) exten => _X.,9,MYSQL(Disconnect ${connid}) exten => _X.,10,Hangup over and over again, is there any way to cache the connection so we can reuse it, to save overhead? </edg>