public void addNewReturnResult(Long invokeId) throws Exception { ReturnResult rr = this.tcapProvider.getComponentPrimitiveFactory().createTCResultRequest(); rr.setInvokeId(invokeId); OperationCode oc = TcapFactory.createOperationCode(); oc.setLocalOperationCode(10L); rr.setOperationCode(oc); TestEvent te = TestEvent.createSentEvent(EventType.ReturnResult, null, sequence++); this.observerdEvents.add(te); this.dialog.sendComponent(rr); }
public void addNewInvoke(Long invokeId, Long timout) throws Exception { Invoke invoke = this.tcapProvider.getComponentPrimitiveFactory().createTCInvokeRequest(); invoke.setInvokeId(invokeId); OperationCode oc = TcapFactory.createOperationCode(); oc.setLocalOperationCode(10L); invoke.setOperationCode(oc); invoke.setTimeout(timout); // Parameter p1 = TcapFactory.createParameter(); // p1.setTagClass(Tag.CLASS_UNIVERSAL); // p1.setTag(Tag.STRING_OCTET); // p1.setData(new byte[]{0x0F}); // // Parameter p2 = TcapFactory.createParameter(); // p2.setTagClass(Tag.CLASS_UNIVERSAL); // p2.setTag(Tag.STRING_OCTET); // p2.setData(new byte[] { (byte) 0xaa, (byte) 0x98, (byte) 0xac, (byte) 0xa6, 0x5a, (byte) // 0xcd, 0x62, 0x36, 0x19, // 0x0e, 0x37, (byte) 0xcb, (byte) 0xe5, // 0x72, (byte) 0xb9, 0x11 }); // // Parameter pm = TcapFactory.createParameter(); // pm.setTagClass(Tag.CLASS_UNIVERSAL); // pm.setTag(Tag.SEQUENCE); // pm.setParameters(new Parameter[]{p1, p2}); // invoke.setParameter(pm); TestEvent te = TestEvent.createSentEvent(EventType.Invoke, null, sequence++); this.observerdEvents.add(te); this.dialog.sendComponent(invoke); lastSentInvoke = invoke; }