< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Contact: field getting over-written


Hi,

When I Register,  resip initially sets my "Contact" field as such...

Contact: <sip:u354>

So,  I need my contact to look like this,  so I do the following code...

   // create our register message
SipMessage & regMessage = clientDum->makeRegistration(*from, new RegisterAppDialogSet(*clientDum));

      // NEW:  Must add the contact here.
      // NameAddr contact = regMessage.header(h_Contacts).front();
regMessage.header(h_Contacts).front().uri().host() = mInfoServer->getExtIP(); // CHANGE: mDisplayName - an IV, init from [sipController displayName]; regMessage.header(h_Contacts).front().displayName() = [sipController displayName];

Now,  my Contact looks like this:

Contact: "TestUser5"<sip:u354@xxxxxxxxxxxxx>

Which now seems to work. But, after I've registered, and want to do an INVITE
request,  but I noticed the header got changed back to...

Contact: <sip:u354>

Then,  it re-populates it back to....

Contact: "TestUser5"<sip:u354@xxxxxxxxxxx>

Which is exactly correct.  So our server now seems to recognize the fact
that the machine next to me is getting called...  KEWL...  So my network
analysis code works.

However,  when I ACCEPT the call,  I still have problems...

I get:
Got an INVITE or SUBSCRIBE that doesn't have exactly one contact..

I do get the 100 trying,  180 ringing, and 200 ok,  but I get more then
one of them.  Am I suppose to do something after getting the first 200 ok?
would that be in the onSucess callback,  or the onConnected callback I would
have to do whatever this is....

John