code: private static void addHeadersToMessage(SipServletMessage message, Map<String, String> customHeaders) {
           for (Map.Entry<String, String> entry: customHeaders.entrySet()) {
               String headerName = entry.getKey();
               String headerVal = entry.getValue();
               message.addHeader(headerName, headerVal);
           }
       }
docs: Method adds custom headers to a SipServlet message
  @param message
  @param customHeaders