[reSIProcate] 180 Ringing and 200 OK messages with incorrect port?
Hi,
I have problem with 180 Ringing and 200 OK messages. When I received INVITE message, the callback function :
onNewSession(ServerInviteSessionHandle sis, InviteSession::OfferAnswerType oat, const SipMessage& msg)
is called.
But two message 180 Ringing and 200 OK didn't send to Sip server (SIPX 3.6) with the correct port 5060, they used a random port (37570, ...). Do you know how to make them send to correct port 5060?
Below is my source code of the callback function:
void TestUac::onNewSession(ServerInviteSessionHandle sis, InviteSession::OfferAnswerType oat, const SipMessage& msg)
{ cout << name << ": ServerInviteSession-onNewSession - " <<
msg.brief() << endl; cout << name << ": Sending 180 response." << endl;
mSis = sis; //sis->provisional(100); sis->provisional(180);
SdpContents* msdp = dynamic_cast<SdpContents*>(msg.getContents()); sis->provideAnswer(*msdp);
sis->accept(); _status = 5; // server receive invite and sended 200 OK with SDP
Data IpAddress = msdp->session().connection().getAddress(); int port = msdp->session().media().begin()->port();
OnInviteResult(&_status, (char*)IpAddress.c_str(), &port);}
Any help would be appreciated.
DBQ.