title: How to send SIP messages with custom header using pjsua2 android
body: <p>With reference of that <a href="http://www.pjsip.org/pjsip/docs/html/structpj_1_1SendInstantMessageParam.htm" rel="nofollow">enter link description here</a></p>
  
  <p>I have send message successfully but I want to send custom header as well because of get status which particular message has send to update user </p>
  
  <pre><code>public void sendInstantMessage(String number, String msgBody) {
  String sipServer = "aaa.ggg.net";
  String buddy_uri = "&lt;sip:" + number + "@" + sipServer + "&gt;";
  
  BuddyConfig bCfg = new BuddyConfig();
  bCfg.setUri(buddy_uri);
  bCfg.setSubscribe(false);
  
  MyBuddy myBuddy = new MyBuddy(bCfg);
  SendInstantMessageParam prm = new SendInstantMessageParam();
  prm.setContent(msgBody);
  </code></pre>
  
  <p>// prm.setUserData(value)</p>
  
  <pre><code>try {
      myBuddy.create(account, bCfg);
      myBuddy.sendInstantMessage(prm);
      myBuddy.delete();
  } catch (Exception e) {
      e.printStackTrace();
      return;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>By using `Token pj::SendInstantMessageParam::userData for link <a href="http://www.pjsip.org/pjsip/docs/html/structpj_1_1SendInstantMessageParam.htm" rel="nofollow">enter link description here</a></p>
  
  <p>I want to send the userdata header, but how to sent that header??</p>
  
  <p>Thanks</p>