friends-of-freeswitch / switchio

asyncio powered FreeSWITCH cluster control
http://switchio.rtfd.io
Mozilla Public License 2.0
191 stars 28 forks source link

Sessions and Calls should be destroyed in CHANNEL_DESTROY? #23

Closed goodboy closed 6 years ago

goodboy commented 6 years ago

Issue by tgoodlet Wednesday Mar 23, 2016 at 01:31 GMT Originally opened as https://github.com/sangoma/switchy/issues/35


Not sure why (other then perf?) we aren't just destroying all Session and Call models in a _CHANNELDESTROY event handler? It seems to always come after _CHANNELHANGUP. This should also simplify the logic int he CDR app here such that we won't need to make temp bindings to sessions on the call instance.

goodboy commented 6 years ago

Comment by tgoodlet Wednesday Mar 23, 2016 at 02:21 GMT


Just plugged in a callback and ran the unit tests. Seems to be fine? It'd be interesting to see the effects once we have proper benchmarking tests in place.

goodboy commented 6 years ago

CDR should instead use CHANNEL_HANGUP_COMPLETE as there is a complete stats dump in that event type.