### Description
When sending a multipart INVITE with a part having the following content type **application/vnd.3gpp.mcptt-info+xml** there is a parse error on content type header causing for eg we can't force rtpproxy to replace ports on a call leg.
From **parse_content.c** implementation It seems numbers are not accepted inside a content type header. (https://github.com/kamailio/kamailio/blob/master/src/core/parser/parse_conte...)
This might cause issues with MCPTT Rel 13 3GPP specs (http://www.arib.or.jp/english/html/overview/doc/STD-T63V12_20/5_Appendix/Rel...) or other content type defined by 3gpp ( eg of other content types defined in iana like https://www.iana.org/assignments/media-types/application/3gpp-ims+xml , etc.)
See attached conversation in user-list http://lists.sip-router.org/pipermail/sr-users/2017-April/096594.html
### Troubleshooting See below attached logs generated by Kamailio when processing that INVITE and a sample of INVITE message causing the issue (cut&paste from wireshark)
#### Reproduction
See attached INVITE or just send a multipart INVITE with a body part that has content type application/vnd.3gpp.mcptt-info+xml
#### Log Messages See log messages generated when trying to force rtpproxy
Apr 3 18:31:21 mcptt /usr/sbin/kamailio[3232]: INFO: <script>: forcing RTP proxy for INVITE message
Apr 3 18:31:21 mcptt /usr/sbin/kamailio[3232]: ERROR: <core> [core/parser/parse_content.c:370]: decode_mime_type(): ERROR:decode_mime_type: parse error near in [application/vnd.3gpp.mcptt-info+xml] char[51][3] offset=16
#### SIP Traffic INVITE sip:mcpttparticipating@genaker.net SIP/2.0 Record-Route: sip:10.1.1.123:6074;transport=tcp;lr=on;ftag=i3b01a;nat=yes Call-ID: db6b10362447354bc9819df9a9046ecb@10.1.1.222 CSeq: 1 INVITE From: sip:blue1@genaker.net;tag=i3b01a To: sip:ccw@genaker.net;poc-group=blues Via: SIP/2.0/TCP 10.1.1.123:6074;branch=z9hG4bK15a9.1c063dec40e772152f44c026a1627082.0;i=f Via: SIP/2.0/TCP 10.1.1.222:5070;received=10.1.1.222;rport=55173;branch=z9hG4bK-363135-1750dc6e97437e4788f446f2d818b60a Max-Forwards: 69 Contact: sip:blue1@10.1.1.222:55173;transport=tcp;+g.3gpp.mcptt;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";isfocus Accept-Contact: *;+g.3gpp.mcptt;require;explicit Accept-Contact: *;+g.3gpp.icsi-ref="urn:urn-7:3gpp-service.ims.icsi.mcptt";require;explicit P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mcptt P-Preferred-Identity: sip:blue1@genaker.net User-Agent: PoC-client/3GPP-Rel13 GenakerPTT/v2.03.01 - [f661833_334]d/BV6000/SDK23/FplatinumMcptt Session-Expires: 3600 Min-SE: 90 Supported: replaces, 100rel, timer, norefersub, timer, answermode, eventlist Resource-Priority: mcpttp.5 Content-Type: multipart/mixed;boundary=gnkboundary Content-Length: 997
--gnkboundary Content-Type: application/sdp
v=0 o=- 3626700268 3626700268 IN IP4 10.1.1.222 s=spimedia c=IN IP4 10.1.1.222 t=0 0 a=X-nat:0 m=audio 10002 RTP/AVP 106 a=rtcp:10003 IN IP4 10.1.1.222 i=speech a=rtpmap:106 AMR-WB/16000 a=fmtp:106 mode-change-period=1; mode-change-capability=2; mode-change-neighbor=0; max-red=0 a=sendrecv a=ptime:100 a=maxptime:400 m=application 10003 udp MCPTT a=fmtp:MCPTT mc_queueing;mc_priority=1
--gnkboundary Content-Type: application/vnd.3gpp.mcptt-info+xml
<?xml version="1.0" encoding="UTF-8"?> <mcpttinfo xmlns="urn:3gpp:ns:mcpttInfo:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <mcptt-Params> <session-type>chat</session-type> <mcptt-request-uri type="Normal"> <mcpttURI>sip:ccw@genaker.net;poc-group=blues</mcpttURI> </mcptt-request-uri> <mcptt-client-id type="Normal"> <mcpttURI>urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF</mcpttURI> </mcptt-client-id> </mcptt-Params> </mcpttinfo>
--gnkboundary--
### Possible Solutions Accept numbers in the content type header
Maybe accepting numbers on following definition at the same **parse_content.c** file:
#define is_mime_char(_c_) \ (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
### Additional Information [root@mcptt ~]# kamailio -v version: kamailio 5.0.0 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DsEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 19:22:29 Mar 16 2017 with gcc 4.8.5
* **Operating System**: CentOS7 Linux dev 3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Closed #1053 via #1055.
Fixed by @camilleoudot and it will be backported.
OK Thx for quick feedback!