
package itx.apps.Conf;

import java.io.*;
import cnrg.itx.datax.*;
import cnrg.itx.datax.devices.*;
import cnrg.itx.signal.*;
import cnrg.itx.signal.SignalEvent.*;

/**
 * Test participant: dumps data to conference. Used for srtess testing
 */

public class Participant extends AbstractSignalingObserver { 
	
	public static void main(String[] args) { 
		try {
		DesktopSignaling ds = new DesktopSignaling(new Participant(),"guest","guest");
		
		Channel out = new Channel();
		StreamSource ss = new StreamSource(new FileInputStream(args[1]),out);
		NetworkDestination nd = new NetworkDestination();
		out.setSource(ss);
		out.addDestination(nd);
		SignalConnection sc = ds.Dial("conf0",null, out);
		
		System.in.read();
		
		sc.close();
		ds.logout();
		} catch (Exception e) {
			System.out.println(e);
		}
	}
	
	public void Participant(){
	}
	
	public void onStartCall(SignalConnection sc) {
		try {
		sc.open();
		}catch (Exception e) {
							}
	}
	
}
