pjsip-python binding fails to disconnect playing the wav file using lib..conf_disconnect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am using PSJSIP-Python binding, and trying  to play a wav file as a ring
tone whenever i make  a call;
and i check the call states for playing the file and disconnecting the file,
the following is the code snippet:


#Playback the wav file when call state is EARLY
if self.call.info().state == pj.CallState.EARLY:

self.wav_player_id=pj.Lib.instance().create_player('sweet.wav',loop=False)


self.wav_slot=pj.Lib.instance().player_get_slot(self.wav_player_id)
                pj.Lib.instance().conf_connect(self.wav_slot, 0)

#Stop playing the file when the call is picked up/(CONFIRMED state)
if self.call.info().state == pj.CallState.CONFIRMED:
                pj.Lib.instance().conf_disconnect(self.wav_slot, 0)
                pj.Lib.instance().player_destroy(self.wav_player_id)

Now in my case the wav file plays when a call is made , but it fails to
disconnect , and continues to ring even after the
call is picked up; I have checked the wav_slot and wav_player_id values are
correct in both the states.

Could any one point out what could be wrong with the above logic?

Thanking you'll in advance.

Regards
sv.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081110/65d41d90/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux