<div dir="auto">Hello Richard,<div dir="auto"><br></div><div dir="auto">Thank you very much for the suggestion! I will give it a try.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 28 квіт. 2021, 20:00 користувач Richard Fuchs <<a href="mailto:rfuchs@sipwise.com">rfuchs@sipwise.com</a>> пише:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <div>On 28/04/2021 10.53, [ EXT ] Володимир
      Іванець wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hello!
        <div><br>
        </div>
        <div>I'm testing call recording with Rtpengine. It works fine
          when the "record-call=on" flag is added to the <i>rtpengine_offer</i>
          or <i>start_recording</i> is used in the <b>request_route</b>.</div>
        <div><br>
        </div>
        <div>But I was wondering if the call recording can be managed by
          a separate application. So I add the following lines to the <b>event_route[xhttp:request]</b>
          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.</div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div><i>  if ($hu =~ "^/CALL_RECORD_START/") {</i></div>
          <div><i>    $var(call_id) = </i>"call-id=" + <i>$(hu{s.select,2,/});</i></div>
          <div>    xlog("L_DBG", "$var(call_id)");<br>
          </div>
          <div><i>    start_recording($var(call_id));</i></div>
          <div><i>    </i>exit;</div>
          <div><i>  }</i></div>
        </blockquote>
      </div>
    </blockquote>
    <p>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):
<a href="https://github.com/sipwise/rtpengine/blob/master/utils/rtpengine-ng-client" target="_blank" rel="noreferrer">https://github.com/sipwise/rtpengine/blob/master/utils/rtpengine-ng-client</a></p>
    <p>There's also a nodejs client that I'm aware of:
      <a href="https://github.com/davehorton/rtpengine-client" target="_blank" rel="noreferrer">https://github.com/davehorton/rtpengine-client</a></p>
    <p>Or you can hand-roll the request and talk to rtpengine via HTTP
      or Websocket for example.</p>
    <p>Cheers<br>
    </p>
  </div>

__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>