### Description If $rU has "params" ( the username should be detected as the whole thing, no matter what chars but ':' for the password ) after calling add_uri_param() $rU points to the value without the "params".
Reading the RFC[0] (19.1 SIP and SIPS Uniform Resource Indicators) nothing seems to avoid the use of '=' and ';' in the username part
[0] https://www.ietf.org/rfc/rfc3261.txt
### Example
``` route[TEST] { xlog("$$ru[$ru] $$rU[$rU]\n"); $rU = "whatever;rn=0000;npdi"; xlog("$$ru[$ru] $$rU[$rU]\n"); add_uri_param("user=phone"); xlog("$$ru[$ru] $$rU[$rU]\n"); return; } ``` #### Log Messages
``` ERROR: <script>: $ru[sip:30@127.0.0.1] $rU[30] ERROR: <script>: $ru[sip:whatever;rn=0000;npdi@127.0.0.1] $rU[whatever;rn=0000;npdi] [...] DEBUG: <core> [core/parser/parse_uri.c:1221]: parse_uri(): parsed uri: type=1 user=<whatever;rn=0000;npdi>(21) passwd=<>(0) host=<127.0.0.1>(9) port=<>(0): 0 params=<>(0) headers=<>(0) ERROR: <script>: $ru[sip:whatever;rn=0000;npdi@127.0.0.1;user=phone] $rU[whatever] [...] DEBUG: <core> [core/parser/parse_uri.c:1221]: parse_uri(): parsed uri: type=3 user=<whatever>(8) passwd=<>(0) host=<127.0.0.1>(9) port=<>(0): 0 params=<rn=0000;npdi>(12) headers=<>(0) ```
### Additional Information
This is kamailio from trunk but 4.4 is affected too and I would assume previous versions too
type=1(SIP_URI_T) vs type=3 (TEL_URI_T) this seems relevant
From src/core/parser/parse_uri.c
``` case SIP_URI_T: /* save the original sip: URI parameters in sip_params */ uri->sip_params=uri->params; if ((phone2tel) && (uri->user_param_val.len == 5) && (strncmp(uri->user_param_val.s, "phone", 5) == 0) ) { uri->type = TEL_URI_T; uri->flags |= URI_SIP_USER_PHONE; /* move params from user into uri->params */ p=q_memchr(uri->user.s, ';', uri->user.len); if (p){ /* NOTE: * specialized uri params (user, maddr, etc.) still hold * the values from the sip-uri envelope * while uri->params point to the params in the embedded tel uri */ uri->params.s=p+1; uri->params.len=uri->user.s+uri->user.len-uri->params.s; uri->user.len=p-uri->user.s; } else { uri->params.s=0; uri->params.len=0; } } else { uri->flags&=~URI_USER_NORMALIZE; } break; ```
So not an issue. the ``"user=phone" `` uri param changes the behavior of the parser.
Closed #953.