Changeset 3856

Show
Ignore:
Timestamp:
06/28/2012 01:10:41 AM (11 months ago)
Author:
kurtis.heimerl
Message:

SIP MESSAGES now wait when they receive a 100 TRYING, rather than repeating themselves.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • openbts/trunk/SIP/SIPEngine.cpp

    r3812 r3856  
    11541154        assert(mINVITE); 
    11551155        osip_message_t *ok = NULL; 
     1156        // have we received a 100 TRYING message? If so, don't retransmit after timeout 
     1157        bool recv_trying = false; 
    11561158        while (!timeout.passed()) { 
    11571159                try { 
     
    11611163                } 
    11621164                catch (SIPTimeout& e) { 
    1163                         LOG(NOTICE) << "SIP MESSAGE packet to " << mProxyIP << ":" << mProxyPort << " timedout; resending";  
    1164                         gSIPInterface.write(&mProxyAddr,mINVITE);        
     1165                        if (!recv_trying){ 
     1166                                LOG(NOTICE) << "SIP MESSAGE packet to " << mProxyIP << ":" << mProxyPort << " timedout; resending";  
     1167                                gSIPInterface.write(&mProxyAddr,mINVITE); 
     1168                        } else { 
     1169                                LOG(NOTICE) << "SIP MESSAGE packet to " << mProxyIP << ":" << mProxyPort << " timedout; ignoring (got 100 TRYING)";  
     1170                        } 
    11651171                        continue; 
    11661172                } 
    11671173                assert(ok); 
     1174                if((ok->status_code==100)) { 
     1175                        recv_trying = true; 
     1176                        LOG(INFO) << "received TRYING MESSAGE"; 
     1177                } 
    11681178                if((ok->status_code==200) || (ok->status_code==202) ) { 
    11691179                        mState = Cleared;