[asterisk-dev] Possible bug – missing mandatory field Max-Forwards

Anatoli me at anatoli.ws
Thu Feb 19 18:33:00 CST 2015

Hi All,

I was evaluating the latest Asterisk (13.2.0) with the latest PJSIP (2.3) and found a critical problem (critical if some of the endpoints enforce compliance with the SIP RFC).

I had a discussion on pjsip mailing list about this (http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2015-February/018120.html) where the consensus was that there is a bug in res_pjsip code that manages SIP headers. The problem consists in that first the code in res_pjsip.c removes Max-Forwards header from the request generated by PJSIP library, but it doesn't add it later, so Asterisk sends INVITE, ACK, BYE, etc. messages without this mandatory header and RFC enforcing clients reject these messages.

I've also submitted a bug report in the Asterisk issue tracker: https://issues.asterisk.org/jira/browse/ASTERISK-24807. It has a patch for a workaround, but it's not the correct way of addressing the problem (it patches pjsip library when the problem is inside res_pjsip adapter).


More information about the asterisk-dev mailing list