I had a similar set of problems with my 2011 Dodge RAM AND 2005 Safari (~10,000 Mi.) and just got them resolved. Here is what happened.
At the start of my current trip, I had no brake as if the cable was not connected, I drove carefully to my local Airstream dealer who noticed some corrosion on the 7 pin connector. He sprayed contact cleaner on it and all was well for the next
1500 miles of the trip.
Then the truck strarted to chime and I got the "trailer brakes disconnected. check trailer wiring message". It would come on for a few seconds then go off. When it came on, I had no trailer brakes, when it went off, I had brakes again. This continued for the next day of travel with the truck chiming and the message coming on the dash display and the brake controller.
When I got to the next destination where there was an Airstream dealer (Windish RV in Longmont,CO) I took it in for a check. The technician checked the tow vehicle with a test box and it checked OK. Then he tried applying the trailer brakes by plugging a 7 pin connector into the trailer 7 pin cord, and shorting the 12 v line to the trailer brake line. The trailer brakes came on as expected. He then suggested I take the truck to the local Dodge dealer for diagnosis.
I drove to the Dodge dealer and he looked at the error code on the brake controller which read "SC". He explained that meant the controller was detecting a short circuit. He explained that when the integrate trailer brake controller detects a short circuit it will not allow voltage to be applied to the trailer brakes and disconnects itself displaying the messages I saw. He said the problem had to be in the trailer. He measured the resistance in the trailer brake line and found it to be very low, an ohm or less, with no brakes applied.
I left the Dodge Dealer and took the trailer over to Camping World/KC RV repair in Longmont, CO where they had a more sophisticated brake tester. The technician there detected a short circuit in the left rear brake magnet by disconnecting the brake wires on each wheel one by one while the brake line was energized and measuring the current into the trailer brake line at the 7 pin connector.
Upon disassembly of the left rear brake, it was discovered that one of the turns of wire on the electromagnet coil was exposed and when the magnet came into contact with the brake drum there was a short.
The magnet should not contact the brake drum unless energized but a small clip designed to prevent this was missing from the left rear brake assembly. The electromagnet is an Iron core with an embedded coil. The iron core has residual magnetism in it and is attracted to the steel brake drum. It was staying in contact even when not energized, eventually wearing through the magnet wire. Hence the controller sensed the short circuit even when the brakes were not applied.
The technician replaced all four brake magnets and the problem was solved, no more messages and plenty of trailer brakes. The service manager remarked that they had seen this problem before so they were able to recognize it.
I hope this helps you resolve your brake issue. The Error code on the trailer brake controller should also help in the diagnosis "OC" is open Circuit, "SC" is short circuit.
Jim