nadirhamid / asterisk-audiofork

Stream Asterisk audio over Websockets
GNU General Public License v2.0
159 stars 62 forks source link

Reconnection fix crashes asterisk #25

Closed vemarun closed 1 year ago

vemarun commented 1 year ago

Starting a new Audiofork after previous has stopped will crash asterisk process. Last message logged is -

End AudioFork Recording to...

How to reproduce

same => n(af),AudioFork(ws://localhost:8081/${UNIQUEID}/,D(in))
same => n(noaf),Stasis(app)
same => n,StopAudioFork()
same => n(af),AudioFork(ws://localhost:8081/${UNIQUEID}/,D(in))    //<-  Crashes here
same => n(noaf),Stasis(app2)
same => n,StopAudioFork()

The problem occurs in latest commit (https://github.com/nadirhamid/asterisk-audiofork/commit/74d5eebee79467e5a4e696fe4666484326f01128) and also in https://github.com/nadirhamid/asterisk-audiofork/commit/ec72754137564bc910ebaa1cee519622d15afb8b.

When rolling back to https://github.com/nadirhamid/asterisk-audiofork/commit/3a7099b4b81560b713a768405d780307b1edd0ac , it works correctly

Thank you for your support. Credits : @Slesinger

nadirhamid commented 1 year ago

Hello @vemarun,

Thanks for creating this issue. I will look closer into this one and try to fix it as soon as possible.

In the meantime, please use the previous build.

Thanks

nadirhamid commented 1 year ago

Hello @vemarun,

I have pushed some changes. Can you test with commit ec71ebe and let me know if it fixes the problem ?

Looking forward to your response.

vemarun commented 1 year ago

Hello @vemarun,

I have pushed some changes. Can you test with commit ec71ebe and let me know if it fixes the problem ?

Looking forward to your response.

Hi @nadirhamid i tested it few times, it does not crashes now. Thanks for fixes :)