I was wondering if there was anyone who can help me figure this problem out.
On the client side I have a mikrotik CC1009, with SIP ALG turned off. Extensions are configured to use NAT on the freePBX side and the NAT mode is set to (yes, force_rport, comedia) for all extensions. The freePBX server has only one Public IP assigned to it, and I am happy with that setup.
On the client side, we have two ISP’s, both with static public IP’s. I have configured the fail-over redundancy on the mikrotik and everything works perfectly; when the primary ISP goes down the secondary ISP picks up within seconds.
However, when the primary ISP goes down, phones won’t register using the secondary ISP. I’ve seen the sip debug logs on asterisk and the server keeps sending NAT requests to the primary ISP, and doesn’t switch over to the secondary ISP. Here is the example of what I am talking about:
[2019-10-04 11:06:47] VERBOSE chan_sip.c: Retransmitting #1 (NAT) to xx.xx.xxx.xxx:1250:
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP xxx.xxx.xx.xxx:5060;branch=z9hG4bK03f04c57;rport
From: “Unknown” sip:[email protected];tag=as5078d144
To: sip:[email protected]:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Date: Fri, 04 Oct 2019 16:06:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
What I’ve tried so far and no luck:
Used SIP ALG and disabled NAT mode on the extension.
Used TCP/TLS for SIP as opposed to UDP.
Turned on keep alive on the phone side.
I am out of ideas, any help would be much appreciated!