Browse Source

KAZOO-1513: add tls bindings

3.17
karl anderson 12 years ago
parent
commit
9ec4d26505
3 changed files with 18 additions and 7 deletions
  1. +3
    -1
      kamailio/local.cfg
  2. +3
    -0
      kamailio/tls-role.cfg
  3. +12
    -6
      kamailio/websockets-role.cfg

+ 3
- 1
kamailio/local.cfg View File

@ -61,10 +61,12 @@ debug = L_INFO
## NOTE: You should not have to change these definitions ## NOTE: You should not have to change these definitions
#!substdef "!UDP_SIP!udp:MY_IP_ADDRESS:5060!g" #!substdef "!UDP_SIP!udp:MY_IP_ADDRESS:5060!g"
#!substdef "!TCP_SIP!tcp:MY_IP_ADDRESS:5060!g" #!substdef "!TCP_SIP!tcp:MY_IP_ADDRESS:5060!g"
#!substdef "!TLS_SIP!tls:MY_IP_ADDRESS:5061!g"
#!substdef "!UDP_AGL_SIP!udp:MY_IP_ADDRESS:7000!g" #!substdef "!UDP_AGL_SIP!udp:MY_IP_ADDRESS:7000!g"
#!substdef "!TCP_AGL_SIP!tcp:MY_IP_ADDRESS:7000!g" #!substdef "!TCP_AGL_SIP!tcp:MY_IP_ADDRESS:7000!g"
#!substdef "!TLS_AGL_SIP!tls:MY_IP_ADDRESS:7001!g"
#!substdef "!TCP_WS!tcp:MY_IP_ADDRESS:8080!g" #!substdef "!TCP_WS!tcp:MY_IP_ADDRESS:8080!g"
#!substdef "!TCP_WSS!tcp:MY_IP_ADDRESS:8080!g"
#!substdef "!TLS_WS!tcp:MY_IP_ADDRESS:8081!g"
## NOTE: This parameter is OPTIONAL. It will try to ## NOTE: This parameter is OPTIONAL. It will try to
## locate outbound interface on multihomed host. ## locate outbound interface on multihomed host.


+ 3
- 0
kamailio/tls-role.cfg View File

@ -1,5 +1,8 @@
enable_tls = yes enable_tls = yes
listen=TLS_SIP
listen=TLS_ALG_SIP
####### TLS Parameters ######### ####### TLS Parameters #########
loadmodule "tls.so" loadmodule "tls.so"
modparam("tls", "config", "/etc/kazoo/kamailio/tls.cfg") modparam("tls", "config", "/etc/kazoo/kamailio/tls.cfg")

+ 12
- 6
kamailio/websockets-role.cfg View File

@ -1,6 +1,10 @@
listen=TCP_WS
tcp_accept_no_cl=yes tcp_accept_no_cl=yes
listen=TCP_WS
#!ifdef TLS-ROLE
listen=TLS_WS
#!endif
######## Generic Hash Table container in shared memory ######## ######## Generic Hash Table container in shared memory ########
modparam("htable", "htable", "websockets=>size=16;autoexpire=7200") modparam("htable", "htable", "websockets=>size=16;autoexpire=7200")
@ -78,11 +82,13 @@ event_route[xhttp:request]
exit; exit;
} }
# if (!($hdr(Origin) =~ "www.2600hz.com")) {
# xlog("L_INFO", "websocket|log|rejecting HTTP request with unknown origin $hdr(Origin) from $si:$sp\n");
# xhttp_reply("400", "Bad Request", "", "");
# exit;
# }
#!ifdef MY_WEBSOCKET_DOMAIN
if (!($hdr(Origin) =~ "MY_WEBSOCKET_DOMAIN")) {
xlog("L_INFO", "websocket|log|rejecting HTTP request with unknown origin $hdr(Origin) from $si:$sp\n");
xhttp_reply("400", "Bad Request", "", "");
exit;
}
#!endif
if($sht(websockets=>$si::count) == $null) { if($sht(websockets=>$si::count) == $null) {
$var(count) = 1; $var(count) = 1;


Loading…
Cancel
Save