<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>I finally got the failure routes working. For some reason, calling
a route block from a failure_route block caused rewritehostport to
fail. I got rid of that technique and now just cascade from
failure_route[1] to failure_route[2], etc. Works dandy.<br>
<br>
However, now that I have calls routing properly, the acc table has the
wrong o_uri data. Instead of the successul uri from the failure_route,
the o_uri value in the acc table is being populated with the original
to_uri value.<br>
<br>
Is there a fix for this? I'm on 0.9.6.<br>
<br>
Thanks again for all the help.<br>
<br>
Matt<br>
<br>
Matthew McGuire wrote:</tt>
<blockquote cite="mid:48C6E967.4090908@yahoo.com" type="cite">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <tt><font size="+1">Thanks for the
pointers.<br>
  <br>
When I remove append_branch from the route blocks, for some reason,
rewritehostport fails in subsequent routes. No errors show up in the
log, but the call will proceed through each block, traceable by the log
statements, but the host ip address on the new invites is the same as
the first invite.<br>
  <br>
ps. I am still on 0.9.6<br>
  <br>
matt<br>
  </font><br>
Victor Pascual Ávila wrote:
  </tt>
  <blockquote
 cite="mid:618e24240809091327v3396cd27jae3cdb79aaa7c987@mail.gmail.com"
 type="cite">
    <pre wrap=""><tt>On Tue, Sep 9, 2008 at 8:40 PM, Matthew McGuire
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:matthewmcguire@yahoo.com">&lt;matthewmcguire@yahoo.com&gt;</a> wrote:
  </tt></pre>
    <blockquote type="cite">
      <pre wrap=""><tt>I'm having a problem with the route sections below. When SER receives an
Invite to proxy to a PSTN gateway, SER is sending 2 invites very fast to the
gateway in the first route block which ends up creating a mess with the
gateway.

Either I have something wrong in  the routing code or I have an
SER/OS/hardware timing problem.

Any suggestions ?


route[1] {
    xlog("L_INFO", "Sending to route 1\n%mb\n");
    rewritehostport ("1.1.1.1:5060");
    append_branch();
    t_on_failure("1");
    t_relay();
}

failure_route[1] {
    if(t_check_status("487")) {
          break;
    }
    xlog( "L_INFO", "failure on route 1\n%mb\n");
    append_branch();
    route(2);
    break;
}

route[2] {
    xlog("L_INFO", "Sending to route 2\n%mb\n");
    rewritehostport ("2.2.2.2:5060");
    append_branch();
    t_on_failure("2");
    t_relay();
}

failure_route[2] {
    if(t_check_status("487")) {
          break;
    }
    xlog( "L_INFO", "failure on route 2\n%mb\n");
    append_branch();
    route(3);
    break;
}

route[3] {
    xlog("L_INFO", "Sending to rout 3\n%mb\n");
    rewritehostport ("3.3.3.3:5060");
    t_relay();
}

    </tt></pre>
    </blockquote>
    <pre wrap=""><!----><tt>

Please, delete append_branch() in route[1] and route[2].

By the way, in [a] you can find a complete configuration example--
terminating calls to a PSTN gateway is included (including PAI, RPID,
a.s.o.)


[a] <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/etc/ser-oob.cfg">http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/etc/ser-oob.cfg</a>

Hope this helps,
  </tt></pre>
  </blockquote>
  <pre wrap=""><tt>
</tt><hr size="4" width="90%"><tt>
_______________________________________________
Serusers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Serusers@lists.iptel.org">Serusers@lists.iptel.org</a>
<a class="moz-txt-link-freetext" href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a>
</tt></pre>
</blockquote>
</body>
</html>