oriency 发表于 2007-08-02 09:30

AGI与CGI

AGI和CGI,两者是什么关系阿
如果要通过客户端的浏览器打开主机的网页来配置asterisk相关参数,比如sip.conf中的用户,extensions.conf中的拨号方案,应该是什么样的一个思路呢
主机端需要web server,那CGI怎样与这些配置文件关联呢?不太懂,请教阿!

zhulizhong 发表于 2007-08-02 14:33

usr perl or php

hello, oriency:
AGI and CGI are different. AGIis used to allow the C, perl, phP,Python and java to interact with asterisk dialplan. CGI can be any programing to present webs like perl or c.of course, to run CGI, you have to have a web serverlike apache.the customers can access freepbx to edit the sip.conf or others. of course, you can write php to access the files. but make sure reload asterisk. you can call asterisk by using asterisk manager API to call asterisk and reboot it. it's better to install freepbx for you. good luck!
zhu

oriency 发表于 2007-08-08 13:34

明白了!嗬嗬
我看到了freePBX,需要安装php和MySQL,但是目前是需要做一个嵌入式系统,装这些可能系统的资源不够用吧。freePBX我再好好看看,有没有相关资料呢,官方网站上面说的也不是很详细阿。

CGI应该也要用C写。那你说直接用CGI采用读文件的方式修改sip.conf等文件可行吗?

多谢拉!

zhulizhong 发表于 2007-08-09 11:17

can be done by using C

hello, friends:
it can be done by using c to read and write all the files under /etc/asterisk. doing GUI for embedded asterisk takes long time to do that.
i think Perl is best option for CGI. but PHP is a very good way to present GUI for asterisk because there are many project, which are php-based to support asterisk. if php can be implemented in your case, i think it's best.later, you can integrate with other php-basedopen source project.
zhulizhong

oriency 发表于 2007-08-10 09:27

你好!多谢!
php移植到嵌入式系统方便吗?
你说有很多项目是基于php的工作,有没有相关的链接吗?我先看看参考一下,呵呵,many thanks!

zhulizhong 发表于 2007-08-11 20:02

try astlinux

hello, few projects are going on. some people want to move to arm and some others are using ucasterisk. you can try astlinux. it supports mini_http with php cgi. i do not try that. but it is worthing to try.good luck!
zhu

silverseagule 发表于 2007-08-16 15:17

up zhulizhong,呵呵
页: [1]
查看完整版本: AGI与CGI