asterisk 操作mysql -ag凯发k8国际
[globals]
dbcurrenthost=localhost
dbuser=root
dbpass=passw0rd
dbname=asterisk
[sip]
exten => _x.,1,set(callerid(num)=58837999)
exten => _x.,n,mysql(connect connid ${dbcurrenthost} ${dbuser} ${dbpass} ${dbname}) ;连接mysql 操作
exten => _x.,n,set(id=12)
exten => _x.,n,mysql(query resultid ${connid} insert into jd set id=14\, name =\'ppp\') ; //进行查询
exten => _x.,n,mysql(query resultidr ${connid} select name from jd where id=${id}) ; //进行查询
exten => _x.,n,mysql(fetch foundrow ${resultidr} name) ;//读取
exten => _x.,n,mysql(clear ${resultidr}) ;//清除什么什么东东
exten => _x.,n,mysql(disconnect ${connid}) ; //关闭连接
exten => _x.,n,noop(${name})
exten => _x.,n,queue(sipqueue,t,,,150)
exten => _x.,n,hangup
exten => 3000,1,setmusiconhold(default)
exten => 3000,n,waitmusiconhold(20)
转载于:https://www.cnblogs.com/5dteam/articles/2059943.html
总结
以上是ag凯发k8国际为你收集整理的asterisk 操作mysql的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇:
- 下一篇: