powered by Jive Software

Openfire media proxy

hi,

I want test the openfire media proxy by the following java code:

public void testtransmit() {
ConnectionConfiguration coo = new ConnectionConfiguration(
server, 5222);
final XMPPConnection con = new XMPPConnection(coo);
XMPPConnection con1 = new XMPPConnection(coo);
try {
con.connect();
con.login(user0, pass0);
con1.connect();
con1.login(user1, pass1);
if (con.isConnected() && con1.isConnected()) {
BridgedTransportManager btm0 = new BridgedTransportManager(con);
final BridgedResolver br=new BridgedResolver(con);
BridgedResolver br1=new BridgedResolver(con1);
BridgedTransportManager btm1 = new BridgedTransportManager(con1);
final JingleManager jm0 = new JingleManager(con, br);
final JingleManager jm1 = new JingleManager(con1, br1);
jm0.addCreationListener(btm0);
jm1.addCreationListener(btm1);
JingleMediaManager jmm = new JmfMediaManager();

    JingleMediaManager jmm1 = new JmfMediaManager();
    jm0.setMediaManager(jmm);
    jm1.setMediaManager(jmm1);
    jm0.addJingleSessionRequestListener(new JingleSessionRequestListener() {

public void sessionRequested(final JingleSessionRequest request) {

try {

incoming = request.accept(setupPayloads());

          incoming.start(request);
        }
        catch (Exception exe) {
          System.out.println(exe);
        }
      }
    });

outgoing = jm1.createOutgoingJingleSession(
“user0@servername/Smack”,this.setupPayloads());

    outgoing.start();
  }
}
catch (XMPPException ex) {
  System.out.println("Exception "+ex);
}

}

but, it generated this exception:

Service listing
No RTP Bridge service available:
at org.jivesoftware.smackx.jingle.nat.BridgedResolver.initialize(BridgedResolver.j ava:103)
at org.jivesoftware.smackx.jingle.nat.TransportResolver.initializeAndWait(Transpor tResolver.java:384)
at org.jivesoftware.smackx.jingle.nat.JingleTransportManager.getResolver(JingleTra nsportManager.java:62)
at org.jivesoftware.smackx.jingle.OutgoingJingleSession.(OutgoingJingleSessi on.java:116)
at org.jivesoftware.smackx.jingle.OutgoingJingleSession.(OutgoingJingleSessi on.java:143)
at org.jivesoftware.smackx.jingle.JingleManager.createOutgoingJingleSession(Jingle Manager.java:617)
at vopenfire.transmit.testtransmit(transmit.java:76)
at vopenfire.transmit.main(transmit.java:103)
Exception in thread “main” java.lang.NullPointerException
at org.jivesoftware.smackx.jingle.OutgoingJingleSession.(OutgoingJingleSessi on.java:124)
at org.jivesoftware.smackx.jingle.OutgoingJingleSession.(OutgoingJingleSessi on.java:143)
at org.jivesoftware.smackx.jingle.JingleManager.createOutgoingJingleSession(Jingle Manager.java:617)
at vopenfire.transmit.testtransmit(transmit.java:76)
at vopenfire.transmit.main(transmit.java:103)

plz,I need a help