/* * for internal usage, creates a NOTIFY notify, asks the content to the * concrete implementation component, and then sends the request to the * subscriber */ public void createAndSendNotify( EntityManager entityManager, Subscription subscription, Dialog dialog, ImplementedSubscriptionControlSbbLocalObject childSbb) throws TransactionDoesNotExistException, SipException, ParseException { // create notify Request notify = createNotify(dialog, subscription); // add content if subscription is active if (subscription.getStatus().equals(Subscription.Status.active)) { if (subscription.getKey().getEventPackage().endsWith(".winfo")) { // winfo content, increment version before adding the content subscription.incrementVersion(); entityManager.persist(subscription); entityManager.flush(); notify.setContent( sipSubscriptionHandler .sbb .getWInfoSubscriptionHandler() .getFullWatcherInfoContent(entityManager, subscription), sipSubscriptionHandler.sbb.getWInfoSubscriptionHandler().getWatcherInfoContentHeader()); } else { // specific event package content NotifyContent notifyContent = childSbb.getNotifyContent(subscription); // add content if (notifyContent != null) { try { notify = setNotifyContent( subscription, notify, notifyContent.getContent(), notifyContent.getContentTypeHeader(), childSbb); } catch (Exception e) { logger.error("failed to set notify content", e); } } } } // ....aayush added code here (with ref issue #567) notify.addHeader(addPChargingVectorHeader()); // send notify ClientTransaction clientTransaction = sipSubscriptionHandler.sbb.getSipProvider().getNewClientTransaction(notify); dialog.sendRequest(clientTransaction); if (logger.isDebugEnabled()) { logger.debug("Request sent:\n" + notify.toString()); } }