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

Re: [reSIProcate] Bug with Multiple Accept headers


The easiest way to decorate the BYE message is to use the onReadyToSend InviteSession callback.

Scott

On Thu, May 20, 2010 at 3:42 PM, <aron_rosenberg@xxxxxxxxxxxx> wrote:

I'll try and a get full resip log to see whats going on, but the hardware endpoint is in India. I have noticed, that resiprocate doesn't include the Accept header in the BYE's it generates, is there a way perhaps to force that?

-Aron




Aron Rosenberg
Logitech Inc, (SightSpeed Group)

Inactive hide details for Scott Godin ---05/20/2010 12:11:25 PM---The code in validateAccept looks right to me - it should be sScott Godin ---05/20/2010 12:11:25 PM---The code in validateAccept looks right to me - it should be searching all Accept headers. In order

From: Scott Godin <sgodin@xxxxxxxxxxxxxxx>
To: aron_rosenberg@xxxxxxxxxxxx
Cc: resiprocate-devel <resiprocate-devel@xxxxxxxxxxxxxxxxxxxx>
Date: 05/20/2010 12:11 PM
Subject: Re: [reSIProcate] Bug with Multiple Accept headers
Sent by: slgodin@xxxxxxxxx




The code in validateAccept looks right to me - it should be searching all Accept headers.  In order to get into the code block you mentioned the following call would have to be returning false:
if(request.exists(h_Accepts))
Given that you see the Accept headers in the BYE message, I'm not sure why this is failing offhand.  Perhaps the SIPMessage failed to parse properly?  Maybe the resip logs would reveal more.

Scott

On Thu, May 20, 2010 at 2:19 PM, <aron_rosenberg@xxxxxxxxxxxx> wrote:
    So we have an interop issue with another SIP stack relating to that stack sending multiple "Accept" headers. Resiprocate is bouncing the BYE message with a 406 Not Acceptable error.

    The brief snippet from a pcap shows Accept being listed in this exact order.

    Accept: application/sdp,application/media_control+xml\r\n
    Accept: application/presentation_token_control+xml\r\n

    The same set of headers is allowed in the initial INVITE.

    I believe what is happening is that DialogUsageManager::validateAccept(
    const SipMessage& request) isn't properly searching multiple Accept header lines and it's falling into this block of code

    // If no Accept header then application/sdp should be assumed for certain methods

    else
    if(method == INVITE ||
    method == OPTIONS ||
    method == PRACK ||
    method == UPDATE)
    {

    if
    (getMasterProfile()->isMimeTypeSupported(request.header(h_RequestLine).method(), Mime("application", "sdp")))
    {

    return
    true;
    }
    }

    But in this case, BYE is not an option, so it bounces the message.

    A very simple fix would be to add BYE to that list, but are multiple Accept headers legal? If so, then the logic higher up in validateAccept needs to be changed to search more than just the last header line.

    Which is the right approach?

    Aron Rosenberg
    Logitech Inc, (SightSpeed Group)


    _______________________________________________
    resiprocate-devel mailing list

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


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