Greetings, 

I have an issue where a client doesn't get the responses to the INVITE sent and as such keeps sending me retransmissions of the INVITE.

While the transaction is still up, Kamailio does its job. However, when the transaction is closed Kamailio processes the request again as a first request (Doing Routing and Dispatcher operations again).

In order to avoid the issue i've made the following code : 

    // If it's the first INVITE
 if( is_method("INVITE") && !has_totag() )
 {
  if(t_check_trans()) {
            xnotice("TRANS - INVITE Retransmission"); 
        }
        else if ( is_known_dlg()) { 
            xerr("KamTAG: INVITE in dialog without To Tag "); 
            exit;
        }
    }    
    
Is this a good solution and still compliant with the SIP rules?

Best Regards