Hi bennylp, If I enable the allow_contact_rewrite. For the regc_cb callback coming it call the acc_check_nat_addr to update the contact if address changed. During the first time register. My client send REGISTER request to server use private local ip and the sip server ip is public . the response is 200 from server. the response header via sendby is my private ip and via received is public ip. During this situation your regc_cb call acc_check_nat_addr In pjsua_acc.cpp line 1338(pjsip 2.0) if (via->recvd_param.slen != 0) via_addr = &via->recvd_param; else via_addr = &via->sent_by.host; change the addr to public ip . and then found ip change so use public ip send REGISTER request again . then sip server response via sendby and via receivend ip is same . all change to public ip . this time the regc_cb callback call acc_check_nat_addr found no ip change the return. In this situation My client can communicate with sip server . can send/receive INVITE from server . the problem is RTP. When call session is established only one way RTP. Server do not send RTP to my client. Client can send RTP to server . I am look at the INVITE SDP body the c field value is c=IN IP4 192.x.x.x.(my local ip) So do you have any suggestion about it ? So far my solutions is ignore the via.received address just use via.sent_by address to do the re-REGISTER. Thanks a lot. Dahang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120613/bddb06e3/attachment.html>