[sr-dev] [tracker] Comment added: Received replies should get higher preference than locally generated ones

sip-router admin at sip-router.org
Sat Mar 27 11:33:11 CET 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#54 - Received replies should get higher preference than locally generated ones
User who did this - Andrei Pelinescu-Onciul (andrei)

----------
Iñaki,

First a clarification: there are only 3 local replies that might be selected by sr over some reply received from downstream: 408 (timeout), 503 (a request retransmission failed) and 487 (can win only for and E2E CANCEL and only if cancel_b_method is set to a non-default value). The send
 error replies are never preferred (e.g. a 477 will be used as a reply only if send on _all_ the branches failed, which means that there is no other reply).
The priority for the replies is: 6xx (note that by default they are special case, but even if the rfc 6xx cancel everything behaviour is disabled,
 they are still preferred), 3xx, 4xx, 5xx. From the 4xx replies the order is 401, 407, 415, 420, 484 and then the other 4xx (in ascending order).

Now regarding the 408 & 480 example: yes, 408 will be selected. While it's debatable which is more useful (between one not responding and one temporarily unavailable with a possible Retry-After), I don't think that this is related to the local reply priority problem, but to which reply should win between a 408 and 480 in general (we already prioritize 401, 407, 415, 420 an 484 over any other 4xx, we could extend it to 480 or
 make the priority of 4xx configurable).

Regarding the 503 & 408: this is at best an workaround for a very particular case. Even so, how would the 500 that you will get from ser, help you upstream more then a 408? How could you tell that it's a result of a gw 503 and not an internal ser error?
If you need specific workarounds, why don't you do them in the failure route (don't you have to use it anyway to override the 500 you will get normally for a winning 503?) ?
E.g.: (override local timeout if 503 received on some branch)
 if (t_branch_timeout()) {
   # we are in the failure route due to a timeout
   if (t_grep_status(503)) {
      # but we received a 503 on some branch
      t_reply(599, "a gw returned 503");
   }
 }

----------

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=54#comment61

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list