title: Register on pjsip-app sample error
body: <p>I success full build sample vidgui from pjsip project. But while i run, it can't login to an IMS server. Server return an error:</p>
  
  <pre><code>SIP/2.0 400 Bad Request - P-Visited-Network-ID header missing
  </code></pre>
  
  <p>Below is a debug log while application run:</p>
  
  <pre><code>11:07:55.376    pjsua_acc.c  .Acc 0: setting registration..
  11:07:55.376    pjsua_acc.c  ..Contact for acc 0 updated for SIP outbound: &lt;sip:18401@10.171.27.92:39191;transport=TCP;ob&gt;;reg-id=1;+sip.instance="&lt;urn:uuid:00000000-0000-0000-0000-0000a3fe1a18&gt;"
  11:07:55.376  tcpc0x1386ba8  ...TCP client transport created
  11:07:55.376  tcpc0x1386ba8  ...TCP transport 10.171.27.92:41599 is connecting to 10.171.18.21:5060...
  11:07:55.376   pjsua_core.c  ...TX 645 bytes Request msg REGISTER/cseq=25194 (tdta0x13843b0) to TCP 10.171.18.21:5060:
  REGISTER sip:10.171.18.21 SIP/2.0
  Via: SIP/2.0/TCP 10.171.27.92:41599;rport;branch=z9hG4bKPjxBSX6.FR4wQKgeJSOs6OP1HzEBBJ9ivv
  Route: &lt;sip:10.171.18.21;transport=tcp;lr&gt;
  Max-Forwards: 70
  From: &lt;sip:18401@10.171.18.21&gt;;tag=lEY0yl3PZ.6iBX9SRwhC3dmErvvDji3f
  To: &lt;sip:18401@10.171.18.21&gt;
  Call-ID: zZdqmKCxlxWG2syWmhqLtY0Xdk0rTBT-
  CSeq: 25194 REGISTER
  Supported: outbound, path
  Contact: &lt;sip:18401@10.171.27.92:39191;transport=TCP;ob&gt;;reg-id=1;+sip.instance="&lt;urn:uuid:00000000-0000-0000-0000-0000a3fe1a18&gt;"
  Expires: 300
  Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
  Content-Length:  0
  
  
  --end msg--
  11:07:55.377    pjsua_acc.c  ..Acc 0: Registration sent
  11:07:55.377     vidgui.cpp  Starting stack..
  11:07:55.377   pjsua_core.c  PJSUA state changed: INIT --&gt; STARTING
  11:07:55.377 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered
  11:07:55.377   pjsua_core.c  .PJSUA state changed: STARTING --&gt; RUNNING
  11:07:55.377     vidgui.cpp  Ready
  11:07:55.377 sip_endpoint.c  Module "mod-default-handler" registered
  11:07:55.385  tcpc0x1386ba8 !TCP transport 10.171.27.92:41599 is connected to 10.171.18.21:5060
  11:07:55.388   pjsua_core.c  .RX 623 bytes Response msg 400/REGISTER/cseq=25194 (rdata0x1386e98) from TCP 10.171.18.21:5060:
  SIP/2.0 400 Bad Request - P-Visited-Network-ID header missing
  Via: SIP/2.0/TCP 10.171.27.92:41599;rport=41599;branch=z9hG4bKPjxBSX6.FR4wQKgeJSOs6OP1HzEBBJ9ivv
  From: &lt;sip:18401@10.171.18.21&gt;;tag=lEY0yl3PZ.6iBX9SRwhC3dmErvvDji3f
  To: &lt;sip:18401@10.171.18.21&gt;;tag=e7f797549a5ada3f2024dbe4b4572ec6-e254
  Call-ID: zZdqmKCxlxWG2syWmhqLtY0Xdk0rTBT-
  CSeq: 25194 REGISTER
  Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
  Content-Length: 0
  Warning: 392 10.171.18.21:5060 "Noisy feedback tells:  pid=3287 req_src_ip=10.171.27.92 req_src_port=41599 in_uri=sip:10.171.18.21 out_uri=sip:10.171.18.21 via_cnt==1"
  
  
  --end msg--
  11:07:55.389    pjsua_acc.c  ....SIP registration failed, status=400 (Bad Request - P-Visited-Network-ID header missing)
  11:07:55.389     vidgui.cpp  ....&lt;sip:18401@10.171.18.21&gt;: 400/Bad Request (expires=-1)
  </code></pre>
  
  <p>Here is the code about pjsua_acc_config: (SIP_USERNAME, SIP_PASSWORD, SIP_DOMAIN already defined with my IMS account info)</p>
  
  <pre><code>acc_cfg.id = pj_str( (char*)"&lt;sip:" SIP_USERNAME "@" SIP_DOMAIN "&gt;");
  acc_cfg.reg_uri = pj_str((char*) ("sip:" SIP_DOMAIN));
  acc_cfg.cred_count = 1;
  acc_cfg.cred_info[0].realm = pj_str((char*)"*");
  acc_cfg.cred_info[0].scheme = pj_str((char*)"digest");
  acc_cfg.cred_info[0].username = pj_str((char*)SIP_USERNAME);
  acc_cfg.cred_info[0].data = pj_str((char*)SIP_PASSWORD);
  acc_cfg.proxy[acc_cfg.proxy_cnt++] = pj_str((char*) "&lt;sip:" SIP_DOMAIN ";transport=tcp&gt;");
  </code></pre>
  
  <p>Help me fix this error. Thanks!</p>