code: public static SessionDescription buildSdp(boolean offer, String localAddress, String externalAddress, MediaChannel... channels) {
  		// Session-level fields
  		SessionDescription sd = new SessionDescription();
  		sd.setVersion(new VersionField((short) 0));
  		String originAddress = (externalAddress == null || externalAddress.isEmpty()) ? localAddress : externalAddress;
  		sd.setOrigin(new OriginField("-", String.valueOf(System.currentTimeMillis()), "1", "IN", "IP4", originAddress));
  		sd.setSessionName(new SessionNameField("Mobicents Media Server"));
          sd.setConnection(new ConnectionField("IN", "IP4", originAddress));
  		sd.setTiming(new TimingField(0, 0));
  		
  		// Media Descriptions
  		boolean ice = false;
  		for (MediaChannel channel : channels) {
  			MediaDescriptionField md = buildMediaDescription(channel, offer);
  			md.setSession(sd);
  			sd.addMediaDescription(md);
  			
  			if(md.containsIce()) {
  				// Fix session-level attribute
  				sd.getConnection().setAddress(md.getConnection().getAddress());
  				ice = true;
  			}
  		}
  		
  		// Session-level ICE
  		if(ice) {
  			sd.setIceLite(new IceLiteAttribute());
  		}
  		return sd;
  	}
docs: Builds a Session Description object to be sent to a remote peer.
  
  @param offer if the SDP is for an answer or answer.
  @param localAddress The local address of the media server.
  @param externalAddress The public address of the media server.
  @param channels The media channels to be included in the session description.
  @return The Session Description object.