我使用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详细5跟踪:http://pastebin.com/QZXnpXVA
答案 0 :(得分:3)
所以,我已经解决了这个问题。
这是一个简单的写入权限问题。
Asterisk用户无法写入 / var / spool / asterisk / recording ,因为它归 root 所有。 将所有权更改为星号用户解决了它。
我再次查看Asterisk CLI跟踪检测到了这个问题:
-- x=0, open writing: /var/spool/asterisk/recording/debug format: sln, (nil)
此(无)表示无法写入文件,因此我检查了文件夹并查看问题所在。