rem: int request_received(  table hash_table, char* incoming_req_uri, char *from, char* to, char* tag, char* call_id, char* cseq_nr ,char* cseq_method, char* outgoing_req_uri)
add: int request_received( struct s_table* hash_table, char* incoming_req_uri, char *from, char* to, char* tag, char* call_id, char* cseq_nr ,char* cseq_method, char* outgoing_req_uri)
context: int request_received(  table hash_table, char* incoming_req_uri, char *from, char* to, char* tag, char* call_id, char* cseq_nr ,char* cseq_method, char* outgoing_req_uri){   struct cell*  matched_trans = 0;   struct cell*  new_trans         = 0;   int status;   /* looking for transaction    * IMPORTANT NOTE : the lookup_for_Transaction_by_XXXX returns the found trans referenceted -> when finidh you    * have to unreference manually, otherwise the cell wann't be ever deleted!!!!    */   if ( !strcmp( cseq_method , "ACK") )   {      /* we got an ACK -> do we have a transaction pair for it?*/      matched_trans =  lookup_for_Transaction_by_ACK( hash_table, from , to , tag , call_id , cseq_nr );      if ( matched_trans )      {         /* the trans pair was found -> let's check the trans's status  */         status = matched_trans->status;         /* done with reading the transaction -> unref it*/         unref_Cell( matched_trans );         if ( status>=200 && status<300 )         {            /* response for PROXY -> route the ACK */          return 1;         }         else         {            /* response for PROXY->DROP the request!! */            return 0;         }      }      else      {         /* response for PROXY -> route the ACK */         return 1;      }   }   /* looks up for a perfect mache transaction */   matched_trans =  lookup_for_Transaction_by_req( hash_table, from , to , tag , call_id , cseq_nr , cseq_method );   if ( matched_trans )   {      /* the trans already exists -> the last response is retransmited  */      status = matched_trans->status;      /* done with reading the transaction -> unref it*/      unref_Cell( matched_trans );      // TO DO -> replay with <status> response      /* response for PROXY->DROP the request!! */      return 0 ;   }    /* if is not a request -> route it further */   if ( strcmp( cseq_method , "CANCEL") )   {      /* we got a CANCEL -> do we have a transaction pair for it?*/      matched_trans = lookup_for_Transaction_by_CANCEL( hash_table, incoming_req_uri , from , to , tag , call_id , cseq_nr );      if ( matched_trans )      {         /* the trans pair was found -> let's check the trans's status  */         status = matched_trans->status;         /* done with reading the transaction -> unref it*/         unref_Cell( matched_trans );        if ( status>=200 )         {            /* the trasaction has a final response -> send a 200 reply for the CANCEL */            // TO DO send 200 reply            /*response for PROXY -> DROP the request!!! */            return 0;         }      }   }   /* a new trans is created based on the received request */   new_trans = add_Transaction( hash_table , incoming_req_uri , from , to , tag , call_id , cseq_nr , cseq_method );   if ( !new_trans )   {      /* response for PROXY -> error:cannot alloc memory */      return -1;   }   /* a 100 replay is sent */   //TO DO ->send a 100 reply   /* the FINAL RESPONSE timer is engaged */   start_FR_timer( hash_table, new_trans );   /* sets the outgoing req URI */   new_trans->outgoing_req_uri = sh_malloc( strlen(outgoing_req_uri) + 1 );   strcpy( new_trans->outgoing_req_uri , outgoing_req_uri );   /* response for PROXY -> route the request */   return 1;}