Programmatically change trunk state?

5 posts / 0 new
Last post
whiterabbit
whiterabbit's picture
Programmatically change trunk state?

Is it possible to enable/disable trunks via a script? I often enable one set of trunks and disable another and v.v. It's very tedious via the FreePBX GUI. I would like to use a script to enable/disable the set that I need at the time.

whiterabbit
whiterabbit's picture
Any way to enable a trunk

Any way to enable a trunk from the CLI?

simcity
simcity's picture
I don't believe so...but

I don't believe so...but happy to be proven wrong.

What are you trying to achieve exactly? Enabling/disabling trunks sounds like quite a heavy handed approach. You may be able to achieve a similar result using the dial plan and things like time conditions.

whiterabbit
whiterabbit's picture
I'm trying to implement an

I'm trying to implement an HA solution. I want to be able to bring the PBX online (and activate the trunks) from the dialplan *without* leaving the PBX in the precarious state of a reload or reboot causing the trunks to come online. (See http://www.freepbx.org/forum/freepbx/general-help/high-availability-backup-restore-module)

whiterabbit
whiterabbit's picture
It is possible and works well

It is possible and works well, and I think is a better solution than leaving the server in this "HA" / "Apply Configuration" state.