osip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [osip-dev] INVITE Server transaction - matching requests


From: Aymeric Moizard
Subject: Re: [osip-dev] INVITE Server transaction - matching requests
Date: Wed, 11 Sep 2013 16:39:53 +0200

Hi David,

The text you quoted is for compatibility with old rfc2543!! You still receive INVITE with magic cookie branch?...

So I should replace:

 if (0 != osip_to_tag_match (tr->to, request->to))
      return OSIP_UNDEFINED_ERROR;


WITH:

    osip_generic_param_t *tag_from1;
    osip_generic_param_t *tag_from2;

    osip_from_param_get_byname (tr->to, "tag", &tag_from1);
    osip_from_param_get_byname (request->to, "tag", &tag_from2);
    if (tag_from1 == NULL && tag_from2 == NULL) {
      /*skip when no to tag in both */
    } else if (0 != osip_to_tag_match (tr->to, request->to))
      return OSIP_UNDEFINED_ERROR;

Right?

Regards,
Aymeric

Le 11 sept. 2013 13:49, "David Ramirez" <address@hidden> a écrit :
Hi,

There is a non-compliant behavior when matching INVITE requests in IST state machine.
As stated in RFC3261 17.2.3:
The INVITE request matches a transaction if the Request-URI, To tag,
   From tag, Call-ID, CSeq, and top Via header field match those of the
   INVITE request which created the transaction.

In file "src/osip2/osip_transaction.c" the function you can find the following code:
__osip_transaction_matching_request_osip_to_xist_17_2_3 (osip_transaction_t * tr, osip_message_t * request)
  
  ...
  if (MSG_IS_ACK (request)) {
    [...]
  }
  else {
    if (0 != osip_to_tag_match (tr->to, request->to))
      return OSIP_UNDEFINED_ERROR;

The function osip_to_tag_match() may return a wrong return code when INVITE retransmission is received. The "request->to" will ever be empty (as it is an INVITE request), however "tr->to" may have a value if the user has already sent a response that includes To tag.
The above sentence should be replaced by the following sentence in order to avoid that behaviour:
osip_to_tag_match (tr->orig_request->to, request->to)
This sentence will match, as every INVITE will lack the To tag, and it fits accurately to the RFC.

Regards,
David

--
David Ramírez
Ingeniería
Mantica
Tel.: +34 914 904 103
Móv.: +34 663 82 21 38
Fax: +34 914 903 601
address@hidden
http://www.mantica-solutions.com
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
 
AVISO LEGAL
Este mensaje y, en su caso, los ficheros adjuntos, se dirigen exclusivamente a su/s destinatario/s y pueden contener información privilegiada o confidencial. Si no es Vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.
 
CONFIDENTIAL NOTICE
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

_______________________________________________
osip-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/osip-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]