I am trying to use ExtensionState action to retrieve the status of a PSTN trunk via Asterisk AMI:
And the response I got is:
Message: Extension Status
According the AMI documentation, status=4 means “unavailable” but the trunk should be “Idle” as it is available for user to dial and receiving calls.
No matter how I use the pstn trunk, dialing or answering. The Status value is always 1 (In-Use) or 4 (Unavailable).
I expect the status to be “Idle”, “Unavailable”, “In-Use”.
Is there any other AMI action that allow me to retrieve the status of PSTN trunks?