<div dir="auto">Never tried that but probably makes sence to check event_route[network:msg] <div dir="auto"><br></div><div dir="auto">It acts in the network layer and message itself has to be parsed by some additional script, but still an option. <br><div dir="auto"><div dir="auto"><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 26 Feb 2020, 10:36 Daniel-Constantin Mierla, <<a href="mailto:miconda@gmail.com" target="_blank" rel="noreferrer">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <p>Hello,</p>
    <p>the last option to try is onsend_route and if the CANCEL shows up
      there, then use some string operations over $snd(buf) to get the
      Via branch, last value after "." being the branch index. I am not
      sure you can get the INVITE avps there, but you can try.</p>
    <p>Otherwise a new event route has to be added for this purpose.
      Probably not much coding, depends of what is wanted to be exposed
      there, as the cancel is generated locally, there is no incoming
      sip_msg_t structure.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div>On 26.02.20 10:12, Marco Capetta wrote:<br>
    </div>
    <blockquote type="cite">
      
      <tt>Hi Yuriy,<br>
        <br>
        thanks for the suggestion.<br>
        I tried both "event_route[tm:local-request]" and
        "event_route[tm:local-response]" but internally generated CANCEL
        messages are not captured by those event routes.<br>
        On the contrary, I can see that OPTIONS, NOTIFY and also PUBLISH
        messages are there.<br>
        <br>
        Do you have any other suggestion?<br>
        <br>
        Thanks<br>
        Regards<br>
        Marco<br>
      </tt><br>
      <div>On 2/25/20 5:50 PM, Yuriy Gorlichenko
        wrote:<br>
      </div>
      <blockquote type="cite">
        
        <div dir="auto">You can try event_route[tm:local-request] for
          this. </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Tue, 25 Feb 2020, 15:36
            Marco Capetta, <<a href="mailto:mcapetta@sipwise.com" rel="noreferrer noreferrer" target="_blank">mcapetta@sipwise.com</a>> wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
            <br>
            I have a question regarding call forking and how to access
            failed <br>
            branches: the ones for which kamailio sends out the CANCEL
            because on <br>
            another one a 200OK was received.<br>
            This is the scenario:<br>
              - A calls B<br>
              - 3 devices are registered on B, so a parallel forking is
            done to B1, <br>
            B2 and B3<br>
              - B1, B2, and B3 all reply with 180 Ringing<br>
              - B1 replies with 200OK<br>
              - Kamailio CANCELs the branches with B2 and B3<br>
            <br>
            What I need is access to each single CANCEL that Kamailio
            sends out to <br>
            B2 and B3.<br>
            In particular I need to know the branch-id and Via branch of
            all the <br>
            cancelled branches. Additionally it would be perfect to have
            them inside <br>
            the TM module, in order to have access also to internal
            AVPs.<br>
            <br>
            I tried with dedicated failure routes and also with
            per-branch failure <br>
            routes, but I was never able to access to those values.<br>
            I also didn't found a specific event-route that can help me
            solve this <br>
            problem.<br>
            <br>
            Does anyone have an idea?<br>
            <br>
            Kamailio version 5.2.5<br>
            <br>
            <br>
            Thanks<br>
            <br>
            Regards<br>
            Marco<br>
            <br>
            <br>
            _______________________________________________<br>
            Kamailio (SER) - Users Mailing List<br>
            <a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
            <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
          </blockquote>
        </div>
        <br>
        <fieldset></fieldset>
        <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a>
<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>
</pre>
      </blockquote>
      <br>
      <div>-- <br>
        <div style="line-height:16px;margin:6px 0;padding:8px 8px 8px 8px;border-top:1px #aeb1a6 dotted;border-bottom:1px #aeb1a6 dotted;font-family:'Lucida Sans',Lucida Grande,Verdana,Arial,Sans-Serif;font-size:11px;color:#555555"> <strong style="color:#333333;text-transform:uppercase;font-size:10px"> Marco Capetta </strong> <br>
          VoIP Developer
          <p> <a href="http://www.sipwise.com" style="color:rgb(0,136,204)!important;text-decoration:none!important;border-bottom:1px dotted #aaa" rel="noreferrer noreferrer" target="_blank">
              Sipwise GmbH </a> , Campus 21/Europaring F15<br>
            AT-2345 Brunn am Gebirge </p>
          <p> Phone:  <a href="tel:+4313012044" style="color:rgb(0,136,204)!important;text-decoration:none!important;border-bottom:1px dotted #aaa" rel="noreferrer noreferrer" target="_blank">
              +43(0)1 301 2044 </a> <br>
            Email:  <a href="mailto:mcapetta@sipwise.com" style="color:rgb(0,136,204)!important;text-decoration:none!important;border-bottom:1px dotted #aaa" rel="noreferrer noreferrer" target="_blank"> mcapetta@sipwise.com </a>
            <br>
            Website:  <a href="http://www.sipwise.com" style="color:rgb(0,136,204)!important;text-decoration:none!important;border-bottom:1px dotted #aaa" rel="noreferrer noreferrer" target="_blank"> www.sipwise.com </a> </p>
          <p> Particulars according Austrian Companies Code paragraph 14<br>
            "Sipwise GmbH" - Europaring F15 - 2345 Brunn am Gebirge<br>
            FN:305595f, Commercial Court Vienna, ATU64002206 </p>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a>
<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>
</pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" rel="noreferrer noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer noreferrer" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 9-11, 2020, Berlin - <a href="http://www.asipto.com" rel="noreferrer noreferrer" target="_blank">www.asipto.com</a>
Kamailio World Conference - April 27-29, 2020, in Berlin -- <a href="http://www.kamailioworld.com" rel="noreferrer noreferrer" target="_blank">www.kamailioworld.com</a></pre>
  </div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>