That's better than what I had in mind. :) <div><br></div><div>I don't think that's too bad really.. Conforms with all the rules of what a failure route is for.. so I think that's a good way to do it.</div><div>
<br></div><div>Just my $0.02</div><div><br></div><div>-Brett</div><div><br><br><div class="gmail_quote">On Wed, Nov 26, 2008 at 10:29 AM, Iñaki Baz Castillo <span dir="ltr"><<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">El Miércoles, 26 de Noviembre de 2008, Brett Nemeroff escribió:<br>
<div class="Ih2E3d">> Why not just call a normal route after you send your negative reply?<br>
<br>
</div>Because I've already coded the needed logic in a failure_route that would be<br>
runned when a negative reply comes from the callee. But I want the same<br>
behaviour when I (OpenSIPS) send the negative reply.<br>
<br>
I could do the following (but it's not very cool):<br>
<div class="Ih2E3d"><br>
---------<br>
route[TO_USER] {<br>
<br>
t_on_failure("TO_USER");<br>
<br>
# some_custom_query...<br>
if $rc = ... {<br>
# I decide to reject the call<br>
# First create the transaction ("failure_route" could have<br>
sense)<br>
t_newtran();<br>
</div> route(FAILURE);<br>
<div class="Ih2E3d"> exit;<br>
}<br>
<br>
# do loockup and so...<br>
t_relay();<br>
}<br>
<br>
failure_route[TO_USER] {<br>
<br>
</div> route(FAILURE);<br>
<br>
}<br>
<br>
route[FAILURE] {<br>
<div class="Ih2E3d"><br>
if $fU == "alice" {<br>
$ru = "sip:voicemail@server";<br>
append_branch();<br>
}<br>
<br>
}<br>
---------<br>
<br>
</div>--<br>
<div><div></div><div class="Wj3C7c">Iñaki Baz Castillo<br>
<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>
</div></div></blockquote></div><br></div>