You might need to put the conf_connect calls in the onMediaState() callback. See if that works. Gianni Da: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] Per conto di Kaushik Turlapaty This is the logic of the goal I am trying to achieve. It should call, when confirmed, should play an audio wav file and hangup after that I am able to call, but when the call is lift, I cannot hear the audio. if self.call.info().state == pjsua.CallState.DISCONNECTED: current_call = None print 'Current call is', current_call in_call = False elif self.call.info().state == pjsua.CallState.CONFIRMED: #Call is Answred print "Call Answred" wfile = wave.open("message.wav") time = (1.0 * wfile.getnframes ()) / wfile.getframerate () print str(time) + "ms" wfile.close() call_slot = self.call.info().conf_slot self.wav_player_id=pjsua.Lib.instance().create_player('message.wav',loop=False) self.wav_slot=pjsua.Lib.instance().player_get_slot(self.wav_player_id) pjsua.Lib.instance().conf_connect(self.wav_slot, call_slot) sleep(time) pjsua.Lib.instance().player_destroy(self.wav_player_id) self.call.hangup() in_call = False This is some part of the log when I run the program
|
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org