[SR-Users] start_recording and stop_recording inside event_route[xhttp:request]
Richard Fuchs
rfuchs at sipwise.com
Wed Apr 28 18:58:09 CEST 2021
On 28/04/2021 10.53, [ EXT ] Володимир Іванець wrote:
> Hello!
>
> I'm testing call recording with Rtpengine. It works fine when the
> "record-call=on" flag is added to the /rtpengine_offer/ or
> /start_recording/ is used in the *request_route*.
>
> But I was wondering if the call recording can be managed by a separate
> application. So I add the following lines to the
> *event_route[xhttp:request]* and triggered it with an HTTP request
> after the call was established. The call-id value was taken from the
> Rtpengine log and sent with the request.
>
> / if ($hu =~ "^/CALL_RECORD_START/") {/
> / $var(call_id) = /"call-id=" + /$(hu{s.select,2,/});/
> xlog("L_DBG", "$var(call_id)");
> / start_recording($var(call_id));/
> //exit;
> / }/
>
If you have to reason to go through Kamailio for this, you can simply
trigger the command from any other external application. There's a
sample script included in the repo that can be used for this purpose
directly (making use of the Perl module that is also included):
https://github.com/sipwise/rtpengine/blob/master/utils/rtpengine-ng-client
There's also a nodejs client that I'm aware of:
https://github.com/davehorton/rtpengine-client
Or you can hand-roll the request and talk to rtpengine via HTTP or
Websocket for example.
Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210428/2445febd/attachment.htm>
More information about the sr-users
mailing list