On receiving: ``` BYE sip:127.3.4.84;line=sr-bkhov30ei16khxiahn60i3jelfjzcwdavb.a8bhyuzda8bbavz8ymwb4lsi0iqmoigitdx9vbqgv5fjhdb.j8wcg5x8evkyv5fyqdbnguztav1yamwha8bwqfz8ymwl28o** SIP/2.0 Route: sip:7Vu+g0t42xO1vwWQTI5OE8SQTI5O1do=@111.11.111.11;transport=ws;r2=on;lr;nat=yes Route: sip:127.3.4.84;line=sr-BkHOVzLFLnGq8S7T8q0D8Xcgo6YwnboD9b0bwo9imwMaclMU7WtTm1ygmpyamW.AmQNRmbdk8bGTB3YABgCEBq7ULlaQVg.eDFUAVkaeVkJ0LW6JcX8* Via: SIP/2.0/WSS 964rp9hud53v.invalid;branch=z9hG4bK47814 Max-Forwards: 70 To: sip:99372@aegee.org;tag=kejtvxx541 From: "Online" sip:online@example.org;tag=b7movp1df3 Call-ID: lo20t4jpu47jpvo9mkn1 CSeq: 5788 BYE Supported: outbound User-Agent: SIP.js/0.7.8 Content-Length: 0
``` Kamailio 5.6.3 logs: ``` 20(21) ERROR: <core> [core/kemi.c:1573]: sr_kemi_core_to_proto_helper(): failed to parse nh uri [Of^U<B2>hr$-v`<A2>qa-a&jr^Y<FA>ce@1<B1>21168.0114<F1><B2>385D<FB>^Z<B2>a&sU'rD] ``` The logged unparsable part of nh uri is not part of the input.
With this change: ```diff diff --git a/src/core/kemi.c b/src/core/kemi.c --- a/src/core/kemi.c +++ b/src/core/kemi.c @@ -1570,6 +1570,7 @@ static int sr_kemi_core_to_proto_helper(sip_msg_t *msg) } } if(parse_uri(uri.s, uri.len, &parsed_uri)!=0) { + LM_ERR("failed to parse nh uri A [%s] len=%i\n", uri.s, uri.len); LM_ERR("failed to parse nh uri [%.*s]\n", uri.len, uri.s); return -1; }
``` Kamailio logs: ``` 20(21) ERROR: <core> [core/kemi.c:1573]: sr_kemi_core_to_proto_helper(): failed to parse nh uri A [Of^U<B2>dUa-li<FA>Uhb<F1>eFae<F1><98> e*rNd<FB>gr^K^X<A2>q<B2>uui<F4>*f2f5<F1>'cf7a6fb!^U1D7-<F2>X5076t^Ufb)bdc562<B3>n,i<FE>'^A4<B7>.11<B0>.15F115'~51<B1>2^U~1 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.198;TH=dcv;branch=z9hG4bK6764789 Max-Forwards: 70 To: sip:abc@example.org;tag=Vbl3bND From: "Online https://sip.example.net" sip:online@example.org;tag=7emhabs13d Call-ID: r3lc3guuas27ja5acl2c CSeq: 8664 ACK Supported: outbound User-Agent: SIP.js/0.7.8 Content-Length: 0 TH: dch
] len=104 20(21) ERROR: <core> [core/kemi.c:1574]: sr_kemi_core_to_proto_helper(): failed to parse nh uri [Of^U<B2>dUa-li<FA>Uhb<F1>eFae<F1><98>e*rNd<FB>gr^K^X<A2>q<B2>uui<F4>*f2f5<F1>'cf7a6fb!^U1D7-<F2>X5076t^Ufb)bdc562<B3>n,i<FE>'^A4<B7>.11<B0>.15F115'~51<B1>2^U~1] ``` That is, to parse_uri(uri.s, uri.len, &parsed_uri) in uri.s is passed the whole message, not just the URI.
Regarding `Via: SIP/2.0/WSS` I want to add, that the SIP-client connects to the webserver over secured websockets. The webserver (nginx) forwards the request to Kamailio over insecured TCP/HTTP connection. Thus: the sip client thinks it is using WSS,, but Kamailio sees a WS-only connection.
Closed #3351 as completed.
This looks like a result of config operations or how routing is done through the proxy, the log message shows the content of the buffer, the fault is not there.
Discuss on sr-users your config options and operations to figure out where the issue resides.
As far as I can see this problem happens with `modparam("topoh", "mask_key", "TEAI32l)- eauiDEUIA!?()")` and does not happen with `modparam("topoh", "mask_key", "TEAI32l")`.
Does this qualify now as bug report?
It could be, but not to what it was initially reported -- title and description of this issue have nothing to do with an eventual bug in the topoh module. That is the role of the mailing list, discuss a specific config to identify if there is an issue somewhere in the code and the open the issue with the appropriate details. This is not a discussion forum, like it is tried to be used.