If Iam doing UPDATE SQL statements I got an overload for connection.
am doing everytime an Disconnect ${connid}) but this is ignored.

any idea?


You must clear the resut ID and also issue a disconnect to the
connection ID, see priority 4 and 5.

exten => _X.,1,MYSQL(Connect connid 10.10.10.110 asteriskdb password db)
exten => _X.,2,MYSQL(Query resultid ${connid} SELECT\ fullcontact\
from\ sip\ where\ name=${EXTEN})
exten => _X.,3,MYSQL(Fetch fetchid ${resultid} var1)
exten => _X.,4,MYSQL(Clear ${resultid})
exten => _X.,5,MYSQL(Disconnect ${connid})
exten => _X.,6,GotoIf($["${var1}" = ""]?invalid,i,1:${EXTEN},8)
exten => _X.,8,Set(direct=${var1:4}) ;(strip off 'sip:' from fullcontact info)
exten => _X.,9,Dial(SIP/${direct},15,r)
exten => _X.,10,Goto(sendtovm,${EXTEN},1)
exten => _X.,11,Hangup

Or a simpler method is to setup realtime access to the database and
use the realtime cmd, this will control the mysql access and you won't
have to worry about the connections.

http://www.voip-info.org/wiki/view/Asterisk+cmd+RealTime

--
JR Richardson
Engineering for the Masses
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to