< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] Lack of Contacts field in SIP header does not Create dialog


Check out section 12 of RFC3261.  The Contact header IS required to form a dialog, even though it is not part of the Dialog Id.  I don't think this change is a good idea.  Typically the contact header needs to identify the exact IP and port to the other party for routing of mid dialog requests.  The To header does not contains this level of information, it contains the AOR only.

RFC text:
The UAS MUST add a Contact header field to
   the response.
When a UAC sends a request that can establish a dialog (such as an
   INVITE) it MUST provide a SIP or SIPS URI with global scope (i.e.,
   the same SIP URI can be used in messages outside this dialog) in the
   Contact header field of the request.
The remote target MUST be set to the URI
   from the Contact header field of the response.

Scott

On Fri, Jul 8, 2016 at 10:54 AM, Daniel Cleaver <dcleaver@xxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I have a switch that does not populate the Contact field for incoming SIP trunk calls (i.e. reciprocate calls an extension on the switch via a SIP trunk). This prevents resiprocate from creating a dialog until after the call has been established. The switch still populates the To header correctly.

It looks as though the if statement in DialogSet::dispatch() has a slight logic flaw -- it will lazily evaluate to true if there is no Contact field, skipping over the To field checks. Dialog's constructor also needs to check if there's a To field and use that if the Contact field is not present.

I have attached a patch file which I created from the current master (4th July, 2016) which addresses the issue -- I now get a dialog when Contact is missing.

Any thoughts on this?

Thanks,
Daniel

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel