### Description
Hi. Seems lime that after WSS in the VIA kamailio adds double SPACE It makes kamailio incompatable with jssip.net (tried 5.1.2 and 5.0.6 versions)
Looks like this happens with advertise address added on the interface
#### Reproduction
Just connect to kamailio via WSS with advertized address and try to make incoming call into WSS client
#### Debugging Data
I just put this link to JsSIP.net here https://groups.google.com/forum/#!topic/jssip/2lDyqgvZgrY
Also here is a string of my VIA header that gives issue
SIP/2.0/WSS 1.2.3.4:5061;branch=z9hG4bKd302.4c862421515641e7b59b9f3ba7f8eab4.1 Thant can be checked here https://www.textmagic.com/free-tools/unicode-detector
Log INVITE from the browser (only added \r\n at the end of the each string because of notepad++ not shows it after copying):
INVITE sip:2hsq8ob4@daotd6p7hil4.invalid;transport=ws SIP/2.0\r\n Record-Route: sip:1.2.3.4:5061;transport=ws;r2=on;lr;ftag=as7c4d457d;nat=yes\r\n Record-Route: sip:1.2.3.4;r2=on;lr;ftag=as7c4d457d;nat=yes\r\n Via: SIP/2.0/WSS 1.2.3.4:5061;branch=z9hG4bK110e.476a7e8aa7db8de3a4d7b01aed1e7ef5.1\r\n Via: SIP/2.0/UDP 10.1.1.138:5060;rport=5060;branch=z9hG4bK7122bcfb\r\n Max-Forwards: 69\r\n From: "test" sip:test@10.1.1.138;tag=as7c4d457d\r\n To: sip:test2@10.1.1.38:5060\r\n Contact: sip:test@10.1.1.138:5060\r\n Call-ID: 2ec6d77f5a56ca0f59ab0d2118d2f7d5@10.1.1.138:5060\r\n CSeq: 102 INVITE\r\n User-Agent: Asterisk PBX 15.3.0\r\n Date: Mon, 02 Apr 2018 10:30:57 GMT\r\n Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE\r\n Supported: replaces, timer\r\n Content-Type: application/sdp\r\n Content-Length: 642\r\n \r\n v=0\r\n o=root 1538180518 1538180518 IN IP4 1.2.3.4\r\n s=Asterisk PBX 15.3.0\r\n c=IN IP4 1.2.3.4\r\n t=0 0\r\n a=group:BUNDLE audio\r\n m=audio 31858 RTP/SAVPF 8 0 101\r\n a=maxptime:150\r\n a=rtpmap:8 PCMA/8000\r\n a=rtpmap:0 PCMU/8000\r\n a=rtpmap:101 telephone-event/8000\r\n a=fmtp:101 0-16\r\n a=sendrecv\r\n a=rtcp:31859\r\n a=rtcp-mux\r\n a=setup:actpass\r\n a=mid:audio\r\n a=fingerprint:sha-1 95:6F:40:F2:76:B3:E3:1E:DA:29:04:60:F1:F7:0A:DA:5E:D4:67:9F\r\n a=ice-ufrag:eSuU9ztd\r\n a=ice-pwd:j693abw9QWiaX81TlbvyHBD8FU\r\n a=candidate:5Qp8pvPCHLmm6iUU 1 UDP 2130706431 1.2.3.4 31858 typ host\r\n a=candidate:5Qp8pvPCHLmm6iUU 2 UDP 2130706430 1.2.3.4 31859 typ host\r\n
Actually i did not found any information about is it MUST be only one sace at the Grammar of SIP message based on RFC 2234 but I may be wrong. ```
#### SIP Traffic
<!-- If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site). -->
``` (paste your sip traffic here) ```
### Possible Solutions
<!-- If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix. -->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` (paste your output here) ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `uname -a`) -->
``` (paste your output here) ```
Can you check that the character is not inside your config file before the ip address in the advertised field?
Check also the output for `kamctl srv sockets`.
Hi THx for response listen=udp:10.1.1.38:5060 advertise 1.2.3.4:5060 listen=tcp:10.1.1.38:5060 advertise 1.2.3.4:5060 listen=tls:10.1.1.38:5061 advertise 1.2.3.4:5061 advertised_address="1.2.3.4" So this is only 1 SPACE
kamctl srv sockets list listen sockets
Gives empty output
(started as kamctl start)
Closed #1491.
Well, I sort of like your confidence, insisting with UPPERCASE words, but there is no visible extra whitespace in the Via of the INVITE you pasted above, just compare with the adjacent Via with UDP.
And as a matter of fact, the strange character is inside the value of `advertised_address`, just paste it to the form from your link in the first comment:
``` advertised_address="1.2.3.4" ```
Actually, you do not need to set `advertised_address` global parameter if you set `advertise` field for `listen`. Just remove it.
I am closing this one, the issue being a wrong char in the config. If you think it is not, reopen.
Yep Looks like advertised_address="1.2.3.4" was a trouble sorry for wasting your time
Strange artefact of my working environment.