|
@@ -97,6 +97,14 @@ modparam("tls", "ca_list", "CA/calist.pem")
|
|
# - note: this is the same as route { ... }
|
|
# - note: this is the same as route { ... }
|
|
request_route {
|
|
request_route {
|
|
|
|
|
|
|
|
+ if ($rm == "OPTIONS")
|
|
|
|
+ {
|
|
|
|
+ force_rport();
|
|
|
|
+ $du = "sip:192.168.111.2:5080;transport=udp";
|
|
|
|
+ forward();
|
|
|
|
+ exit;
|
|
|
|
+ }
|
|
|
|
+
|
|
# per request initial checks
|
|
# per request initial checks
|
|
route(REQINIT);
|
|
route(REQINIT);
|
|
|
|
|
|
@@ -245,14 +253,14 @@ event_route[xhttp:request] {
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
- xlog("L_INFO", "HTTP Request Received\n");
|
|
|
|
|
|
+ xlog("L_DBG", "HTTP Request Received\n");
|
|
|
|
|
|
if ($hdr(Upgrade)=~"websocket"
|
|
if ($hdr(Upgrade)=~"websocket"
|
|
&& $hdr(Connection)=~"Upgrade"
|
|
&& $hdr(Connection)=~"Upgrade"
|
|
&& $rm=~"GET") {
|
|
&& $rm=~"GET") {
|
|
- xlog("L_INFO", "WebSocket\n");
|
|
|
|
- xlog("L_INFO", " Host: $hdr(Host)\n");
|
|
|
|
- xlog("L_INFO", " Origin: $hdr(Origin)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "WebSocket\n");
|
|
|
|
+ xlog("L_DBG", " Host: $hdr(Host)\n");
|
|
|
|
+ xlog("L_DBG", " Origin: $hdr(Origin)\n");
|
|
|
|
|
|
if ($hdr(Host) == $null || !is_myself($hdr(Host))) {
|
|
if ($hdr(Host) == $null || !is_myself($hdr(Host))) {
|
|
xlog("L_WARN", "Bad host $hdr(Host)\n");
|
|
xlog("L_WARN", "Bad host $hdr(Host)\n");
|