Fix gen_media unit test
PT-46525051: Set agent to released when unable to ring

* When state change from idle to prering fails, agent state is set
  to released.