<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>ok, good that it works now. You should still be able to take them
      from headers with $ci and $ft, but they have to be provided in the
      parameter of start_recording()/stop_recording() if used with a
      non-SIP message.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 05.05.21 18:20, Володимир Іванець
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOQgkjZTqxHnaq+ZRHZ_dAr9pQAe-n_MQifiY_vhPVx=E+9DMw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I did not. I misunderstood your previous message. Now I
          called start_recording() and stop_recording() with <i>call-id</i>
          and <i>from-tag</i> flags and everything worked fine.</div>
        <div><br>
        </div>
        <div>Thank you very much!</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">ср, 5 трав. 2021 о 16:46
          Daniel-Constantin Mierla <<a
            href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>
          пише:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Hello,</p>
            <p>do you pass "from-tag=xyz" to the start_recording()
              function?</p>
            <p>Cheers,<br>
              Daniel<br>
            </p>
            <div>On 05.05.21 13:51, Володимир Іванець wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hello Daniel,
                <div><br>
                </div>
                <div>Sorry, I was out of the office and could make a
                  test only now. As you told, the HTTP request is now
                  processed differently. Unfortunately, I can no longer
                  start call recording. I tried the following options
                  and got the "rtpp_function_call(): can't get From tag"
                  error message each time.</div>
                <div><br>
                </div>
                <div>
                  <ol>
                    <li>/usr/bin/curl -H "Content-Type: text" "<a
href="http://localhost:8088/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0"
                        target="_blank" moz-do-not-send="true">http://localhost:8088/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0</a>"</li>
                    <li>/usr/bin/curl -H "Content-Type: text" "<a
href="http://localhost:8088/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0"
                        target="_blank" moz-do-not-send="true">http://localhost:8088/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0</a>"
                      -H "From: <<a
                        href="http://sip:123@127.0.0.1:5080"
                        target="_blank" moz-do-not-send="true">sip:123@127.0.0.1:5080</a>>;tag=1"</li>
                    <li>/usr/bin/curl -H "Content-Type: text" "<a
href="http://localhost:8088/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0"
                        target="_blank" moz-do-not-send="true">http://localhost:8088/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0</a>"
                      -H "Call-Id: <a
                        href="mailto:249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0"
                        target="_blank" moz-do-not-send="true">249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0</a>"
                      -H "To: <a href="http://sip:456@127.0.0.1:5060"
                        target="_blank" moz-do-not-send="true">sip:456@127.0.0.1:5060</a>"
                      -H "From: <<a
                        href="http://sip:123@127.0.0.1:5080"
                        target="_blank" moz-do-not-send="true">sip:123@127.0.0.1:5080</a>>;tag=1"</li>
                  </ol>
                </div>
                <div><br>
                </div>
                <blockquote style="margin:0px 0px 0px
                  40px;border:none;padding:0px">
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_fline.c:250]:
                      parse_first_line(): first line type 1 (request)
                      flags 2</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:677]: parse_msg(): SIP
                      Request:</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:679]: parse_msg():
                       method:  <GET></i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:681]: parse_msg():  uri:
                         
                      <a
href="mailto:/CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0"
                        target="_blank" moz-do-not-send="true"></CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0></a></i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:683]: parse_msg():
                       version: <HTTP/1.1></i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_hname2.c:294]:
                      parse_sip_header_name(): parsed header name [Via]
                      type 1</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_via.c:2639]: parse_via(): end
                      of header reached, state=5</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:555]: parse_headers():
                      Via found, flags=2</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:557]: parse_headers():
                      this is the first via</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <script>:
                      == TRACE. xhttp:request</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <script>:
                      == TRACE. xhttp:request. HTTP Request Received</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <script>:
                      == TRACE. xhttp:request. hu is:
                      /CALL_RECORD_START/249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <script>:
                      <a
                        href="mailto:call-id=249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0"
                        target="_blank" moz-do-not-send="true">call-id=249ae6300da4b1393be203e21068f6a2@127.0.0.1:5080.0</a>
                      1111111111</i></div>
                  <div><i><b>May  5 14:40:43 test
                        /usr/sbin/kamailio[19603]: ERROR: rtpengine
                        [rtpengine.c:2547]: rtpp_function_call(): can't
                        get From tag</b></i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: xhttp
                      [xhttp_mod.c:420]: xhttp_send_reply(): sending out
                      response: 200 OK</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_hname2.c:294]:
                      parse_sip_header_name(): parsed header name [Host]
                      type 0</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_hname2.c:294]:
                      parse_sip_header_name(): parsed header name
                      [User-Agent] type 28</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_hname2.c:294]:
                      parse_sip_header_name(): parsed header name
                      [Accept] type 23</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/parse_hname2.c:294]:
                      parse_sip_header_name(): parsed header name
                      [Content-Type] type 11</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/parser/msg_parser.c:91]: get_hdr_field():
                      found end of header</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/msg_translator.c:162]: check_via_address():
                      (127.0.0.1, 127.0.0.1, 0)</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/tcp_main.c:1590]: _tcpconn_find(): found
                      connection by id: 5</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/tcp_main.c:2472]: tcpconn_send_put(): send
                      from reader (19603 (27)), reusing fd</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/tcp_main.c:2706]: tcpconn_do_send():
                      sending...</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/tcp_main.c:2739]: tcpconn_do_send(): after
                      real write: c= 0x7f4ba719cd70 n=118 fd=10</i></div>
                  <div><i>May  5 14:40:43 test
                      /usr/sbin/kamailio[19603]: DEBUG: <core>
                      [core/tcp_main.c:2740]: tcpconn_do_send(): buf=</i></div>
                  <div><i><br>
                    </i></div>
                  <div><i><br>
                    </i></div>
                </blockquote>
                <div>Thank you!</div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">пт, 30 квіт. 2021 о
                  17:53 Daniel-Constantin Mierla <<a
                    href="mailto:miconda@gmail.com" target="_blank"
                    moz-do-not-send="true">miconda@gmail.com</a>>
                  пише:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div>
                    <p>I pushed a commit to master branch that should
                      make it work to use the function for non-SIP
                      message processing, by giving call-id=... and
                      from-tag=... via flags parameter -- these two
                      attributes seemed to be used by expecting to be
                      set, even if the rtpengine application may ignore
                      one of them.</p>
                    <p>If you have a chance to test, let me know the
                      result.</p>
                    <p>Cheers,<br>
                      Daniel<br>
                    </p>
                    <div>On 29.04.21 16:38, Daniel-Constantin Mierla
                      wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <p>I looked in the code and indeed it first takes
                        the values from headers for Call-Id, To (tag),
                        From (tag), failing if the headers are not
                        found, but then it updates the values from the
                        flags parameter. So the call-id can be anything
                        in the headers if you provide it as
                        "call-id=xyz" parameter.</p>
                      <p>Maybe the code should be reworked a bit to
                        parse first the flags parameters and if values
                        are not found for the sip attributes, then try
                        to get them from headers.</p>
                      <p>Cheers,<br>
                        Daniel<br>
                      </p>
                      <div>On 29.04.21 15:39, Володимир Іванець wrote:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">I run Kamailio with debug=3 and
                          Rtpengine with LOG_LEVEL=6.
                          <div><br>
                          </div>
                          <div>Rtpengine logs offers, answers and
                            deletes but there is nothing when I trigger
                            <i>start_recording</i> with HTTP request.
                            Below is the full Kamailio log for the
                            request. It looks to be failing right on the
                            <i>start_recording</i> function and I don't
                            see any other issues except empty Call-Id
                            here: "receive_msg(): --- received sip
                            message - request - call-id: [] - cseq: []".</div>
                          <div><br>
                          </div>
                          <div>I tried to add Call-Id header to my HTTP
                            request and found out that now rtpengine
                            module will complain about missing To
                            header. With tries and errors, I specified
                            all required headers and Rtpengine started
                            call recording:</div>
                          <blockquote style="margin:0px 0px 0px
                            40px;border:none;padding:0px">
                            <div><i>/usr/bin/curl -H "Content-Type:
                                text" "<a
href="http://localhost:8088/CALL_RECORD_START/38687ab466a031d20d852706710d2b4f@127.0.0.1:5080.1"
                                  target="_blank" moz-do-not-send="true">http://localhost:8088/CALL_RECORD_START/38687ab466a031d20d852706710d2b4f@127.0.0.1:5080.1</a>"
                                -H "Call-Id: <a
                                  href="mailto:38687ab466a031d20d852706710d2b4f@127.0.0.1:5080.1"
                                  target="_blank" moz-do-not-send="true">38687ab466a031d20d852706710d2b4f@127.0.0.1:5080.1</a>"
                                -H "To: <a
                                  href="http://sip:200-test@127.0.0.1:5060"
                                  target="_blank" moz-do-not-send="true">sip:200-test@127.0.0.1:5060</a>"
                                -H "From: <<a
                                  href="http://sip:2564286000@127.0.0.1:5080"
                                  target="_blank" moz-do-not-send="true">sip:2564286000@127.0.0.1:5080</a>>;tag=as7a92114c"</i></div>
                          </blockquote>
                          <div><br>
                          </div>
                          <div>It also looks like rtpengine module does
                            not care about actual header values.
                            Function <i>start_recording</i> called with
                            Call-Id value is enough to start call
                            recording even if all headers contain random
                            invalid values:</div>
                          <blockquote style="margin:0px 0px 0px
                            40px;border:none;padding:0px">
                            <div><i> /usr/bin/curl -H "Content-Type:
                                text" "<a
href="http://localhost:8088/CALL_RECORD_START/6559572e21e08e0a41503ba5779c6604@127.0.0.1:5080.0"
                                  target="_blank" moz-do-not-send="true">http://localhost:8088/CALL_RECORD_START/6559572e21e08e0a41503ba5779c6604@127.0.0.1:5080.0</a>"
                                -H "Call-Id: does_mot_matter" -H "To: <a
                                  href="http://sip:456@127.0.0.1:5060"
                                  target="_blank" moz-do-not-send="true">sip:456@127.0.0.1:5060</a>"
                                -H "From: <<a
                                  href="http://sip:123@127.0.0.1:5080"
                                  target="_blank" moz-do-not-send="true">sip:123@127.0.0.1:5080</a>>;tag=1"</i></div>
                          </blockquote>
                          <div><br>
                          </div>
                          <div><b>Thank you very much for your help!</b></div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <blockquote style="margin:0px 0px 0px
                            40px;border:none;padding:0px">
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/ip_addr.c:229]:
                                print_ip(): tcpconn_new: new tcp
                                connection: 127.0.0.1</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/tcp_main.c:1175]:
                                tcpconn_new(): on port 42782, type 2,
                                socket 64</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/tcp_main.c:1498]:
                                tcpconn_add(): hashes: 1710:1616:2551, 1</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/io_wait.h:375]:
                                io_watch_add(): DBG:
                                io_watch_add(0xae63a0, 64, 2,
                                0x7f943ba04ac0), fd_no=50</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/io_wait.h:600]:
                                io_watch_del(): DBG: io_watch_del
                                (0xae63a0, 64, -1, 0x0) fd_no=51 called</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/tcp_main.c:4457]:
                                handle_tcpconn_ev(): sending to child,
                                events 1</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/tcp_main.c:4130]:
                                send2child(): selected tcp worker idx:0
                                proc:35 pid:24116 for activity on [tcp:<a
                                  href="http://127.0.0.1:8088"
                                  target="_blank" moz-do-not-send="true">127.0.0.1:8088</a>],
                                0x7f943ba04ac0</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_read.c:1749]:
                                handle_io(): received n=8
                                con=0x7f943ba04ac0, fd=13</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:610]:
                                parse_msg(): SIP Request:</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:612]:
                                parse_msg():  method:  <GET></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:614]:
                                parse_msg():  uri:     <a
href="mailto:/CALL_RECORD_START/7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0"
                                  target="_blank" moz-do-not-send="true"></CALL_RECORD_START/7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0></a></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:616]:
                                parse_msg():  version: <HTTP/1.1></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:89]:
                                get_hdr_field(): found end of header</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/receive.c:324]:
                                receive_msg(): --- received sip message
                                - request - call-id: [] - cseq: []</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG: xhttp
                                [xhttp_mod.c:382]: xhttp_handler(): new
                                fake msg created (286 bytes):</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:610]:
                                parse_msg(): SIP Request:</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:612]:
                                parse_msg():  method:  <GET></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:614]:
                                parse_msg():  uri:     <a
href="mailto:/CALL_RECORD_START/7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0"
                                  target="_blank" moz-do-not-send="true"></CALL_RECORD_START/7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0></a></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:616]:
                                parse_msg():  version: <HTTP/1.1></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/parse_via.c:2639]:
                                parse_via(): end of header reached,
                                state=5</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:498]:
                                parse_headers(): Via found, flags=2</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:500]:
                                parse_headers(): this is the first via</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <script>: == TRACE. xhttp:request</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <script>: == TRACE. xhttp:request.
                                HTTP Request Received</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <script>: == TRACE. xhttp:request.
                                hu is:
/CALL_RECORD_START/7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <script>: <a
                                  href="mailto:call-id=7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0"
                                  target="_blank" moz-do-not-send="true">call-id=7a444c165953cf0a196e10e50d0b611e@127.0.0.1:5080.0</a></i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/parser/msg_parser.c:89]:
                                get_hdr_field(): found end of header</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: ERROR:
                                rtpengine [rtpengine_funcs.c:294]:
                                get_callid(): call-id not found</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: ERROR:
                                rtpengine [rtpengine.c:2383]:
                                rtpp_function_call(): can't get Call-Id
                                field</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG: xhttp
                                [xhttp_mod.c:441]: xhttp_send_reply():
                                sending out response: 200 OK</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core>
                                [core/msg_translator.c:161]:
                                check_via_address(): (127.0.0.1,
                                127.0.0.1, 0)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_main.c:1590]:
                                _tcpconn_find(): found connection by id:
                                1</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_main.c:2472]:
                                tcpconn_send_put(): send from reader
                                (24116 (35)), reusing fd</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_main.c:2706]:
                                tcpconn_do_send(): sending...</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_main.c:2739]:
                                tcpconn_do_send(): after real write: c=
                                0x7f943ba04ac0 n=113 fd=13</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_main.c:2740]:
                                tcpconn_do_send(): buf=</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/usr_avp.c:636]:
                                destroy_avp_list(): destroying list
                                (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/usr_avp.c:636]:
                                destroy_avp_list(): destroying list
                                (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/usr_avp.c:636]:
                                destroy_avp_list(): destroying list
                                (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/usr_avp.c:636]:
                                destroy_avp_list(): destroying list
                                (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/usr_avp.c:636]:
                                destroy_avp_list(): destroying list
                                (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/usr_avp.c:636]:
                                destroy_avp_list(): destroying list
                                (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/xavp.c:539]:
                                xavp_destroy_list(): destroying xavp
                                list (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/xavp.c:539]:
                                xavp_destroy_list(): destroying xavp
                                list (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/xavp.c:539]:
                                xavp_destroy_list(): destroying xavp
                                list (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/receive.c:528]:
                                receive_msg(): cleaning up</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/io_wait.h:375]:
                                io_watch_add(): DBG:
                                io_watch_add(0xb2a640, 13, 2,
                                0x7f943ba04ac0), fd_no=1</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/tcp_main.c:3793]:
                                handle_ser_child(): read response=
                                7f943ba04ac0, -1, fd -1 from 35 (24116)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/io_wait.h:600]:
                                io_watch_del(): DBG: io_watch_del
                                (0xb2a640, 13, -1, 0x10) fd_no=2 called</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_read.c:1890]:
                                handle_io(): removing from list
                                0x7f943ba04ac0 id 1 fd 13, state -1,
                                flags 4028, main fd -1, refcnt 1
                                ([127.0.0.1]:42782 ->
                                [127.0.0.1]:8088)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_read.c:1671]:
                                release_tcpconn(): releasing con
                                0x7f943ba04ac0, state -2, fd=13, id=1
                                ([127.0.0.1]:42782 ->
                                [127.0.0.1]:8088)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24116]: DEBUG:
                                <core> [core/tcp_read.c:1672]:
                                release_tcpconn(): extra_data (nil)</i></div>
                            <div><i>Apr 29 16:01:47 test
                                /usr/sbin/kamailio[24120]: DEBUG:
                                <core> [core/tcp_main.c:3560]:
                                handle_tcp_child(): reader response=
                                7f943ba04ac0, -2 from 0</i></div>
                          </blockquote>
                        </div>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr" class="gmail_attr">чт, 29 квіт.
                            2021 о 13:17 Daniel-Constantin Mierla <<a
                              href="mailto:miconda@gmail.com"
                              target="_blank" moz-do-not-send="true">miconda@gmail.com</a>>
                            пише:<br>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0px 0px 0px
                            0.8ex;border-left:1px solid
                            rgb(204,204,204);padding-left:1ex">
                            <div>
                              <p>Ohhh, blindly missed the assignment
                                before. You should run both kamailio and
                                rtpengine with higher debug level and
                                see if you get any hints from the log
                                messages.</p>
                              <p>Cheers,<br>
                                Daniel<br>
                              </p>
                              <div>On 29.04.21 11:51, Володимир Іванець
                                wrote:<br>
                              </div>
                              <blockquote type="cite">
                                <div dir="ltr">Hello Daniel,
                                  <div><br>
                                  </div>
                                  <div>That is correct. My <i>$var(call_id)</i> variable
                                    contains concatenation of the
                                    "call-id=" string and a Call-Id
                                    value.</div>
                                  <blockquote style="margin:0px 0px 0px
                                    40px;border:none;padding:0px">
                                    <div><i>Apr 27 18:25:00 test
                                        /usr/sbin/kamailio[5347]: DEBUG:
                                        <script>: <a
                                          href="mailto:call-id=3de74068278ede4417086eb82bdf5a06@127.0.0.1:5080.0"
                                          target="_blank"
                                          moz-do-not-send="true">call-id=3de74068278ede4417086eb82bdf5a06@127.0.0.1:5080.0</a></i></div>
                                  </blockquote>
                                  <div><br>
                                  </div>
                                  <div>Thank you!</div>
                                </div>
                                <br>
                                <div class="gmail_quote">
                                  <div dir="ltr" class="gmail_attr">чт,
                                    29 квіт. 2021 о 09:58
                                    Daniel-Constantin Mierla <<a
                                      href="mailto:miconda@gmail.com"
                                      target="_blank"
                                      moz-do-not-send="true">miconda@gmail.com</a>>
                                    пише:<br>
                                  </div>
                                  <blockquote class="gmail_quote"
                                    style="margin:0px 0px 0px
                                    0.8ex;border-left:1px solid
                                    rgb(204,204,204);padding-left:1ex">
                                    <div>
                                      <p>Hello,</p>
                                      <p>related to the initial config
                                        snippet example, the call-id is
                                        expected to be provide as a
                                        named flag, like:</p>
                                      <p>start_recording("call-id=$var(call_id)");<br>
                                      </p>
                                      <p>See the readme of the rtpengine
                                        module for more details.</p>
                                      <p>Cheers,<br>
                                        Daniel<br>
                                      </p>
                                      <div>On 29.04.21 08:23, Володимир
                                        Іванець wrote:<br>
                                      </div>
                                      <blockquote type="cite">
                                        <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"
                                              target="_blank"
                                              moz-do-not-send="true">rfuchs@sipwise.com</a>>
                                            пише:<br>
                                          </div>
                                          <blockquote
                                            class="gmail_quote"
                                            style="margin:0px 0px 0px
                                            0.8ex;border-left:1px solid
rgb(204,204,204);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:0px
                                                    0px 0px
                                                    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"
                                                  rel="noreferrer"
                                                  target="_blank"
                                                  moz-do-not-send="true">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"
                                                  rel="noreferrer"
                                                  target="_blank"
                                                  moz-do-not-send="true">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"
                                              rel="noreferrer"
                                              target="_blank"
                                              moz-do-not-send="true">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"
                                              moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                                          </blockquote>
                                        </div>
                                        <br>
                                        <fieldset></fieldset>
                                        <pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                                      </blockquote>
                                      <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
                                    </div>
                                  </blockquote>
                                </div>
                              </blockquote>
                              <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
                            </div>
                          </blockquote>
                        </div>
                      </blockquote>
                      <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
                    </blockquote>
                    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
                  </div>
                </blockquote>
              </div>
            </blockquote>
            <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>