Index: /pjproject/trunk/pjsip/include/pjsip-simple/evsub.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip-simple/evsub.h	(revision 3411)
+++ /pjproject/trunk/pjsip/include/pjsip-simple/evsub.h	(revision 3412)
@@ -381,4 +381,17 @@
 
 /**
+ * Add a list of headers to the subscription instance. The list of headers
+ * will be added to outgoing presence subscription requests.
+ *
+ * @param sub		Subscription instance.
+ * @param hdr_list	List of headers to be added.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_add_header( pjsip_evsub *sub,
+					     const pjsip_hdr *hdr_list );
+
+
+/**
  * Accept the incoming subscription request by sending 2xx response to
  * incoming SUBSCRIBE request.
Index: /pjproject/trunk/pjsip/include/pjsip-simple/presence.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip-simple/presence.h	(revision 3411)
+++ /pjproject/trunk/pjsip/include/pjsip-simple/presence.h	(revision 3412)
@@ -181,4 +181,16 @@
 					  pjsip_tx_data **p_tdata);
 
+
+/**
+ * Add a list of headers to the subscription instance. The list of headers
+ * will be added to outgoing presence subscription requests.
+ *
+ * @param sub		Subscription instance.
+ * @param hdr_list	List of headers to be added.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_add_header( pjsip_evsub *sub,
+					    const pjsip_hdr *hdr_list );
 
 
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 3411)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 3412)
@@ -2139,4 +2139,10 @@
     pjsip_hdr	    reg_hdr_list;
 
+    /** 
+     * The optional custom SIP headers to be put in the presence
+     * subscription request.
+     */
+    pjsip_hdr	    sub_hdr_list;
+
     /**
      * Subscribe to message waiting indication events (RFC 3842).
Index: /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c	(revision 3411)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c	(revision 3412)
@@ -228,4 +228,5 @@
     pjsip_expires_hdr	 *expires;	/**< Expires header		    */
     pjsip_accept_hdr	 *accept;	/**< Local Accept header.	    */
+    pjsip_hdr             sub_hdr_list; /**< User-defined header.           */
 
     pj_time_val		  refresh_time;	/**< Time to refresh.		    */
@@ -724,4 +725,5 @@
     sub->accept = (pjsip_accept_hdr*) 
     		  pjsip_hdr_clone(sub->pool, pkg->pkg_accept);
+    pj_list_init(&sub->sub_hdr_list);
 
     sub->timer.user_data = sub;
@@ -1028,5 +1030,16 @@
 					       mod_evsub.allow_events_hdr));
 
-   
+
+    /* Add custom headers */
+    {
+	const pjsip_hdr *hdr = sub->sub_hdr_list.next;
+	while (hdr != &sub->sub_hdr_list) {
+	    pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*)
+			       pjsip_hdr_shallow_clone(tdata->pool, hdr));
+	    hdr = hdr->next;
+	}
+    }
+
+
     *p_tdata = tdata;
 
@@ -1036,4 +1049,25 @@
     pjsip_dlg_dec_lock(sub->dlg);
     return status;
+}
+
+
+/*
+ * Add custom headers.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_add_header( pjsip_evsub *sub,
+					    const pjsip_hdr *hdr_list )
+{
+    const pjsip_hdr *hdr;
+
+    PJ_ASSERT_RETURN(sub && hdr_list, PJ_EINVAL);
+
+    hdr = hdr_list->next;
+    while (hdr != hdr_list) {
+        pj_list_push_back(&sub->sub_hdr_list, (pjsip_hdr*)
+		          pjsip_hdr_clone(sub->pool, hdr));
+	hdr = hdr->next;
+    }
+
+    return PJ_SUCCESS;
 }
 
Index: /pjproject/trunk/pjsip/src/pjsip-simple/presence.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/presence.c	(revision 3411)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/presence.c	(revision 3412)
@@ -357,4 +357,14 @@
 
 /*
+ * Add custom headers.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_add_header( pjsip_evsub *sub,
+					   const pjsip_hdr *hdr_list )
+{
+    return pjsip_evsub_add_header( sub, hdr_list );
+}
+
+
+/*
  * Accept incoming subscription.
  */
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 3411)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 3412)
@@ -191,4 +191,5 @@
 #endif
     pj_list_init(&cfg->reg_hdr_list);
+    pj_list_init(&cfg->sub_hdr_list);
     cfg->call_hold_type = PJSUA_CALL_HOLD_TYPE_DEFAULT;
 }
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c	(revision 3411)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c	(revision 3412)
@@ -891,4 +891,5 @@
 	uapres->remote[status] = '\0';
 
+    pjsip_evsub_add_header(sub, &acc->cfg.sub_hdr_list);
     pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, uapres);
 
