<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    $rd is the domain from the latest r-uri, not from original r-uri.
    Can you check to be sure there is no revert_uri() used somewhere
    around?<br>
    <br>
    If still a problem, then load debugger module, set its parameter
    cfgtrace to 1 and send the log messages here to see what actions are
    executed, maybe some revert the uri inside.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 8/24/13 8:05 PM, Steve Davies wrote:<br>
    </div>
    <blockquote
cite="mid:CABFTEGWsvH0bo5kyq85ASVyurmzKKn5ki1kiOigfevRPQDoU2g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Hi -</div>
        <div><br>
        </div>
        <div>Can someone help me understand how pseudo-variables
          interact with branches?</div>
        <div><br>
        </div>
        <div>I've written this logic in my failure route to do a reroute
          of calls if the primary destination fails:</div>
        <div><br>
        </div>
        <div>
          <div>        if ( is_method("INVITE") &&
            !t_check_status("407") && ($rd != "127.0.0.1") ) {</div>
          <div>                # Maybe should also check its not just a
            Busy or similar</div>
          <div>                xlog("L_NOTICE","SLD: INVITE failed $rm
            ($mt / $rs $rr): $ci::$ft; try via asterisk instead\n");</div>
          <div>                append_branch("<a class="moz-txt-link-freetext" href="sip:$">sip:$</a><a
              moz-do-not-send="true" href="http://rU@127.0.0.1:5070">rU@127.0.0.1:5070</a>");</div>
          <div>                send_reply("181", "Rerouting call via
            local failover");</div>
          <div>                $avp(senttoast) = 1;</div>
          <div>                if (!t_relay()) {</div>
          <div>                        sl_reply_error();  # or
            reply_error ?</div>
          <div>                }</div>
        </div>
        <div><br>
        </div>
        <div>I'm trying to check if the call was already rerouted - by
          looking at $rd.  But in fact I find that $rd keeps the domain
          from the ORIGINAL invite even if the call that just failed was
          the one to <a moz-do-not-send="true"
            href="http://127.0.0.1:5070">127.0.0.1:5070</a> .</div>
        <div><br>
        </div>
        <div>So I'm obviously missing something about how
          pseudo-variables interact with the branching etc.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Steve</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <br clear="all">
        <div>
          <br>
        </div>
        -- <br>
        <font size="1">Steve Davies: Technical Director, Connection
          Telecom (Pty) Ltd<br>
          Email is preferred, but: Phone: 0878200200<br>
        </font><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
  </body>
</html>