Possible bug - missing mandatory field Max-Forwards

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

 



Harry,

 

Good point! Looks like the problem is really in asterisk's res_pjsip. I'll update the issue in the asterisk tracker.

 

Thanks,

Anatoli

 

From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Harald Radke
Sent: Thursday, February 19, 2015 05:38
To: pjsip at lists.pjsip.org
Subject: Re: Possible bug - missing mandatory field Max-Forwards

 

as with the INVITE request, ACK and BYE do have the Max-Forwards header fields included if the requests are constructed

via functions using  the pjsip_endpt_create_request_from_hdr(), this includes the functions for creating requests inside a dialog as well, such as ACK and BYE.

 

having a quick look at res_pjsip.c  of the asterisk res(ource?):

 

[...]

    /* PJSIP will automatically try to add a Max-Forwards header. Since we want to control that,
     * we need to stop PJSIP from doing it automatically
     */
    remove_request_headers(ast_pjsip_endpoint);

 

 

Thus this asterisk code clearly modifies the default behaviour of PJSIP thus it is up to either the user to configure it properly (maybe there is a Max-Forwards

option in a config file which, if not set, will result in not putting in a max-forwards header field with a default value) or it is a bug in res-pjsip.

 

Frankly I dont have any use nor any affiliation with asterisk, so I wont look into this issue further (actually I am not affiliated with PJSIP but I can see myself help improving it, unlike asterisk), so my advise is to get more information/help on any asterisk net resource

 

Regards,

 

Harry

  

Gesendet: Donnerstag, 19. Februar 2015 um 04:34 Uhr
Von: Anatoli <me at anatoli.ws>
An: "'pjsip list'" <pjsip at lists.pjsip.org>
Betreff: Re: [pjsip] Possible bug - missing mandatory field Max-Forwards

Harry,

Yes, you are right. And the RFC says the same "... fields ... are mandatory
in all SIP *requests*.".

Nevertheless, the max_fwd header is not in the requests. I'm not feeling
myself capable of continuing the investigation. Could you please try to
reproduce the problem as described in my first email or in the asterisk
issue tracker and confirm if you observe the described incorrect behavior
(asterisk with pjsip not sending max_fwd header in INVITE, ACK, BYE, etc.
messages)?

I guess you don't even need softphones, nor special configurations, just
check with pjsip logger or a packet sniffer what headers your current
asterisk with pjsip is sending. If I'm right, this incorrect behavior is
there from the beginning of asterisk/pjsip integration and should be
observable in any version of asterisk with pjsip.

Regards,
Anatoli

-----Original Message-----
From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Harald Radke
Sent: Wednesday, February 18, 2015 18:04
To: pjsip list
Subject: Re: Possible bug - missing mandatory field Max-Forwards

Joshua is right, Max-Forwards is mandatory for request messages.

ACK and BYE both are requests, not response messages.

Harry

Am 18.02.2015 um 18:23 schrieb Anatoli:
> Joshua,
>
> Maybe it's my wrong understanding, but what would be an ACK message as a
> reply to, say, INVITE? Or what would be an INVITE on behalf of another
> endpoint? Anyway, both of these (as all other messages, like BYE) are sent
> without max_fwd header. Please try to reproduce it as described in my
first
> email.
>
> Here is the issue in the Asterisk issue tracker:
> https://issues.asterisk.org/jira/browse/ASTERISK-24807.
>
> Regards,
> Anatoli
>
> -----Original Message-----
> From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Joshua
Colp
> Sent: Wednesday, February 18, 2015 13:51
> To: pjsip list
> Subject: Re: Possible bug - missing mandatory field Max-Forwards
>
> Anatoli wrote:
>> Joshua, Harry,
>>
>> Thanks for the clarifications. Indeed, res/res_pjsip/config_global.c
>> manages somehow max_fwd option and it looks like it adds it to all
>> requests, but not to the responses (simply adding
>> ast_sip_add_global_response_header("Max-Forwards", max_forwards, 1);
>> into global_apply() doesn't work).
> I'm confused by your statement... the Max-Forwards header is for
> requests, not for responses.
>


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150219/041efd9d/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux