Php 星号刻度盘

Php 星号刻度盘,php,asterisk,asteriskami,Php,Asterisk,Asteriskami,我需要连接星号中的2个用户。什么是最好的选择?AGI还是PAMI?现在我测试PAGI 还有我的扩展名.conf 有些像这样 exten => 1,1,AGI(/var/tmp/quickstart/run.sh) exten => 1,n,Hangup 在主方法中,我进行测试调用,如 $result = $client->dial("SIP/demo-alice"); if ($result->isAnswer()) { $this->

我需要连接星号中的2个用户。什么是最好的选择?AGI还是PAMI?现在我测试PAGI 还有我的扩展名.conf 有些像这样

exten => 1,1,AGI(/var/tmp/quickstart/run.sh)
exten => 1,n,Hangup
在主方法中,我进行测试调用,如

  $result = $client->dial("SIP/demo-alice");
    if ($result->isAnswer()) {
        $this->log("ANSWERIN");
        $this->log($clid);
    } 
但是拨入php脚本,它的阻塞应用程序。 但php脚本中的拨号正在阻止所有脚本。
当大量连接发生时,服务器将过载。连接两个sip用户的最佳选择是什么?AGI还是AMI?

您需要阅读类似ORelly的《星号电话的未来》一书


简短回答:你不需要两者都用。您已经使用了dialplan。

Thnx。现在使用AGI,在php脚本中,只需检查用户名。然后从dialplan调用用户