I have been running a php script via cron for many years (PIAF forum) to alert me when a trunk is not registered.
One of the trunks (from Voipfone in UK) occasionally fails and the only way to get it back is to disable the trunk for 2+ minutes and then enable it again.
I want to modify the script to disable the trunk, sleep for 130 seconds and then enable it again.
I would like to avoid hard-coding the exact IDs as these may change.
As far as I know I need to use “fwconsole trunks --disable x” to temporarily disable the trunk but for that I need to know the value of x for the trunk that has failed.
asterisk -rx “sip show registry” shows the Host which includes the name Voipfone but then I need a way to determine the trunk ID.
In short, I need to determine which Trunk ID has failed to register.
Any guidance most welcome.