I have 2x PBXs that are geographically seperated and connected via IAX trunk via VPN. Both sites have 3x analogue lines that are connected to a capped service. DAHDi g0 controls these 3 lines and DAHDi g1 controls the remainder of the lines for non capped service.
I have my outbound routes using the r0 trunk for those capped lines first, then failover to the IAX trunk to attempt to find a line on the partner PBX’s r0 trunk, then failover back to the original PBX’s r1 trunk.
Problem I’m having is that an outbound call from PBX-A will try r0 and get a busy signal, then it passes the call via IAX trunk to the partner PBX. The partner attempts r0 and gets a busy signal so it then passes the call back to the original PBX. The original PBX will then try to use the same outbound route again which leads to the whole process repeating and effectively looping forever.
I’m looking for a way to catch the call as it is returned and move onto the next trunk which will use the DAHDi r1.
If anyone has any ideas, I’m all ears