星号ARI /桥接录音:"Recording not found"



我正在将phpari与Asterisk 13一起使用,并试图记录一个桥接(混合类型)。在我的代码中:

$this->phpariObject->bridges()->bridge_start_recording($bridgeID, "debug", "wav");

它返回:

array(4) {
  ["name"]=>
  string(5) "debug"
  ["format"]=>
  string(3) "wav"
  ["state"]=>
  string(6) "queued"
  ["target_uri"]=>
  string(15) "bridge:5:1:503"
}

何时停止并使用保存

$this->phpariObject->recordings()->recordings_live_stop_n_store("debug");

返回FALSE。

我使用进行调试

curl -v -u xxxx:xxxx -X POST "http://localhost:8088/ari/recordings/live/debug/stop"

结果:

* About to connect() to localhost port 8088 (#0)
*   Trying ::1... Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8088 (#0)
* Server auth using Basic with user 'xxxxx'
> POST /ari/recordings/live/debug/stop HTTP/1.1
> Authorization: Basic xxxxxxx
> User-Agent: curl/7.19.7 (xxxxx) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:8088
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: Asterisk/13.2.0
< Date: Thu, 19 Feb 2015 11:58:18 GMT
< Cache-Control: no-cache, no-store
< Content-type: application/json
< Content-Length: 38
<
{
  "message": "Recording not found"
* Connection #0 to host localhost left intact
* Closing connection #0
}

Asterisk CLI verbose 5跟踪:http://pastebin.com/QZXnpXVA

所以,我已经解决了这个问题。

这只是一个简单的写权限问题。

Asterisk用户无法在/var/spool/星号/记录上进行写入,因为它属于root。将所有权更改为星号用户解决了问题。

我通过再次查看Asterisk CLI跟踪发现了这个问题:

-- x=0, open writing:  /var/spool/asterisk/recording/debug format: sln, (nil)

(nil)表示无法写入文件,因此我检查了文件夹并查看了问题所在。

相关内容

  • 没有找到相关文章

最新更新