<div dir="ltr">Hi Bogdan,<div><br></div><div>Thanks for your answer, the automatic failover is clear, but I'd like to achieve something extra, namely:</div><div><br></div><div>* I set the RURI domain-part to <a href="http://foo.bar.com">foo.bar.com</a></div>
<div>* After t_relay() OpenSIPS resolves (NAPTR) it to _sip._<a href="http://udp.bar.com">udp.bar.com</a> and after that (SRV) to <a href="http://gw1.bar.com">gw1.bar.com</a> (prio 1) and after that (A) to 1.1.1.1</div><div>
* Now when this 1.1.1.1 is found I'd like to look it up in a database and for example see that all hosts within <a href="http://1.0.0.0/8">1.0.0.0/8</a> should have a preloaded route-set X, and add the appropriate route header(s)</div>
<div>* Let's say this 1.1.1.1 is down, then OpenSIPS will do a second lookup (or is lookup done only once and are all possible records saved in some AVP?), but anyway, let say it does a second lookup, which resolves to 2.2.2.2 (prio 2), then I'd like to lookup that IP in my db and maybe preload some other routes.</div>
<div><br></div><div>Is this possible ?</div><div><br></div><div>Thanks & best regards,</div><div><br></div><div>Leon de Rooij </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 7:35 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</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">
<div><tt>Hello,<br>
<br>
OpenSIPS automatically does DNS-based failover (using the NATPR,
SRV and A records for the domain) - there is not need to do it
manually from script. Using the same principal (serial forking),
transparent for you, OpenSIPS TM module will do it for you.<br>
<br>
See the "disable_dns_failover" param -
<a href="http://www.opensips.org/Documentation/Script-CoreParameters-1-10#toc39" target="_blank">http://www.opensips.org/Documentation/Script-CoreParameters-1-10#toc39</a><br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
On 14.02.2014 17:37, Leon de Rooij wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I'd like to route a call to a domain, perform NAPTR,SRV,A
lookups and in each serial failure_route, use the resolved
destination IP to set a custom pre-loaded route.</div>
<div>
<br>
</div>
<div>I've been trying to fix it like this:</div>
<div><br>
</div>
<div>* put fqdn in ruri</div>
<div>
<div>* t_on_failure("1")</div>
</div>
<div>* t_on_branch("1")</div>
<div>* t_relay()</div>
<div><br>
</div>
<div>Should I then be able to get the resolved destination IP
address in the branch_route[1] ? How should I then get the
second, third, etc ip adress ? I tried to put another
t_on_branch("1") in the failure_route but that results in an</div>
<div><br>
</div>
<div>ERROR:tm:t_forward_nonack: failure to add branches</div>
<div><br>
</div>
<div>Anybody know how this should work ?</div>
<div><br>
</div>
<div>Thanks & best regards,</div>
<div><br>
</div>
<div>Leon de Rooij</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>