there is a broken grandstream sip ua that sometimes sends two initial invites back-to-back. according to wireshark, sr received them about 10 microseconds apart. sr then forwards the request to pstn gw, but i don't have wireshark dump of that side of the traffic. anyway, from the ua side i see that about 10 milliseconds after receiving the invites, sr replies to the ua "503 no more gateways available".
in my config that reply comes only from GW_FAILURE failure route, which is set up like this:
t_on_failure("GW_FAILURE"); t_set_fr("120000", "5000"); t_relay()
so no way should failure route get executed before 5 seconds, but in this back-to-back invite case it somehow gets executed almost immediately. i have not seen this behavior in other situation.
this looks like a bug to me. perhaps there is some race condition causing it? version of sr where this appears is 3.0.3.
-- juha