code: public TCBeginRequest createBegin(Dialog d) {
          if (d == null) {
              throw new NullPointerException("Dialog is null");
          }
          TCBeginRequestImpl tcbr = new TCBeginRequestImpl();
          tcbr.setDialog(d);
          tcbr.setDestinationAddress(d.getRemoteAddress());
          tcbr.setOriginatingAddress(d.getLocalAddress());
          return tcbr;
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.api.tc.dialog.DialogPrimitiveFactory
  #createBegin(org.restcomm.protocols.ss7.tcap.api.tc.dialog.Dialog)