<!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">
<font size="+1"><font face="FaceplateSansAGaugeLE">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></font><br>
Victor Pascual Ávila wrote:
<blockquote
 cite="mid:618e24240809091327v3396cd27jae3cdb79aaa7c987@mail.gmail.com"
 type="cite">
  <pre wrap="">On Tue, Sep 9, 2008 at 8:40 PM, Matthew McGuire
<a class="moz-txt-link-rfc2396E" href="mailto:matthewmcguire@yahoo.com">&lt;matthewmcguire@yahoo.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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();
}

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

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 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,
  </pre>
</blockquote>
</body>
</html>