Hello everybody !
I installed Asterisk 14 on Centos 7 and I encountered a problem while doing Ari and media(Part 1)
My python is exactly the same as the example one on the site, except my credentials to Asterisk. Everything is working except the dtmf part with ‘#’ button, when i press this button, my python program got an exceptionHTTPError: 404 Client Error: Not Found for url: http://192.168.0.12:8088/ari/recordings/live/voicemail/388/1511726259.05/stop
I searched about this issue, and found out that I can’t get the REST response from my asterisk to any command related to live recordings getLive: GET /recordings/live/{recordingName} I can get a response to GET /recordings/stored/ but with recordings (get, stop, pause) i always get this output :
“message”: “Resource not found”
Can anyone help me with that please?
P.S. : my getLive request is following : curl -v -u asterisk:asterisk -X GET "http://192.168.0.12:8088/ari/recordings/live/voicemail/388/1511726259.5"
curl -v -u asterisk:asterisk -X POST "http://192.168.0.12:8088/ari/recordings/live/voicemail/388/1511726259.5"
Live recordings (and their operations) are only valid when a recording operation is in process. Make sure that your recording is actually live on the resource (typically initiated with a /record operation) before issuing an operation on the returned live recording resource.
How can I be sure that recording is in process ?
I am running a websocket application, and it’s doing recording. Are you sure that I need to use POST method here to perfome getLive operation ?
When i used another operations like
stop: POST /recordings/live/{recordingName}/stop
pause: POST /recordings/live/{recordingName}/pause
POST is correct per the documentation (and the source code). So yes, I’m sure
As for the other: you receive a LiveRecording object when you initiate a recording using the /record operation on a supporting resource. The LiveRecording object will have an identifier, which you should use in your subsequent recording manipulation operations. Something like:
I will note that the root of your misunderstanding may be in using getLive to start a live recording. That operation is used to retrieve information about a LiveRecording that is already in progress (and whose method is GET).