Im using Python pjsip library but i have some issue disconnecting the WAV playing before answer the call this is the code
if self.call.info().state == pj.CallState.EARLY:
call_slot = self.call.info().conf_slot
self.wav_player_id = pj.Lib.instance().create_player('ring.wav', loop=True)
self.wav_slot = pj.Lib.instance().player_get_slot(self.wav_player_id)
pj.Lib.instance().conf_connect(self.wav_slot, 0)
if self.call.info().state == pj.CallState.CONFIRMED:
print "connecting"
pj.Lib.instance().conf_disconnect(self.wav_slot, 0)
pj.Lib.instance().player_destroy(self.wav_player_id)
any ideas whats going on?
When you disconnect the slot, shouldn't you wait for a disconnected callback before destroying the player ?