每个基于AGI脚本的PHP都是运用下面的形式:
#!/usr/bin/php –q
<?
$stdin = fopen(‘php: //stdin’, ‘r’);
$stdout = fopen(‘php://stdout’, ‘w’);
$stdlog = fopen(‘my_agi.log’, ‘w’);
/*Operational Code starts here*/
…
…
…
?>
当执行php的时候,Asterisk会通过标准输入(STDIN)传送一组信息到AGI脚本, 用下面的方式来处理标准输入是最好的.
#!/usr/bin/php –q
<?
$stdin = fopen(‘php://stdin’, ‘r’);
$stdout = fopen(‘php://stdout’, ‘w’);
$stdlog = fopen(‘my_log’, ‘w’);
/*Handling execution input from Asterisk*/
While (!feof($stdin))
{
$temp = fgets($stdin);
$temp = str_replace(“\n”,””,$temp);
$s = explode(“:”,$temp);
$agivar[$s[0]] = trim($s[1]);
If ($temp == “”)
{
break;
}
}
/*Operational Code starts here*/
...
...
...
?>
一旦我们已经处理了来自Asterisk服务器的呼入信息,我们就可以开始执行实际的运作流程了.
Cheers!
Joe.Yeung
分享到:
相关推荐
AgI/TiO2 复合材料的电子结构和光催化性质:第一性原理的研究,荆涛,马向超,基于第一性原理密度泛函理论对AgI/TiO2复合材料的电子结构和相关光催化性质进行了研究。结果表明,AgI团簇态出现在价带顶的上方,导�
AGI High Resolution Maps is a global vector dataset consisting of political boundaries, coastlines, rivers, and lakes. It is extracted from the 1995 CIA RWDB2 database and optimized for rendering in ...
AGI Celestial Imagery The AGI Celestial Imagery is a photographic background of the night sky. It is free to use with AGI products.
asterisk AGI应用说明,主要讲述在asterisk中如何应用AGI.
通过学习AGI熟悉和掌握Asterisk的开发和设计
agi stk vdf online demo
本文件夹中的所有文件,均保存于AGI官网,由于AGI官网对我们有一定的访问限制,所以我就把有关MATLAB的所有搜索...还有就是建议阅读My tips for using the STK Object Model with MATLAB文件夹中的内容,或许会有启发
一个简单的AGI示例,java连接asterisk代码
AGI Systems Tool Kit (STK) 11.0 with Data Disc AGI Systems Tool Kit (STK) 11.0 with Data Disc AGI Systems Tool Kit (STK) 11.0 with Data Disc
development of AGI. A general platform that could support the prevailing computer-science-based artificial neural networks as well as neuroscience-inspired models and algorithms is highly desirable...
AGI Syllabus AGI教学大纲
美国Analytical Graphics公司开发的STK卫星工具包软件,是航天工业领先的商品化分析软件。STK可以快速方便地分析复杂的陆、海、空、天任务,并提供易于理解的图表和文本形式的分析结果,确定最佳解决方案。...
美国Analytical Graphics公司开发的STK卫星工具包软件,是航天工业领先的商品化分析软件。STK可以快速方便地分析复杂的陆、海、空、天任务,并提供易于理解的图表和文本形式的分析结果,确定最佳解决方案。...
The AGI Download Utility is a free application that can query and download terrain, imagery, and model files. It can access content from the AGI Server or it can access the imagery and models on this ...
AGI STK11 UITemplate安装文件,需要安装VISUAL STUDIO.
AGI模盒是北京先图科技有限公司开发的一款Revit实用插件,用于快速准确地创建和修改建筑、结构、机电的三维模型,智能根据AutoCAD图纸进行快速翻模,并提供在线族库管家供广大工程师下载。 (1) 专业功能助您快速建模...
AGI Systems Tool Kit简称stk,是行业内专业的卫星工具套件,最新版本stk 11.2.stk软件使工程师能够同时分析地面,海洋,航空,航天等。该软件的主要应用是分析和解决卫星在地球周围的旋转问题。该软件现在用于航空...
通用人工智能(AGI)的技术、应用及安全问题:以ChatGPT为例.pdf
The article is devoted to the technology for obtaining optical ceramics of AgBr-TlI and AgBr-TlBr
The city database on this disc is a more extensive version than the standard one installed with STK. It contains ~2,000,000 cities compared to STK's default ~100,000 cities. The dataset relies on NGA ...