Hi! I have exactly the same problem as you have. Here is my entry for reference: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2013-May/016297.html. Wasn't 100% sure it was a NAT problem back then. Unfortunately I haven't found a reliable solution yet . Indeed, a second registration works correctly (notice that the second time, only 1 Contact header is included in REGISTER request and it has the correct, external IP address). That's the only lead I have atm. My current workaround is to send, after few seconds after the first, a second REGISTER request using: http://www.pjsip.org/pjsip/docs/html/group__PJSUA__LIB__ACC.htm#ga487960dea58d628d92fe4c9a083813de I am working on sending a the modified REGISTER request, containing only the correct Contact header. It involves initializing a REGC structure, setting up the headers and sending the request. This is possible after the first registration when we know our external IP address as reported by the IMS. Registering for the first time then immediately un-registering and then sending a correct REGISTER request would eliminate the "magic" waiting I mentioned before. I also think that the culprit might be the OpenIMSCore itself. I haven't had time to dig through its configuration options and check them all though. What I did test was http://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a73b69a3a8d225147ce386e310e588285 setting on 1 (legacy) - sends 2 simultaneous REGISTER requests instead of one with 2 Contacts. It does not work unfortunately. IMS responds with "Unable to Comply" and its database has to be reset. Please let me/us know when you find a solution. I will report back with my finding after I debug some more. 2013/7/17 Gremaud Cyrill <cyrill.gremaud at hefr.ch> > Hello everybody, > > I'm trying to create a simple console application with PJSIP through an > OpenIMSCore which allow Bob and Alice to communication with SIP Message > (IM). > > When I start my application (one for Bob, one for Alice) on my computer, > the registration is successful with the OpenIMSCore using the AKAv1-MD5 > authentication and I can send SIP message between Bob and alice. > > But if I start my application from a computer which is behind a NAT > (simple CISCO NAT overload), I have 2 Register request per application (one > for the private interface and another one for the public). > > The first Register request is for the private interface and the response > (after the challenge) is 200 OK with a "expires = 300. > The second Register request is for the public interface and the response > (after the challenge) is 200 OK with a expires = 300 BUT the expire for the > private is now a 0. (Wireshark says that there are 2 bindings) > > So, after that, I can't send IM message and I have the message "Status 403 > - You must register with a S-CSCF first". > > After 5 minutes, a new Register request is automatically send for the > PUBLIC interface only and after the challenge I have the 200 OK with a > expire = 300 and I have only 1 binding now and I can send IM message. > > Can you help me please ? I have search a lot but with no results. Thanks a > lot > > cyrill gremaud > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130717/c7d0ee2c/attachment-0001.html>