On Wednesday 09 July 2008 13:34:29 you wrote: > Hi, > > How can I detect (in python) that the file reading has reached the end of > file ? > In c we have callback functions pjmedia_wav_player_set_eof_cb(). > Is there similar function in python or we can do it in another way ? > > Any help is appreciated, > Chris > Hi. I am not a developer of pjsua, bat as i can see there is no such function wrapper in python module. What is the meaning of reaching end of file? If this meaning is in context - that a wav player reached the end of file .. in other words wav player played whole file to conference bridge.. and it is time to disconnect this wav player from conference and destroy a player? Then i think there are 2 possibilities in python: 1) you determine a wav file duration.. and after you connect player port to conference -> you are sleeping for the duration of wav player ( time.sleep() ) 2) you determine a wav file duration.. and after you connect player port to conference -> you are remembering a time when you have to disconnect this player in some internal structure of you app. And when i time comes you disconnects a player. in other words implementing a callback manually by hand.