[sip-comm-dev] Play WAV file (once) and then hangup


#1

Hi guys,

How can I get sip-communicator to hangup once it has played the media once rather than continously repeating.

I have tried removing the endofmedia event but can't find a way to then notify the main thread and disconnect the call cleanly.

Any pointers?

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Matt,

AvTransmitter Line 670,
                 //DO NOT Loop media files
                 if (ce instanceof EndOfMediaEvent) {
                     // processor.setMediaTime(new Time(0));
                     // processor.start();
        mediaManCallback.fireTransmissionEnded()
                 }
the fireTransmissionEnded() method should look a bit like firePlayerStopped(). You should add a new method in the media listener (e.g. transmissionEnded(MediaEvent)) and implemet it in SipCommunicator. Look at the handleHangupRequest to get an idea of what should be done. It would be a bit tricky to get the corresponding call id but if u r not planning handling multiple calls simultaneously u could just use SipManager.endAllCalls().

Let me know if u have any other questions.

Cheers
Emil

Matt wrote:

···

Hi guys,

How can I get sip-communicator to hangup once it has played the media once rather than continously repeating.

I have tried removing the endofmedia event but can't find a way to then notify the main thread and disconnect the call cleanly.

Any pointers?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net