- fixes the issue with B2BUA and bad 'Contact' as reported by Juha.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@749 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Raphael Coeffic 18 years ago
parent edc35d1bf5
commit d0a74c550e

@ -200,6 +200,11 @@ void AmSipDialog::updateStatus(const AmSipReply& reply)
remote_uri = reply.next_request_uri;
if(!reply.dstip.empty()){
sip_ip = reply.dstip;
sip_port = reply.port;
}
switch(status){
case Disconnecting:
if( t.method == "INVITE" ){

@ -19,6 +19,9 @@ class _AmSipMsgInDlg
string body;
unsigned int cseq;
string dstip; // IP where Ser received the message
string port; // Ser's SIP port
string serKey;
_AmSipMsgInDlg() : cseq(0) { }
@ -50,8 +53,6 @@ class AmSipRequest : public _AmSipMsgInDlg
string user;
string domain;
string dstip; // IP where Ser received the message
string port; // Ser's SIP port
string r_uri;
string from_uri;
string from;

@ -94,8 +94,9 @@ string SipCtrlInterface::getContact(const string &displayName,
if (hostName.length())
localUri += hostName;
else {
localUri += AmConfig::LocalSIPIP; // Ser will replace that...
localUri += ":" + AmConfig::LocalSIPPort;
localUri += AmConfig::LocalSIPIP;
localUri += ":" + int2str(AmConfig::LocalSIPPort);
}
if (uriParams.length()) {
@ -502,6 +503,9 @@ void SipCtrlInterface::handle_sip_reply(sip_msg* msg)
reply.remote_tag = c2stlstr(((sip_from_to*)msg->to->p)->tag);
reply.local_tag = c2stlstr(((sip_from_to*)msg->from->p)->tag);
reply.dstip = get_addr_str(((sockaddr_in*)(&msg->local_ip))->sin_addr); //FIXME: IPv6
reply.port = int2str(ntohs(((sockaddr_in*)(&msg->local_ip))->sin_port));
if( (get_cseq(msg)->method == sip_request::INVITE)
&& (msg->u.reply->code >= 200)
&& (msg->u.reply->code < 300) ){

Loading…
Cancel
Save