On Wednesday 15 June 2011, Iñaki Baz Castillo wrote:
2011/6/9 Iñaki Baz Castillo ibc@aliax.net:
2011/6/9 Alex Hermann alex@speakup.nl: 2) About your quoted text, indeed RFC 2915 says that. But that just means that, an application (in this case a SIP client) must take *first* the valid NAPTR record with better "order" (lowest value). But RFC 2915 is just about NAPTR, it can not mandate that applications or protocols cannot try other NAPTR records as failover mechanism. Any SIP client or proxy implementing NAPTR records does failover to the next NAPTR record in case the first one failed (at least those I've tested).
It seems that sip-router behaves exactly as you describe. This it, it performs the NAPTR resolution, chooses the record with best 'order' (for the supported transports) and just uses it (it would do SRV failover and so, but would never try other NAPTR records with less 'order').
However I've seen other SIP stacks also performing failover by taking next NAPTR records. But indeed, RFC 2915 does not mandate it, instead it says MUST NOT. So you are right.
I forgot about a discussion i had about this issue a few years ago with a customer and just remembered the outcome now. (Optional) failover can be provided by different 'Preference' field within the same 'Order'. From rfc 2915/3403 section 2:
The important difference between Order and Preference is that once a match is found the client MUST NOT consider records with a different Order but they MAY process records with the same Order but different Preferences. I.e., Preference is used to give weight to rules that are considered the same from an authority standpoint but not from a simple load balancing standpoint.
Unfortunately this wasn't possible with Kamailio <=1.5. Have you tried 3.x with equal 'Order' but different 'Preference' or just with different 'Order'?