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条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog