### Description
According to RFC 3261 part `7.3.1 Header Field Format` header fields values can be extended over multiple lines separated with tab (`\r\n\t`). It seems that for many headers Kamailio support this format, but for `P-Asserted-Identity` if I try to use variable `$ai` I get error and null value
``` ERROR: |1232432423|<core> [core/parser/parse_addr_spec.c:662]: parse_addr_spec(): unexpected char [] in status 0: [] . ERROR: |1232432423|<core> [core/parser/parse_ppi_pai.c:71]: parse_pai_ppi_body(): Error parsing PAI/PPI body 1 'sip:+70000000000@test.com, tel:+79211119987' ```
I attach example of pcap. [pai.zip](https://github.com/kamailio/kamailio/files/7071411/pai.zip)
And below quotes from RFC 3261 ``` Header fields can be extended over multiple lines by preceding each extra line with at least one SP or horizontal tab (HT) .... Route: sip:alice@atlanta.com, sip:bob@biloxi.com, sip:carol@chicago.com
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` version: kamailio 5.4.0 (x86_64/linux) 6c4fce flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 6c4fce compiled on 17:15:32 Jul 29 2020 with gcc 4.8.5
```
* **Operating System**:
``` CentOS Linux release 7.8.2003 ```
Can you run again with latest master branch and post the error messages you get this time?
I extended the log messages to print more details about the unexpected char, because the logs above don't show any, is empty `[]`, but it seems to be past the `\r\n\t` and next address, so the issue could be the content of the packet, not the parser.
Log for the following two lines of the script ``` xlog("L_INFO", "1: $hdr(P-Asserted-Identity) \n"); xlog("L_INFO", "2: $ai \n"); ```
``` 0(7927) DEBUG: <core> [core/parser/msg_parser.c:91]: get_hdr_field(): found end of header 0(7927) INFO: <script>: 1: sip:+70000000000@test.com, tel:+71111111111 0(7927) DEBUG: <core> [core/parser/parse_addr_spec.c:883]: parse_addr_spec(): end of header reached, state=10 /13] in status 0: [] . [core/parser/parse_addr_spec.c:680]: parse_addr_spec(): unexpected char [ 0(7927) ERROR: <core> [core/parser/parse_ppi_pai.c:71]: parse_pai_ppi_body(): Error parsing PAI/PPI body 1 'sip:+70000000000@test.com, tel:+71111111111' 0(7927) DEBUG: pv [pv_core.c:1327]: pv_get_pai(): no P-Asserted-Identity header 0(7927) INFO: <script>: 2: <null> ```
``` kamailio -v version: kamailio 5.6.0-dev1 (x86_64/linux) cbca34 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: cbca34 compiled on 09:21:24 Sep 15 2021 with gcc 7.5.0 ```
Can you try with master branch or the patch from the commit referenced above? If works, then I will backport to 5.5
I tested with master branch and the error is fixed. Thank you
Closed #2837.