Just for closure on this item, the fix used was:
*** t_reply.c.STOCK Tue Nov 14 18:11:06 2006 --- t_reply.c Tue Oct 21 16:38:25 2008 *************** *** 1315,1320 **** --- 1315,1323 ---- } } else { relayed_code=relayed_msg->REPLY_STATUS; + #ifdef RFCMUST503 + /* This bit of nonsense changes the RFC handling from SHOULD to MUST, + or in our case, from "no problem" to "broken"*/ if (relayed_code==503){ /* replace a final 503 with a 500: * generate a "FAKE" reply and a new to_tag (for easier *************** *** 1331,1337 **** buf=build_res_buf_from_sip_req(500, error_text(relayed_code),
to_tag, t->uas.request, &res_len, &bm); relayed_code=500; ! }else if (tm_aggregate_auth && (relayed_code==401 || relayed_code==407) && (auth_reply_count(t, p_msg)>1)){ /* aggregate 401 & 407 www & proxy authenticate headers in --- 1334,1342 ---- buf=build_res_buf_from_sip_req(500, error_text(relayed_code),
to_tag, t->uas.request, &res_len, &bm); relayed_code=500; ! }else ! #endif /*RFCMUST503*/ ! if (tm_aggregate_auth && (relayed_code==401 || relayed_code==407) && (auth_reply_count(t, p_msg)>1)){ /* aggregate 401 & 407 ww
I won't dwell on any religious issues raised here, because the fact of the matter is I now have a dozen telcos using everything from Sonus to asterisk boxes and all of them want it to work this way, eg for 503 to pass unaltered. Follow the money, and the money wants it to work this way.
Thanks for the assistance of those who pointed me to the right neighborhood to alter.
P. S. The idea of doing this via ser.cfg and t_on_failure by just ignoring those set_final_timer messages, was a bad one. Something leaks memory, so that could not be used for more than a few hours.