<div dir="ltr">You may try it in main route:<div><br><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">   if (has_totag()  &amp;&amp; (uri == myself)  &amp;&amp; is_method(&quot;INVITE|ACK|BYE|</span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">UPDATE&quot;))</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px">

<br style="font-family:arial,sans-serif;font-size:12.727272033691406px"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">        {</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px">

<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">                if(match_dialog())</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">                        {</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px">

<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">                                xlog(&quot;in-dialog topology hiding request - $DLG_dir (from $fu to $to uri: $ru\n&quot;);</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px">

<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">                                route(1);</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">                                exit;</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px">

<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">                        }</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">        }</span><br>

</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-07 13:18 GMT+06:00 Лытаев Антон Викторович <span dir="ltr">&lt;<a href="mailto:lav@ptcomm.ru" target="_blank">lav@ptcomm.ru</a>&gt;</span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <span lang="en"><span>if </span><span>use the </span></span>topology_hiding() <span lang="en"><span>without</span>
      <span>match_dialog()</span> <span>in</span>
      <span></span></span>has_totag():<br>
    <br>
    <i>    # account only INVITEs</i><i><br>
    </i><i>    if (is_method(&quot;INVITE&quot;)) {</i><i><br>
    </i><i>            if
      (registered(&quot;location&quot;,&quot;$fu&quot;)&amp;&amp;!client_nat_test(&quot;8&quot;))</i><i><br>
    </i><i>                {</i><i><br>
    </i><i>                topology_hiding();</i><i><br>
    </i><i>                setflag(1); # do accounting</i><i><br>
    </i><i>                }</i><i><br>
    </i><i>            else {</i><i><br>
    </i><i>                sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID bla&quot;);</i><i><br>
    </i><i>                exit;</i><i><br>
    </i><i>                }</i><i><br>
    </i><i>      }</i><i><br>
    </i><i>..............................</i><i><br>
    </i><i>    if (has_totag()) {</i><i><br>
    </i><i>        if (loose_route()) {</i><i><br>
    </i><i>            if (is_method(&quot;BYE&quot;)) {</i><i><br>
    </i><i>                setflag(1); # do accounting ...</i><i><br>
    </i><i>                setflag(3); # ... even if the transaction
      fails</i><i><br>
    </i><i>            } else if (is_method(&quot;INVITE&quot;)) {</i><i><br>
    </i><i>                record_route();</i><i><br>
    </i><i>            }</i><i><br>
    </i><i>            route(1);</i><i><br>
    </i><i>        } else {</i><i><br>
    </i><i>            if ( is_method(&quot;ACK&quot;) ) {</i><i><br>
    </i><i>                if ( t_check_trans() ) {</i><i><br>
    </i><i>                    t_relay();</i><i><br>
    </i><i>                    exit;</i><i><br>
    </i><i>                } else {</i><i><br>
    </i><i>                    exit;</i><i><br>
    </i><i>                }</i><i><br>
    </i><i>            }</i><i><br>
    </i><i>        sl_send_reply(&quot;404&quot;,&quot;Not here blabla&quot;);</i><i><br>
    </i><i>        }</i><i><br>
    </i><i>        exit;</i><i><br>
    </i><i>    }......................</i><i><br>
    </i><br>
    <span lang="en"><span>then</span>
    </span><span lang="en">capture of
      the call <span>looks like this:</span></span><br>
    <br>
    <img src="cid:part1.00000608.02020304@ptcomm.ru" alt=""><br>
    <br>
    <span lang="en"><span>need to
        change</span> <span>has_totag (),</span> <span>adding</span> <span>match_dialog (),</span>
      <span>but</span> <span>how to do it</span>
      <span>right?</span></span><br>
    <br>
    <div>06.08.2014 19:22, Bogdan-Andrei Iancu
      пишет:<br>
    </div><div class="">
    <blockquote type="cite">Hi,
      <br>
      <br>
      Could you post a SIP capture of the call (showing both legs, on
      the opensips machine) ?
      <br>
      <br>
      Regards,
      <br>
      <br>
      Bogdan-Andrei Iancu
      <br>
      OpenSIPS Founder and Developer
    </blockquote>
    <br>
  </div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>