Hi Barry
I tested this in kamailio 5.8.4 (x86_64/linux) and it works for me.
GET / HTTP/1.1
X-Special: James special websocket client
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: BusZNu+n1GkrSfuhBvbLQQ==
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Protocol: sip
x-p-push: zoink
Contact: yoink
Host: sip.frideo.eu:5066
HTTP/1.1 101 Switching Protocols
Sia: SIP/2.0/TCP 11.15.32.1:33333
Sec-WebSocket-Protocol: sip
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Accept: 9T//rnFY9NnFuZDn1UNPh7qqmZQ=
Server: Telnyx SIP Proxy
Content-Length: 0
xlog("L_INFO", "BF x-p-push header is $hdr(x-p-push) Contact is
$hdr(Contact)\n");
31(438) INFO: <script>: BF x-p-push header is zoink Contact is yoink
Those header fields look like they're SIP header fields not HTTP
header fields. Are you by any chance expecting that the
event_route[xhttp:request] should handle the SIP messages over
websocket (it does not)?
James
On Tue, 21 Jan 2025 at 08:37, Daniel-Constantin Mierla via sr-users
<sr-users(a)lists.kamailio.org> wrote:
Hello,
can you print $mb and see if the headers are there? Any errors in the syslog?
Cheers,
Daniel
On 20.01.25 22:26, Barry Flanagan via sr-users wrote:
Hi,
I need to be able to pull in a header provided by a webrtc endpoint so I can use it in my
request_route. I understand that I will need to use shm/htable to make it visible but I am
unable to get the xhttp header using $header(x-p-push), or any header by name.
In my event_route[xhttp:request] I have the following:
if ($hdr(Upgrade) =~ "websocket" && $hdr(Connection) =~
"Upgrade" && $rm =~ "GET") {
....
xlog("L_INFO", "BF x-p-push header is $hdr(x-p-push) Contact is
$hdr(Contact)\n");
}
The log shows both x-p-push and Contact header as null. sipdump shows the headers present
in the request.
Am I missing something? Running Kamailio 5.8.4
Thanks
-Barry
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions --
sr-users(a)lists.kamailio.org
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
--
Daniel-Constantin Mierla (@
asipto.com)
twitter.com/miconda --
linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services --
asipto.com
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions --
sr-users(a)lists.kamailio.org
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!