Check if lines are busy before Dial


We have Elastix 2.4.0, asterisk 1.8, with FXO cards. We want to check if there is available lines before dial the whole number. In other words, we want to dial any digit ( 9 for example), get a dial tone in case there is an available line then dial the whole number. Otherwise, get a busy tone than hang up.

Thanks and Regards,

Indicates whether the specified channel is available.
Verifies that the one or more of the queried channels is available, in the order specified. Returns 0 on success or -1 on failure.
If the s (state) option is given, Asterisk will treat the channel as unavailable if it is in use, even if it is capable of taking another call. Option j sets priority jumping to n+101 if the channel is unavailable … avail.html


Thanks. My outbound route was “9” (prefix) and “.” (match pattern). I just deleted the “.” and it worked :smile: