adhearsion/punchblock — pull request #152 by gcamposdcc (2013-05-30 23:55:54+00:00)
Title: [BUGFIX] Reconnect dead Asterisk streams

Reconnect dead Asterisk ```RubyAMI::Stream```. Currently the stream remains dead upon disconnecting. This causes the client to keep trying to reconnect with a dead actor, failing continuously.
Original issue was filed in Adhearsion https://github.com/adhearsion/adhearsion/issues/317
> Link to gist with full traceback: https://gist.github.com/ggayan/539bda17bace5f5a34d8
>
> we're using adhearsion 2.3.4 and asterisk 1.8.19
>
> I'm using a ssh tunnel to our asterisk machine to reproduce the problem (open it, run adhearsion, kill the tunnel, reopen the tunnel).

But we were able to track it down and ~~shamelessly copy~~ follow an approach found in: https://github.com/adhearsion/punchblock/commit/9bfedd8ab5d325a60e7e831560b4d62e58a1a2d9

We are opening this PR a bit incomplete to show the cause of the bug and a working solution. We can:
- [ ] Add specs
- [ ] Bump version info (as suggested in the readme)

Cheers