<div dir="ltr">Hi,<div><br></div><div>Thanks for picking this up.</div><div><br></div><div>There are no revert_uri()s in my kamailio.cfg.</div><div><br></div><div>Here's my test:</div><div><br></div><div>I send invite to "*<a href="mailto:26@vc2.connection-telecom.com">26@vc2.connection-telecom.com</a>" from my client on 172.16.230.1.</div>
<div><br></div><div>My Kamaillio config first sends the request upstream</div><div>That challenges and eventually a second authenticated invite is sent.</div><div>upstream sends back a 500</div><div>In failure_route MANAGE_FAILURE we call route block TRYASTERISK which pushes the call to <a href="http://127.0.0.1:5070">127.0.0.1:5070</a></div>
<div>This is in the logic below.</div><div><br></div><div>What I find is that if the call to Asterisk also fails I come back again into TRYASTERISK and $rd for this branch still points to the original upstream destination (<a href="http://vc2.connection-telecom.com">vc2.connection-telecom.com</a>).</div>
<div><br></div><div>It seems to be harmless and another invite isn't actually sent to Asterisk. Don't really get that so I apologise if I'm being stupid.</div><div><br></div><div>I've attached my kamailio.cfg and also the trace you requested.</div>
<div><br></div><div>Thanks for any pointers.</div><div><br></div><div>Steve</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 September 2013 12:12, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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<div><div class="h5"><br>
<br>
<div>On 8/24/13 8:05 PM, Steve Davies wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<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>sip:$</a><a href="http://rU@127.0.0.1:5070" target="_blank">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 href="http://127.0.0.1:5070" target="_blank">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></fieldset>
<br>
</div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">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 href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> -
</pre>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div></div>