2012/4/16 Daniel-Constantin Mierla miconda@gmail.com:
Also take into account that RFC 5626 also mentions the ;reg-id Contact *header* param. A SIP client could send two REGISTER indicating same ;+sip.instance value and different ;reg-id values (1 and 2). When the registrar receives a request for the registered AoR it retrieves a single binding for all those existing bindings sharing ;+sip.instance, probably the binding with reg-id=1. If the connection is closed, then the registrar removes that binding and performs failover by using the binding with ;reg-id=2.
So, even for same +sip.instance value can be several contact records, but with different reg-id?
Right. That's for registration failover:
Outbund-Proxy-1 UA Registrar Outbund-Proxy-2
or:
Registrar-1 UA Registrar-2
(both Registrar-1 and Registrar-2 sharing same DB).
The UA mantains two registrations alive, same +sip.instance (since it's the SAME device) but different reg-id values.
NOTE that for this to work, the UA must be provided with two registration URI's or two Outbound proxies (or more).
If there is an outbound proxy between the SIP client and the registrar, and the outbound proxy implements Outbound, and if the request from the registrar receives a "430 Flow Failed" from the Outbound proxy, the registrar should also remove such a binding (;reg-id=1) and try another one if present.
Is reg-id special for stream connections (tcp/tls)? Or if there is a timeout on UDP, same behavior should apply, ie, remove the contact address?
Right, or also an ICMP error (if implemented). Outbound RFC 5626 is NOT just for stream connections, it is also for UDP.