Hi all, I am using pjsip and pjnath APIs to build my user agent. I would like to REGISTER with the Registrar using the mapped address obtained by STUN. The STUN mapping is partly ok (having issues with port mapping though, described in my other post). The question is how do I change the VIA header in a SIP dialog, once STUN response is obtained? I am able to build the FROM, TO and the CONTACT fields with the account information and the public address obtained (shown below). But the VIA header seems to be using my local transport address. How do I change it to the STUN mapped address? *message log:* REGISTER sip:iptel.org SIP/2.0 Via: SIP/2.0/UDP *192.168.0.23:5060* ;rport;branch=z9hG4bKPjiHYmNLr3J9bm5TyUGMJuhp3nPiJRk4MO Max-Forwards: 70 From: <sip:sundar2@xxxxxxxxx>;tag=i7pQoYqcuJnNBdIDWGI3TyR.hn3zMtTN To: <sip:sundar2 at iptel.org> Call-ID: OBdDB3SowCcfiNeUsXjdMuRBU2j.KGSI CSeq: 1650 REGISTER Contact: <sip:sundar2 at xx.xx.xx.xx:5060> Expires: 3600 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE Content-Length: 0 -- *registration request procedure followed:* 1. create registration client with pjsip_regc_create() 2. initialize client registration structure with pjsip_regc_init() 3. set the transport to be used with pjsip_regc_set_transport() 4, set authentication credentials with pjsip_regc_set_credentials() 5. set authentication preferences using pjsip_regc_set_prefs() 6. set refresh delay with pjsip_regc_set_delay_before_refresh() 7. create register request with pjsip_regc_register() 8. send the registration request with pjsip_regc_send() Should I delve a bit deeper to play with the headers myself to get it done or is there something am missing? Thanks in advance, Sundar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120207/463ad412/attachment.html>