Hi all

I'm looking for dialplan command to check if selected gateway is up or down

I'd like to make some kind of condition:

if gateway x status is up than do something

Any hints?