Discussion:
[asterisk-app-dev] Call recording using ARI
Jakub Wietrzyk
2014-09-20 01:05:50 UTC
Permalink
Hello everyone, first I'd like to say that I'm in love with ARI.

I have almost finished my second (first one was using AMI) node.js
asterisk application using ARI, but I still have some problems.

I'm trying to record Channel or Bridge using ARI call - with no luck
so far. I think I tried everything:

- recording both bridged channels separately via ARI
- recording whole mixing bridge via ARI (log show, that ARI-Recorder
channel is created)
- AMI Monitor action on channel created with ARI (got permission error)

In ARI scenario I'm sending REST POST to start recording with only two
parameters:

/channels/CHANNEL_ID/record { name: 'AoMsxpDcAE7g2kdii', format: 'wav' }

or

bridges/BRIDGE_ID/record { name: 'AoMsxpDcAE7g2kdii', format: 'wav' }

In both cases I got response: {"message":"Internal Server Error"}

Additionally: In asterisk debug it shows "Unrecognized recording error".

I have no more ideas. What should I check to make it work? I'm using
Asterisk 12.5.0

Best regards,
Jakub
Jakub Wietrzyk
2014-09-21 17:14:35 UTC
Permalink
I downloaded and installed latest version from source (instead of one
from FreePbx... ). Recording is working fine.

Sorry for previous spam.
Jakub.
Jan Svoboda
2014-09-22 12:29:18 UTC
Permalink
Hello,

I have tested recording through ARI and can confirm the same error:

ARI returns Internal Server Error - 500 and Asterisk console the following:

[Sep 22 12:10:52] WARNING[30362]: ari/resource_bridges.c:739 ast_ari_bridges_record: Unrecognized recording error: No such file or directory

I have tried different recording locations with the same result.

I am using Asterisk 12.5.0 on CentOS Linux 6.5, installed using RPM packages from http://packages.asterisk.org/.

Jan Svoboda
Software Architect
Post by Jakub Wietrzyk
I downloaded and installed latest version from source (instead of one
from FreePbx... ). Recording is working fine.
Sorry for previous spam.
Jakub.
_______________________________________________
asterisk-app-dev mailing list
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
Jakub Wietrzyk
2014-09-22 19:44:31 UTC
Permalink
Post by Jan Svoboda
Hello,
[Sep 22 12:10:52] WARNING[30362]: ari/resource_bridges.c:739 ast_ari_bridges_record: Unrecognized recording error: No such file or directory
I have tried different recording locations with the same result.
I am using Asterisk 12.5.0 on CentOS Linux 6.5, installed using RPM packages from http://packages.asterisk.org/.
Hello Jan,

I compared directory structure between 12.6-rc1 and 12.50:

I have an idea: check if adding:

/var/spool/asterisk/recording

with appropriate permissions is solving your problem.
--
Jakub Wietrzyk
Jan Svoboda
2014-09-22 20:37:53 UTC
Permalink
Hello,

the “recording” directory was missing, and creating it in "/var/spool/asterisk/recording” did solve the issue, thanks.

Still not sure if this is the correct behaviour. I have tried it before giving absolute path like “/tmp/test”, expecting it would try to create the file in “/tmp”, not in "/var/spool/asterisk/recording/tmp”.

So right now, passing “/tmp/test” (absolute) and “tmp/test” (relative) paths have the same effect.

Jan Svoboda
Software Architect
Post by Jakub Wietrzyk
Post by Jan Svoboda
Hello,
[Sep 22 12:10:52] WARNING[30362]: ari/resource_bridges.c:739 ast_ari_bridges_record: Unrecognized recording error: No such file or directory
I have tried different recording locations with the same result.
I am using Asterisk 12.5.0 on CentOS Linux 6.5, installed using RPM packages from http://packages.asterisk.org/.
Hello Jan,
/var/spool/asterisk/recording
with appropriate permissions is solving your problem.
--
Jakub Wietrzyk
_______________________________________________
asterisk-app-dev mailing list
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
Matthew Jordan
2014-09-23 00:33:21 UTC
Permalink
Post by Jan Svoboda
Hello,
the “recording” directory was missing, and creating it in
"/var/spool/asterisk/recording” did solve the issue, thanks.
Still not sure if this is the correct behaviour. I have tried it before
giving absolute path like “/tmp/test”, expecting it would try to create the
file in “/tmp”, not in "/var/spool/asterisk/recording/tmp”.
So right now, passing “/tmp/test” (absolute) and “tmp/test” (relative)
paths have the same effect.
That's the expected behavior.

Allowing remote users to create files in random locations on the server is
generally a bad idea. The paths that you specify are all relative to
/var/spool/asterisk/recording (or rather, the Asterisk recording directory).

Matt
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
Jan Svoboda
2014-10-11 19:04:22 UTC
Permalink
Hello,

I'm announcing the release of asterisk-ari-client ruby gem, a client library for the Asterisk ARI in ruby.

It implements a code generator using swagger JSON object definitions to create native ruby classes and supports WebSocket events.

For more details visit the Github repository:
https://github.com/svoboda-jan/asterisk-ari

Please provide feedback and feel free to open issues or submit pull requests on Github.

Jan Svoboda
Software Architect

Loading...