JR,<br><br>Maybe for subsequent routes you&#39;d like to use $oU (original URI Username) that is the original number you intend to route.<br><br>Rgds,<br>Uriel<br><br><div class="gmail_quote">On Thu, May 27, 2010 at 1:23 PM, JR Richardson <span dir="ltr">&lt;<a href="mailto:jmr.richardson@gmail.com">jmr.richardson@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On Thu, May 27, 2010 at 10:09 AM, Henning Westerholt<br>
<div class="im">&lt;<a href="mailto:henning.westerholt@1und1.de">henning.westerholt@1und1.de</a>&gt; wrote:<br>
</div><div><div></div><div class="h5">&gt; On Thursday 27 May 2010, JR Richardson wrote:<br>
&gt;&gt; &gt; i assume according your description that the GW in question don&#39;t send a<br>
&gt;&gt; &gt; provisional response. Then the tm module should generate a internal 408<br>
&gt;&gt; &gt; after fr_timer interval which you could then catch in a failure_route. Do<br>
&gt;&gt; &gt; you armed the appropriate failure_route in your cfg?<br>
&gt;&gt;<br>
&gt;&gt; Yes, the gateway is totally off-line so no response comes back.  I do<br>
&gt;&gt; have failure_route in the config.  This is related to another active<br>
&gt;&gt; post from me &quot;Carrierroute failover domain not working&quot; so I&#39;m sure<br>
&gt;&gt; this is a redundant post, but your input is appreciated.<br>
&gt;&gt;<br>
&gt;&gt; The pastebin has my kamailio.cfg, the kamailio debug trace and the<br>
&gt;&gt; error received by sipp and the ngrep capture.<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://pastebin.com/VQziKYjE" target="_blank">http://pastebin.com/VQziKYjE</a><br>
&gt;<br>
&gt; Hi JR,<br>
&gt;<br>
&gt; from the logs:<br>
&gt;<br>
&gt; INFO:carrierroute:cr_do_route: rewrite_uri_recursor doesn&#39;t complete, uri 65,<br>
&gt; carrier 1, domain 2<br>
&gt;<br>
&gt; this means that there was an error during the invocation of the cr_route in<br>
&gt; the failure_route[2]. Can you check if you&#39;ve a rule with domain 2 in your<br>
&gt; carrierroute table?<br>
&gt;<br>
&gt; And you probably also want to use revert_uri() and append_branch(); in the<br>
&gt; failure_route before respectivly after the new cr_route, otherwise you&#39;ll<br>
&gt; probably run in to problems as well. I just noticed that there is an error in<br>
&gt; the first example in the cr docs, i&#39;ll fix it now. The second example uses<br>
&gt; this two commands.<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Henning<br>
&gt;<br>
</div></div>Ok, so I think we are on to something, in the first transaction the<br>
uri was 3465@ which matched the database entry 34 in carrier 1 domain<br>
1, but I also had strip_prefix-2 in there as well, so when the call<br>
goes to the failure route the uri changes to 65@, which did not have a<br>
match in carrier 1 domain 2.<br>
<br>
So to test, I took the prefix matching and the strip_prefix out and<br>
simplified the database entry to this:<br>
<br>
carrierroute table:<br>
carrier 1, domain 1, host A<br>
carrier 1, domain 1, host B<br>
carrier 1, domain 2, host C<br>
carrier 1, domain 2, host D<br>
<br>
carrierfailureroute table:<br>
carrier 1, domain 1, host A, next domain 2<br>
carrier 1, domain 1, host B, next domain 2<br>
carrier 1, domain 2, host C, next domain 1<br>
carrier 1, domain 2, host D, next domain 1<br>
<br>
So now I see a call come in to kamailio and if host A &amp; B are<br>
off-line, I see in the debug the failure_route try to send the call to<br>
host C &amp; D, but I still have an error because I don&#39;t have a proper<br>
branch route setup, and this is confusing, I don&#39;t understand what<br>
that means?  Here is the error:<br>
<br>
The uri is 3477@, call come in and hits the route[2], then goes to<br>
failure_route.<br>
<br>
May 27 11:04:04 [25716] INFO:carrierroute:cr_do_route: uri 3477 was<br>
rewritten to <a href="mailto:sip%3A3477@10.10.14.104">sip:3477@10.10.14.104</a>, carrier 1, domain 2<br>
May 27 11:04:04 [25716] ERROR:tm:t_forward_nonack: no branch for forwarding<br>
May 27 11:04:04 [25716] ERROR:tm:w_t_relay: t_forward_nonack failed<br>
May 27 11:04:04 [25716] ERROR:tm:t_forward_nonack: no branch for forwarding<br>
May 27 11:04:04 [25716] ERROR:tm:w_t_relay: t_forward_nonack failed<br>
<br>
Here is the config snip:<br>
<br>
route[2] {<br>
        if(!cr_route(&quot;1&quot;, &quot;1&quot;, &quot;$rU&quot;, &quot;$rU&quot;, &quot;call_id&quot;)){<br>
                sl_send_reply(&quot;403&quot;, &quot;Not allowed&quot;);<br>
        } else {<br>
                t_on_failure(&quot;2&quot;);<br>
                        t_relay();<br>
        }<br>
}<br>
<br>
failure_route[2] {<br>
        revert_uri();<br>
        if (t_check_status(&quot;404|408|5[0-9][0-9]&quot;)) {<br>
                if(!cr_route(&quot;1&quot;, &quot;2&quot;, &quot;$rU&quot;, &quot;$rU&quot;, &quot;call_id&quot;)){<br>
                        t_reply(&quot;403&quot;, &quot;Not allowed&quot;);<br>
                } else {<br>
                        t_relay();<br>
                }<br>
       }<br>
}<br>
<br>
So I guess I&#39;m stuck on the error &quot;ERROR:tm:t_forward_nonack: no<br>
branch for forwarding&quot;.  I&#39;m not sure how to setup a branch route from<br>
the failure route.<br>
<div class="im"><br>
Thanks<br>
<br>
JR<br>
--<br>
JR Richardson<br>
Engineering for the Masses<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">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>
</div></div></blockquote></div><br>