MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Properly implement sip.stop() to fully stop the underlying pjsip/pjmedia engines #117

Open MayamaTakeshi opened 1 month ago

MayamaTakeshi commented 1 month ago

Currently, we need to have this at the end of our tests:

sip.stop()
process.exit(0)

The call to process.exit(0) is necessary because there are threads still alive (created by pjsip/pjmedia) and so the script doesn't exit by itself.

So, we should stop all threads, close transports, stop streams etc. (see function pjsua_destroy).