Wait until the call has returned to IDLE.
This function will block until the call state has returned to IDLE, or the timeout has expired.
This function will not raise a Hangup exception.
This function will return the call state. If the returned value is not IDLE, the timeout has occurred.
Setting seconds_timeout to None will allow an infinite wait.
Usage example:
# reject the call with BUSY and then wait for IDLE
if channel.reject(cause=channel.Cause.BUSY) != channel.State.IDLE:
# wait for channel to go to idle
channel.wait_for_idle()