[asterisk-bugs] [JIRA] (ASTERISK-26779) chan_pjsip: PJSIP_HEADER does not understand compact headers

Joshua Colp (JIRA) noreply at issues.asterisk.org
Mon Feb 13 05:15:10 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-26779:
-----------------------------------

    Status: Open  (was: Triage)

> chan_pjsip: PJSIP_HEADER does not understand compact headers
> ------------------------------------------------------------
>
>                 Key: ASTERISK-26779
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26779
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 14.2.1
>            Reporter: Peter Sokolov
>            Severity: Minor
>
> When an endpoint using compact SIP headers tries to transfer a call using REFER, Asterisk/PJSIP rejects the request with 400 and shows the following DEBUG info although the "r:" header is present in the REFER request:
>  
> [Feb  9 13:15:44] DEBUG[2212]: res_pjsip_refer.c:1031 refer_incoming_refer_request: Received a REFER without Refer-To on channel 'PJSIP/132-00000003' from endpoint '132'
>  
> The same request works perfectly using chan_SIP. It turns out that Asterisk uses pjsip_msg_find_hdr_by_name function from sip_msg.c on many places to read SIP headers. However this function does not find headers which use compact names. In the case of call transfer using REFER, both "r:" and "b:" headers (Refer-To and Referred-By) are not found, causing the rejection of REFER. Call transfer fails.
>  
> The problem with REFER can be resolved easily by modifying the file /res/res_pjsip_refer.c in the following way (add lines with ++, remove those with --):
> <inline patch removed>
>   
> Even though the call transfer problem is solved this way, the question remains, whether there are other places in Asterisk that need to be corrected in order to handle correctly SIP compact names, for example:
>  
> - Will reading a SIP header from dialplan return correct result when using long/compact name in the query while the received headers use the other type or even mixed long/compact types of the same header? For example reading the second Via: header in the case only one of the proxies inserted a compact v: header while the others used Via:.
>  
> - Will adding a header to a request overwrite an existing header with the same name in the case such one is present, but uses the opposite long/compact form?
>  
> - Are there other places using pjsip_msg_find_hdr_by_name thet read headers which can use compact form?
>  
> The list of IANA registered compact headers is available here:
> http://www.iana.org/assignments/sip-parameters/sip-parameters.xhtml



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list