duan19805 2012-09-21 03:57
浏览 141
已采纳

如何将Asterisk服务器与外部关系数据库集成,如mysql?

My objectives: Client(SIP phone, i use 3CX phone) dial to asterisk server, asterisk then connect with external relational database(not located in the same place with asterisk server), and if database response something, asterisk server play a voice file(predefined .gsm file) to response client.

What i already have: I have installed AsteriskNow in VirtualBox as a asterisk server, the client is using softphone to connect with Asterisk server in SIP channel. When the Client dial to asterisk server, the server can execute the dialplan.

My question: If i want asterisk server establish connection to external database, for example, MySQL. and access the request data, Do i need to let dialplan invoke AGI script to do that? If so, using creating AGI script in PHP is much easier to achieve? If not, what should do to connect mysql? Using ODBC?

Is it possible to manipulate the data in asterisk server using dialplan, not using other programming language? But it seems dialplan does not have complete syntax support like other programming language?

  • 写回答

3条回答 默认 最新

  • du958642589 2012-09-21 04:45
    关注

    you can use ODBC on asterisk. even you can connect asterisk to Microsoft SQL Server. if you want to save log data on asterisk you can use CEL or CDR or you can recieve events by AMI. but if you want to force asterisk to do a special task (dynamic) it's better that use AGI. I hope it be helpful.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥60 许可证msc licensing软件报错显示已有相同版本软件,但是下一步显示无法读取日志目录。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系