Package org.cipango.diameter

Examples of org.cipango.diameter.AVPList


    _applicationId = appId;
    _command = command;
    _hopByHopId = hopByHopId;
    _endToEndId = endToEndId;
 
    _avps = new AVPList();
   
    if (sessionId != null)
      _avps.add(Common.SESSION_ID, sessionId);
    _avps.add(Common.ORIGIN_HOST, node.getIdentity());
    _avps.add(Common.ORIGIN_REALM, node.getRealm());
View Full Code Here


    DiameterRequest request = new DiameterRequest();
    request.setApplicationId(Cx.CX_APPLICATION_ID.getId());
    request.setHopByHopId(1);
    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());
View Full Code Here

    DiameterRequest request = new DiameterRequest();
    request.setApplicationId(Accounting.ACCOUNTING_ID.getId());
    request.setHopByHopId(1);
    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());
View Full Code Here

            {
              code = avp.getValue();
            }
            else
            {
              AVPList expRc = message.get(Common.EXPERIMENTAL_RESULT);
              code = expRc.getValue(Common.EXPERIMENTAL_RESULT_CODE);
              vendorId = expRc.getValue(Common.VENDOR_ID);
            }
           
            ResultCode rc = Dictionary.getInstance().getResultCode(vendorId, code);
            if (rc == null)
              rc = Factory.newResultCode(vendorId, code, "Unknown");
View Full Code Here

       
    DiameterRequest udr = new DiameterRequest(_client, Sh.UDR, Sh.SH_APPLICATION_ID.getId(), _client.getSessionManager().newSessionId());
    udr.getAVPs().add(Common.DESTINATION_REALM, "server");
    udr.getAVPs().add(Common.DESTINATION_HOST, "server");
    udr.getAVPs().add(Sh.DATA_REFERENCE, DataReference.SCSCFName);
    AVP<AVPList> userIdentity = new AVP<AVPList>(Sh.USER_IDENTITY, new AVPList());
        userIdentity.getValue().add(Cx.PUBLIC_IDENTITY, "sip:alice@cipango.org");
    udr.getAVPs().add(userIdentity);
    udr.getAVPs().add(Common.AUTH_SESSION_STATE, AuthSessionState.NO_STATE_MAINTAINED);
    udr.getSession();
    udr.send();
View Full Code Here

    DiameterFactory clientFactory = createFactory(_client);
    DiameterServletRequest udr = clientFactory.createRequest(null, Sh.SH_APPLICATION_ID, Sh.UDR, "server");
   
    udr.add(Common.DESTINATION_HOST, "server");
    udr.getAVPs().add(Sh.DATA_REFERENCE, DataReference.SCSCFName);
    AVP<AVPList> userIdentity = new AVP<AVPList>(Sh.USER_IDENTITY, new AVPList());
        userIdentity.getValue().add(Cx.PUBLIC_IDENTITY, "sip:alice@cipango.org");
    udr.getAVPs().add(userIdentity);
    udr.getAVPs().add(Common.AUTH_SESSION_STATE, AuthSessionState.NO_STATE_MAINTAINED);
    udr.getSession();
    udr.send();
View Full Code Here

    String id = _client.getSessionManager().newSessionId();
    DiameterRequest snr = new DiameterRequest(_client, Sh.SNR, Sh.SH_APPLICATION_ID.getId(), id);
    snr.add(Common.DESTINATION_REALM, "server");
    snr.add(Common.DESTINATION_HOST, "server");
    snr.add(Sh.DATA_REFERENCE, DataReference.SCSCFName);
    AVP<AVPList> userIdentity = new AVP<AVPList>(Sh.USER_IDENTITY, new AVPList());
        userIdentity.getValue().add(Cx.PUBLIC_IDENTITY, "sip:alice@cipango.org");
    snr.getAVPs().add(userIdentity);
    snr.add(Common.AUTH_SESSION_STATE, AuthSessionState.NO_STATE_MAINTAINED);
    snr.getAVPs().add(Sh.SH_APPLICATION_ID.getAVP());
   
View Full Code Here

    assertTrue(message.isRequest());
    assertEquals(Cx.SAR, message.getCommand());
    assertEquals("scscf1.home1.net", message.get(Common.ORIGIN_HOST));
    assertEquals("home1.net", message.get(Common.ORIGIN_REALM));
   
    AVPList vsai = message.get(Common.VENDOR_SPECIFIC_APPLICATION_ID);
    assertEquals(IMS.IMS_VENDOR_ID, (int) vsai.getValue(Common.VENDOR_ID));
    assertEquals(Cx.CX_APPLICATION_ID.getId(), (int) vsai.getValue(Common.AUTH_APPLICATION_ID))
  }
View Full Code Here

      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);
   
    request.getAVPs().add(Sh.DATA_REFERENCE, Sh.DataReference.IMSUserState);
   
View Full Code Here

  @Test
  public void testEncodeCEA() throws Exception
  {
    DiameterAnswer answer = new DiameterAnswer();
    answer.setCommand(Common.CEA);
    AVPList l = new AVPList();
    answer.setAVPList(l);
    answer.setResultCode(Common.DIAMETER_SUCCESS);

    Buffer buffer = new ByteArrayBuffer(512);
    buffer = Codecs.__message.encode(buffer, answer);
View Full Code Here

TOP

Related Classes of org.cipango.diameter.AVPList

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.