|
@@ -3,7 +3,7 @@
|
|
# Simple/sample kamailio.cfg for running a proxy/registrar with TLS and
|
|
# Simple/sample kamailio.cfg for running a proxy/registrar with TLS and
|
|
# WebSockets support.
|
|
# WebSockets support.
|
|
|
|
|
|
-#!substdef "!DBURL!sqlite:///db.sqlite!g"
|
|
|
|
|
|
+#!substdef "!DBURL!sqlite:///etc/kamailio/db.sqlite!g"
|
|
#!substdef "!MY_IP_ADDR!192.168.111.136!g"
|
|
#!substdef "!MY_IP_ADDR!192.168.111.136!g"
|
|
#!substdef "!MY_WS_PORT!80!g"
|
|
#!substdef "!MY_WS_PORT!80!g"
|
|
#!substdef "!MY_WSS_PORT!443!g"
|
|
#!substdef "!MY_WSS_PORT!443!g"
|
|
@@ -150,9 +150,11 @@ request_route {
|
|
sl_send_reply("400", "Bad Request");
|
|
sl_send_reply("400", "Bad Request");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
- t_on_reply("WS_REPLY");
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (!is_method("REGISTER"))
|
|
|
|
+ t_on_reply("WS_REPLY");
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
# handle requests within SIP dialogs
|
|
# handle requests within SIP dialogs
|
|
@@ -298,11 +300,13 @@ route[AUTH] {
|
|
|
|
|
|
#!ifdef WITH_WEBSOCKETS
|
|
#!ifdef WITH_WEBSOCKETS
|
|
onreply_route[WS_REPLY] {
|
|
onreply_route[WS_REPLY] {
|
|
- # Do NAT traversal stuff for replies to a WebSocket connection - even
|
|
|
|
- # if it is not behind a NAT!
|
|
|
|
- # This won't be needed in the future if Kamailio and the WebSocket
|
|
|
|
- # client support outbound.
|
|
|
|
- add_contact_alias();
|
|
|
|
|
|
+ if (nat_uac_test(64)) {
|
|
|
|
+ # Do NAT traversal stuff for replies to a WebSocket connection - even
|
|
|
|
+ # if it is not behind a NAT!
|
|
|
|
+ # This won't be needed in the future if Kamailio and the WebSocket
|
|
|
|
+ # client support outbound.
|
|
|
|
+ add_contact_alias();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
event_route[xhttp:request] {
|
|
event_route[xhttp:request] {
|