I have a trunk from a telephony provider, I received 2 IP addresses from him to connect.
My system is built to receive calls, contact the AGI interface, perform authentication, and dial external phones (outside the switchboard).
These are my configuration files:
; sip_trunk
[call]
type=friend
insecure=port,invite
host=<ip-A>
fromdomain=<ip-A>
context=from-trunks
;extensions.conf
[from-trunks]
exten = _X.,1,AGI(agi://domain:port)
;agi pseudo code
await context?.exec('Dial', `SIP/call/${phone}`);
I have now received a message from my telephone provider that due to maintenance work, at certain hours IP A will not be available, and at other times IP B will not be available.
How can you connect to the two IP addresses, and each time the available address will receive the calls, and dial from the correct trunk?
Thanks in advance