Hi,
When there is only a single History-Info
header in the incoming SIP INVITE and that too with an index=1
then Asterisk’s res_pjsip_diversion
module is not setting the redirection data from that header.
This happens because of the parsing logic inside get_history_info_header
function, If index=1 is there then it ignores the header and goes on to look for another History-Info
header which is not there in the SIP INVITE.
The following cases work:
- Only 1
History-Info
header without anyindex
param - Only 1
History-Info
header with anindex
param but for value anything other than 1 - More than 1
History-Info
header with different index param values
The following cases do not work:
- Only 1
History-Info
header with anindex
param having value1
. - Multiple history “statements” clubbed in a single
History-Info
header.
2.1 For example:
History-Info: <sip:bob@example.com>;index=1;purpose=hop, <sip:alice@proxy1.example.net>;index=2;purpose=hop
Questions:
- is the History-Info parsing implementation correct per the above-mentioned use cases?
- shouldn’t the single
History-Info
header withindex=1
work? is this not a valid SIP header?