Bandwidth SIP trunk failover

https://support.bandwidth.com/hc/en-us/articles/29816399870359-PBX-integration-guide

  • Primary: 67.231.3.4
  • Failover: 67.231.4.70

Something with scarlet:/etc/asterisk/sip.conf::bandwidth#host. It’s currently set to the failover IP because of their outage.

–

Solution steps:

  • swap bandwidth peer back to primary IP
  • configure “qualify” on bandwidth peer
  • configure separate, unqualified failover peer
  • check SIPPEER(bandwidth,status) and dial failover peer if it’s UNREACHABLE
    (up to here, this can be derived here)
  • configure a CHANNEL(hangup_handler_push) that checks the specific SIP status code and dials the failover if it’s an error: https://stackoverflow.com/questions/39207289/asterisk-hangup-handler-using-lua

TODO:

  • in a docker compose application, configure two instances of our asterisk fork that behave like our production asterisk and bandwidth respectively. the bandwidth asterisk is configured to reply with specific error codes to test the failover
  • point local, development cheogram + rest of stack to this asterisk setup and call using my normal number