I was going thru the Asterisk Rest API documentation (https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Recordings+REST+API). Saw a couple of interesting APIs for me. Like,
/recordings/stored/{recordingName}
/recordings/live/{recordingName}
I ‘ve enable ARI in asterisk configuration file and now I am getting response for URL – http://localhost:8088/ari/asterisk/info as below.
{
"build": {
"kernel": "4.4.0-71-generic",
"os": "Linux",
"options": "LOADABLE_MODULES, OPTIONAL_API",
"machine": "x86_64",
"date": "2017-04-04 11:28:35 UTC",
"user": "buildd"
},
"system": {
"version": "13.1.0~dfsg-1.1ubuntu4.1",
"entity_id": "00:00:00:00:00:00"
},
"config": {
"name": "",
"default_language": "en",
"setid": {
"user": "",
"group": ""
}
},
"status": {
"startup_time": "2019-02-27T13:47:18.367+0530",
"last_reload_time": "2019-02-28T14:31:42.227+0530"
}
}
But when I try the GET recordings API URL http://localhost:8088/ari/recordings/stored it give the response - {"error":"Allocation failed"}
I have enabled recording in my extensions.conf as below,
exten => 7001,1,Answer()
exten => 7001,2,Monitor(wav,test)
exten => 7001,3,Dial(SIP/7001,60)
exten => 7001,4,Playback(vm-nobodyavail)
exten => 7001,5,VoiceMail(7001@main)
exten => 7001,6,Hangup()
exten => 7002,1,Answer()
exten => 7002,2,Monitor(wav,test1)
exten => 7002,3,Dial(SIP/7002,60)
exten => 7002,4,Playback(vm-nobodyavail)
exten => 7002,5,VoiceMail(7002@main)
exten => 7002,6,Hangup()
I can see the recorded files test-in.wav, test-out.wav, test1.in.wav, test1.out.wav etc
So my question is can I get the APIs /recordings/stored/{recordingName} and /recordings/live/{recordingName} running and so that I can use/playback it from other applications.