I'm trying to configure a CUBE to route calls between 2 VoIP systems.
I have one problem because one of these 2 systems has two posible destinations (due to redundancy). I mean that the call must arrive to two different ip, but it can't be at the same time. The CUBE must send the call first to the IP1 and if the first ip is not available then the CUBE must send the call to this IP2. I just wonder if this is possible, i tried with prerence and dial-peer groups (dpg) but this is not working, I created two dial-peers (one with session target IP1 and the other with IP2) but for example if the machine with IP1 is power off the CUBE doesn't jump to the second peer with the IP2. Any idea?
You can use dial-peers with preference (optionally with a dial-peer group if you do not need the outbound DP matched by pattern) or voice class server group for this. Also, if using DPs with preference ensure the first one does not have huntstop on it!
As for why it’s not proceeding to the second IPv4 address, the default RFC3261 timers require 32 seconds to fully time out. You can reduce the number of INVITE retries under sip-ua and/or use OPTIONS ping (voice-class sip options-keepalive profile) to have an ongoing keep alive/monitoring mechanism. CUBE will automatically busy out the DP if the keep alive fails and return it to active status once they resume. I suggest at least the latter; the former is more important if using UDP transport. Also be aware that OPTIONS ping is unidirectional: if you want it to work for calls from the other system toward CUBE you’ll need to enable it on that system as well.