Asterisk and DNS SRV records/failover

Hi,

I’m trying to set up an Asterisk with a sip trunk which is using the DNS SRV records to provide high availability and load balancing.
This works fine until Asterisk re-register to another proxy, but it doesn’t update the peer ip address.
When an incoming call arrives from new IP, Asterisk doesn’t recognize which trunk is associated to this call, and send back a 407 fake auth to sip proxy.

Moreover, when I simulate proxy malfunction (i.e ip blocking with iptables), Asterisk doesn’t register to another proxy.

We have schematic of ideal DNS SRV operation, but we can’t obtain proper application of this diagram.

Is there any way to get this working ?

Regards,

Sebastien.