Package org.cipango.diameter

Examples of org.cipango.diameter.ApplicationId


    request.setEndToEndId(3);
    request.setCommand(Cx.LIR);
    request.setAVPList(new AVPList());
    request.getAVPs().add(Cx.CX_APPLICATION_ID.getAVP());
    // System.out.println(request);
    ApplicationId appId = ApplicationId.ofAVP(request);
    // System.out.println(appId);
    assertTrue(appId.isVendorSpecific());
    assertTrue(appId.isAuth());
    assertEquals(Cx.CX_APPLICATION_ID, appId);
    assertEquals(Cx.CX_APPLICATION_ID.getId(), request.getApplicationId());
  }
View Full Code Here


    request.setEndToEndId(3);
    request.setCommand(Accounting.ACR);
    request.setAVPList(new AVPList());
    request.getAVPs().add(Accounting.ACCOUNTING_ID.getAVP());
    // System.out.println(request);
    ApplicationId appId = ApplicationId.ofAVP(request);
    // System.out.println(appId);
    assertFalse(appId.isVendorSpecific());
    assertTrue(appId.isAcct());
    assertEquals(Accounting.ACCOUNTING_ID, appId);
    assertEquals(Accounting.ACCOUNTING_ID.getId(), request.getApplicationId());
 
View Full Code Here

   
    System.out.println(SocketFactory.getDefault());
   
    Log.getLog().setDebugEnabled(true);
   
    ApplicationId sh = Sh.SH_APPLICATION_ID;
   
    Node node = new Node();
    node.setIdentity("avalon.nexcom.bzh");
    node.setHandler(new ShClient());
   
    DiameterSocketConnector connector = new DiameterSocketConnector();
    connector.setHost(InetAddress.getLocalHost().getHostAddress());
    connector.setPort(3868);
    connector.setMessageListener(new BasicMessageLog());
   
    node.addConnector(connector);
   
    Peer peer = new Peer("192.168.2.10");
    peer.setAddress(InetAddress.getByName("192.168.2.10"));
    peer.setPort(3869);
   
    node.addPeer(peer);
   
    node.start();
   
    String destinationRealm = "open-ims.net";
    String destinationHost = "192.168.2.10";
   
    while (!peer.isOpen())
      Thread.sleep(100);
   
    DiameterRequest request = new DiameterRequest(node, Sh.UDR, sh.getId(), "123456789");
   
    request.getAVPs().add(Common.DESTINATION_REALM, destinationRealm);
    if (destinationHost != null)
      request.getAVPs().add(Common.DESTINATION_HOST, destinationHost);
   
    request.getAVPs().add(sh.getAVP());
    request.getAVPs().add(Common.AUTH_SESSION_STATE, AuthSessionState.NO_STATE_MAINTAINED);
   
    AVP<AVPList> userIdentity = new AVP<AVPList>(Sh.USER_IDENTITY, new AVPList());
    userIdentity.getValue().add(Cx.PUBLIC_IDENTITY, "sip:thomas@cipango.org");
    request.getAVPs().add(userIdentity);
View Full Code Here

TOP

Related Classes of org.cipango.diameter.ApplicationId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.