<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05/27/2014 08:37 AM,
      Daniel-Constantin Mierla wrote:<br>
    </div>
    <blockquote cite="mid:538432A2.8080607@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hello,<br>
    </blockquote>
    <br>
    Ciao,<br>
    <br>
    <blockquote cite="mid:538432A2.8080607@gmail.com" type="cite"> you
      can re-use the lib/kcore/faked_msg.{c,h} in your code, same being
      done by many event routes. Alternative is to build it yourself
      from the outgoing buffer, which is in transaction structure,
      inside the uac field (see tm_cell_t structure).<br>
    </blockquote>
    <br>
    Thanks! I'll have a look.<br>
    <br>
    <blockquote cite="mid:538432A2.8080607@gmail.com" type="cite">
      Easier might be to run this event route with the response sip msg
      structure -- if you run it only when 200ok is received, the
      callback from tm has the response structure.<br>
    </blockquote>
    <br>
    Yep! The idea is to run it only when a 200 is received and to
    populate all the pseudo-variable<br>
    with all fields of the delivered message. About the response
    structure from tm callback, do you<br>
    mean the cell or tmcb_params?<br>
    <br>
    Cheers,<br>
    Roberto Fichera.<br>
    <br>
    <blockquote cite="mid:538432A2.8080607@gmail.com" type="cite"> <br>
      Cheers,<br>
      Daniel<br>
      <br>
      <div class="moz-cite-prefix">On 26/05/14 16:46, Roberto Fichera
        wrote:<br>
      </div>
      <blockquote cite="mid:538353DF.2060402@tekno-soft.it" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">On 05/26/2014 01:04 PM, Roberto
          Fichera wrote:<br>
          <br>
          Ciao,<br>
          <br>
        </div>
        <blockquote cite="mid:53831FAC.3060405@tekno-soft.it"
          type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          [...]<br>
          <blockquote cite="mid:5383184B.6040008@tekno-soft.it"
            type="cite">
            <blockquote cite="mid:53831681.5060302@tekno-soft.it"
              type="cite">
              <blockquote cite="mid:538314AC.7070805@gmail.com"
                type="cite"> <br>
                <div class="moz-cite-prefix">On 26/05/14 12:13, Roberto
                  Fichera wrote:<br>
                </div>
                <blockquote cite="mid:538313C2.7000505@tekno-soft.it"
                  type="cite">
                  <meta content="text/html; charset=ISO-8859-1"
                    http-equiv="Content-Type">
                  <div class="moz-cite-prefix">On 05/26/2014 12:03 PM,
                    Daniel-Constantin Mierla wrote:<br>
                  </div>
                  <blockquote cite="mid:5383117C.1070204@gmail.com"
                    type="cite">
                    <meta content="text/html; charset=ISO-8859-1"
                      http-equiv="Content-Type">
                    Hello,<br>
                  </blockquote>
                  <br>
                  Ciao!<br>
                  <br>
                  <blockquote cite="mid:5383117C.1070204@gmail.com"
                    type="cite"> <br>
                    good that you sent a reminder -- I checked while
                    offline traveling, but then forgot to follow up.<br>
                    <br>
                    I expect that ps->req is null in this case,
                    because there is no request received by kamailio.
                    That results in xlog not doing anything.<br>
                    <br>
                    In other words, I expect the event route being
                    executed, just the action inside is doesn't do
                    anything in this case.<br>
                  </blockquote>
                  <br>
                  Does this mean that I'll have to set a "faked"
                  ps->req in order to get the event route executed?<br>
                </blockquote>
                <br>
                that's the safe way. The event route is executed, but
                many functions that you can use inside config routing
                blocks require a non-null sip message structure. It is
                the case of xlog() for example, which simply returns -1
                if request is null.<br>
              </blockquote>
              <br>
              Ok! Can you suggest the safest and reasonable way to setup
              the request for this case?<br>
            </blockquote>
            <br>
            Ah! No! Wait! The event route is executed within a tm
            callback via tmb.t_request() so I'd expect a valid
            ps->req,<br>
            don't you think so?<br>
          </blockquote>
          <br>
          I've found how to change the code ... just testing the logic.
          I'll get back to you in case.<br>
        </blockquote>
        <br>
        After a while I've found that I can pass a request using the
        uac_r.cbp field, so I've fixed the callback <br>
        to use the passed fields instead a straight int (previously
        mid==message id) but I'm not sure how to <br>
        build a fake sip_msg request regarding the given msilo dumped
        msg, could you please give me a <br>
        tips how to do so?<br>
        <br>
        Cheers,<br>
        Roberto Fichera.<br>
        <br>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>