From ab1ffd33798646888d882b9e38c47c772194b116 Mon Sep 17 00:00:00 2001 From: bitbashing Date: Thu, 15 Sep 2016 10:23:50 -0700 Subject: [PATCH] corrected syntax errors in kamailio 4.4.3 (#102) --- kamailio/default.cfg | 124 +++++++++++++++---------------- kamailio/dispatcher-role.cfg | 6 +- kamailio/local.cfg | 38 +++++----- kamailio/nat-traversal-role.cfg | 2 +- kamailio/nodes-role.cfg | 2 +- kamailio/presence-role.cfg | 4 +- kamailio/presence_query-role.cfg | 4 +- kamailio/presence_sync-role.cfg | 4 +- kamailio/pusher-role.cfg | 4 +- kamailio/registrar-role.cfg | 32 ++++---- kamailio/registrar-sync-role.cfg | 4 +- kamailio/websockets-role.cfg | 6 +- 12 files changed, 115 insertions(+), 115 deletions(-) diff --git a/kamailio/default.cfg b/kamailio/default.cfg index 13f9f74..4545594 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -183,64 +183,64 @@ modparam("kazoo", "amqp_consumer_workers", 16); modparam("kazoo", "amqp_heartbeats", 5); ####### Role Configurations ########## -#!ifdef DISPATCHER-ROLE +#!ifdef DISPATCHER_ROLE include_file "dispatcher-role.cfg" #!endif -#!ifdef REGISTRAR-ROLE +#!ifdef REGISTRAR_ROLE include_file "registrar-role.cfg" #!endif -#!ifdef PRESENCE-ROLE +#!ifdef PRESENCE_ROLE include_file "presence-role.cfg" #!endif -#!ifdef MESSAGE-ROLE +#!ifdef MESSAGE_ROLE include_file "message-role.cfg" #!endif -#!ifdef NAT-TRAVERSAL-ROLE +#!ifdef NAT_TRAVERSAL_ROLE include_file "nat-traversal-role.cfg" #!endif -#!ifdef WEBSOCKETS-ROLE +#!ifdef WEBSOCKETS_ROLE include_file "websockets-role.cfg" #!endif -#!ifdef TLS-ROLE +#!ifdef TLS_ROLE include_file "tls-role.cfg" #!endif -#!ifdef ACCOUNTING-ROLE +#!ifdef ACCOUNTING_ROLE include_file "accounting-role.cfg" #!endif -#!ifdef ANTIFLOOD-ROLE +#!ifdef ANTIFLOOD_ROLE include_file "antiflood-role.cfg" #!endif -#!ifdef TRAFFIC_FILTER-ROLE +#!ifdef TRAFFIC_FILTER_ROLE include_file "traffic-filter-role.cfg" #!endif -#!ifdef ACL-ROLE +#!ifdef ACL_ROLE include_file "acl-role.cfg" #!endif -#!ifdef RATE_LIMITER-ROLE +#!ifdef RATE_LIMITER_ROLE include_file "rate-limiter-role.cfg" #!endif -#!ifdef PUSHER-ROLE +#!ifdef PUSHER_ROLE include_file "pusher-role.cfg" #!endif -#!ifdef RESPONDER-ROLE +#!ifdef RESPONDER_ROLE include_file "responder-role.cfg" #!endif -#!ifdef NODES-ROLE +#!ifdef NODES_ROLE include_file "nodes-role.cfg" #!endif -#!ifdef REGISTRAR_SYNC-ROLE +#!ifdef REGISTRAR_SYNC_ROLE include_file "registrar-sync-role.cfg" #!endif -#!ifdef FAST_PICKUP-ROLE +#!ifdef FAST_PICKUP_ROLE include_file "fast-pickup-role.cfg" #!endif -#!ifdef PRESENCE_SYNC-ROLE +#!ifdef PRESENCE_SYNC_ROLE include_file "presence_sync-role.cfg" #!endif -#!ifdef PRESENCE_QUERY-ROLE +#!ifdef PRESENCE_QUERY_ROLE include_file "presence_query-role.cfg" #!endif -#!ifdef PRESENCE_NOTIFY_SYNC-ROLE +#!ifdef PRESENCE_NOTIFY_SYNC_ROLE include_file "presence_notify_sync-role.cfg" #!endif @@ -265,24 +265,24 @@ route route(CLASSIFY_SOURCE); - #!ifdef ANTIFLOOD-ROLE + #!ifdef ANTIFLOOD_ROLE route(ANTIFLOOD_RATE_LIMIT); route(ANITFLOOD_AUTH_LIMIT); #!endif - #!ifdef TRAFFIC_FILTER-ROLE + #!ifdef TRAFFIC_FILTER_ROLE route(FILTER_REQUEST); #!endif - #!ifdef ACL-ROLE + #!ifdef ACL_ROLE route(ACL_CHECK); #!endif - #!ifdef RATE_LIMITER-ROLE + #!ifdef RATE_LIMITER_ROLE route(DOS_PREVENTION); #!endif - #!ifdef WEBSOCKETS-ROLE + #!ifdef WEBSOCKETS_ROLE route(HANDLE_WEBSOCKETS); #!endif @@ -290,18 +290,18 @@ route route(HANDLE_NOTIFY); - #!ifdef AUTHORIZATION-ROLE + #!ifdef AUTHORIZATION_ROLE route(AUTHORIZATION_CHECK); #!endif route(HANDLE_MESSAGE); - #!ifdef PRESENCE-ROLE + #!ifdef PRESENCE_ROLE route(HANDLE_SUBSCRIBE); route(HANDLE_PUBLISH); #!endif - #!ifdef REGISTRAR-ROLE + #!ifdef REGISTRAR_ROLE route(HANDLE_REGISTER); #!endif @@ -309,19 +309,19 @@ route route(PREPARE_INITIAL_REQUESTS); - #!ifdef PUSHER-ROLE + #!ifdef PUSHER_ROLE route(PUSHER_ROUTE); #!endif if (isflagset(FLAG_INTERNALLY_SOURCED)) { - #!ifdef RESPONDER-ROLE + #!ifdef RESPONDER_ROLE route(HANDLE_RESPOND); #!endif route(INTERNAL_TO_EXTERNAL_RELAY); exit(); } - #!ifdef DISPATCHER-ROLE + #!ifdef DISPATCHER_ROLE route(DISPATCHER_FIND_ROUTES); #!endif @@ -365,7 +365,7 @@ route[CLASSIFY_SOURCE] setflag(FLAG_TRUSTED_SOURCE); } - #!ifdef DISPATCHER-ROLE + #!ifdef DISPATCHER_ROLE route(DISPATCHER_CLASSIFY_SOURCE); #!endif } @@ -376,11 +376,11 @@ route[HANDLE_OPTIONS] if (isflagset(FLAG_INTERNALLY_SOURCED)) { route(INTERNAL_TO_EXTERNAL_RELAY); } else { - #!ifdef TRAFFIC_FILTER-ROLE + #!ifdef TRAFFIC_FILTER_ROLE route(FILTER_REQUEST_DOMAIN); #!endif - #!ifdef NAT-TRAVERSAL-ROLE + #!ifdef NAT_TRAVERSAL_ROLE route(NAT_TEST_AND_CORRECT); #!endif @@ -404,15 +404,15 @@ route[HANDLE_NOTIFY] } route(INTERNAL_TO_EXTERNAL_RELAY); } else { - #!ifdef TRAFFIC_FILTER-ROLE + #!ifdef TRAFFIC_FILTER_ROLE route(FILTER_REQUEST_DOMAIN); #!endif - #!ifdef WEBSOCKETS-ROLE + #!ifdef WEBSOCKETS_ROLE route(NAT_WEBSOCKETS_CORRECT); #!endif - #!ifdef NAT-TRAVERSAL-ROLE + #!ifdef NAT_TRAVERSAL_ROLE route(NAT_TEST_AND_CORRECT); #!endif @@ -430,7 +430,7 @@ route[HANDLE_NOTIFY] route[HANDLE_MESSAGE] { - #!ifdef MESSAGE-ROLE + #!ifdef MESSAGE_ROLE if (is_method("MESSAGE")) { xlog("L_INFO", "$ci|MESSAGE from $fu to $tu\n"); if (isflagset(FLAG_INTERNALLY_SOURCED) || src_ip == myself) { @@ -440,7 +440,7 @@ route[HANDLE_MESSAGE] xlog("L_INFO", "$ci|log|routing to $ruid\n"); } route(INTERNAL_TO_EXTERNAL_RELAY); - #!ifdef TRAFFIC_FILTER-ROLE + #!ifdef TRAFFIC_FILTER_ROLE } else if (!isflagset(FLAG_TRUSTED_SOURCE) && $rd =~ "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}") { xlog("L_WARN", "$ci|end|dropping MESSAGE request with IP domain\n"); @@ -479,7 +479,7 @@ route[HANDLE_IN_DIALOG_REQUESTS] } if (loose_route()) { - #!ifdef ACCOUNTING-ROLE + #!ifdef ACCOUNTING_ROLE if (is_method("BYE")) { setflag(FLAG_ACC); setflag(FLAG_ACCFAILED); @@ -575,7 +575,7 @@ route[RELAY] route[INTERNAL_TO_EXTERNAL_RELAY] { - #!ifdef ACCOUNTING-ROLE + #!ifdef ACCOUNTING_ROLE if (is_method("INVITE")) { setflag(FLAG_ACC); setflag(FLAG_ACCFAILED); @@ -600,20 +600,20 @@ route[INTERNAL_TO_EXTERNAL_RELAY] route[EXTERNAL_TO_INTERNAL_RELAY] { - #!ifdef ACCOUNTING-ROLE + #!ifdef ACCOUNTING_ROLE if (is_method("INVITE") && is_present_hf("Proxy-Authorization")) { setflag(FLAG_ACC); setflag(FLAG_ACCFAILED); } #!endif - #!ifdef NAT-TRAVERSAL-ROLE + #!ifdef NAT_TRAVERSAL_ROLE if (!isflagset(FLAG_INTERNALLY_SOURCED)) { route(NAT_TEST_AND_CORRECT); } #!endif - #!ifdef FAST_PICKUP-ROLE + #!ifdef FAST_PICKUP_ROLE route(FAST_PICKUP_REFER); #!endif @@ -635,25 +635,25 @@ onreply_route[EXTERNAL_REPLY] { xlog("L_INFO", "$ci|log|external reply $T_reply_code\n"); - #!ifdef WEBSOCKETS-ROLE + #!ifdef WEBSOCKETS_ROLE route(NAT_WEBSOCKETS_CORRECT); #!endif - #!ifdef NAT-TRAVERSAL-ROLE + #!ifdef NAT_TRAVERSAL_ROLE route(NAT_TEST_AND_CORRECT); #!endif - #!ifdef ACL-ROLE + #!ifdef ACL_ROLE setflag(FLAG_IS_REPLY); route(ACL_CHECK); #!endif - #!ifdef RATE_LIMITER-ROLE + #!ifdef RATE_LIMITER_ROLE setflag(FLAG_IS_REPLY); route(DOS_PREVENTION); #!endif - #!ifdef MESSAGE-ROLE + #!ifdef MESSAGE_ROLE if (is_method("MESSAGE")) { route(MESSAGE_REPLY); } @@ -666,21 +666,21 @@ onreply_route[INTERNAL_REPLY] xlog("L_INFO", "$ci|start|received internal reply $T_reply_code $rr\n"); xlog("L_INFO", "$ci|log|source $si:$sp\n"); - #!ifdef WEBSOCKETS-ROLE + #!ifdef WEBSOCKETS_ROLE route(NAT_WEBSOCKETS_CORRECT); #!endif - #!ifdef ACL-ROLE + #!ifdef ACL_ROLE setflag(FLAG_IS_REPLY); route(ACL_CHECK); #!endif - #!ifdef RATE_LIMITER-ROLE + #!ifdef RATE_LIMITER_ROLE setflag(FLAG_IS_REPLY); route(DOS_PREVENTION); #!endif - #!ifdef FAST_PICKUP-ROLE + #!ifdef FAST_PICKUP_ROLE route(FAST_PICKUP_REPLY); #!endif @@ -756,7 +756,7 @@ failure_route[INTERNAL_FAULT] } else if (t_check_status("(4[0-9][0-9])|(5[0-9][0-9])")) { xlog("L_INFO", "$ci|start|received failure reply $T_reply_code $rr\n"); - #!ifdef DISPATCHER-ROLE + #!ifdef DISPATCHER_ROLE route(DISPATCHER_NEXT_ROUTE); #!endif @@ -779,7 +779,7 @@ onsend_route { event_route[kazoo:mod-init] { - #!ifdef PRESENCE-ROLE + #!ifdef PRESENCE_ROLE ### use this simple form of binding a listener ### kazoo_subscribe("dialoginfo", "direct", "BLF-QUEUE-MY_HOSTNAME", "BLF-MY_HOSTNAME"); @@ -803,7 +803,7 @@ event_route[kazoo:mod-init] #!endif - #!ifdef MESSAGE-ROLE + #!ifdef MESSAGE_ROLE $var(key) = "kamailio@MY_HOSTNAME"; $var(payload) = '{ "exchange" : "sms" , "type" : "topic", "queue" : "MSG-QUEUE-MY_HOSTNAME", "routing" : "message.route.' + $(var(key){kz.encode}) + '.*", "auto_delete" : 1, "durable" : 0, "no_ack" : 0, "wait_for_consumer_ack" : 1 }'; @@ -811,35 +811,35 @@ event_route[kazoo:mod-init] #!endif - #!ifdef DISPATCHER-ROLE + #!ifdef DISPATCHER_ROLE $var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'MSG-FLUSH-MY_HOSTNAME', 'routing' : 'registration.flush.*', 'auto_delete' : 1, 'durable' : 0, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }"; kazoo_subscribe("$var(payload)"); #!endif - #!ifdef REGISTRAR_SYNC-ROLE + #!ifdef REGISTRAR_SYNC_ROLE $var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'REGISTRAR-SYNC-QUEUE-MY_HOSTNAME', 'routing' : 'registration.sync', 'auto_delete' : 1, 'durable' : 0, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }"; kazoo_subscribe("$var(payload)"); #!endif - #!ifdef PRESENCE_SYNC-ROLE + #!ifdef PRESENCE_SYNC_ROLE $var(payload) = "{ 'exchange' : 'presence' , 'type' : 'topic', 'queue' : 'PRESENCE-QUEUE-MY_HOSTNAME', 'routing' : 'sync', 'auto_delete' : 1, 'durable' : 0, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }"; kazoo_subscribe("$var(payload)"); #!endif - #!ifdef PRESENCE_QUERY-ROLE + #!ifdef PRESENCE_QUERY_ROLE $var(payload) = "{ 'exchange' : 'omnipresence' , 'type' : 'topic', 'routing' : 'presence.search_req.*', 'federate' : 1 }"; kazoo_subscribe("$var(payload)"); #!endif - #!ifdef NODES_SYNC-ROLE + #!ifdef NODES_SYNC_ROLE $var(payload) = "{ 'exchange' : 'nodes' , 'type' : 'fanout', 'queue' : 'NODES-MY_HOSTNAME', 'federate' : 1}"; kazoo_subscribe("$var(payload)"); @@ -900,7 +900,7 @@ route[ADD_AUTHORIZATION_HEADERS] } } -#!ifdef PRESENCE_NOTIFY_SYNC-ROLE +#!ifdef PRESENCE_NOTIFY_SYNC_ROLE event_route[tm:local-request] { route(PRESENCE_LOCAL_NOTIFY); diff --git a/kamailio/dispatcher-role.cfg b/kamailio/dispatcher-role.cfg index c5bb473..68d2670 100644 --- a/kamailio/dispatcher-role.cfg +++ b/kamailio/dispatcher-role.cfg @@ -63,19 +63,19 @@ route[DISPATCHER_FIND_ROUTES] $var(ds_group) = 1; - #!ifndef PRESENCE-ROLE + #!ifndef PRESENCE_ROLE if (is_method("SUBSCRIBE")) { $var(ds_group) = 10; } #!endif - #!ifndef REGISTRAR-ROLE + #!ifndef REGISTRAR_ROLE if (is_method("REGISTER")) { $var(ds_group) = 20; } #!endif - #!ifdef FAST_PICKUP-ROLE + #!ifdef FAST_PICKUP_ROLE route(FAST_PICKUP_ATTEMPT); #!endif diff --git a/kamailio/local.cfg b/kamailio/local.cfg index a8fcc71..f28d2d6 100644 --- a/kamailio/local.cfg +++ b/kamailio/local.cfg @@ -7,27 +7,27 @@ debug = L_INFO ## ROLES ################################################################################ ## Enabled Roles -#!trydef DISPATCHER-ROLE -#!trydef NAT-TRAVERSAL-ROLE -#!trydef REGISTRAR-ROLE -#!trydef PRESENCE-ROLE -#!trydef RESPONDER-ROLE -#!trydef NODES-ROLE -#!trydef FAST_PICKUP-ROLE -#!trydef PRESENCE_QUERY-ROLE +#!trydef DISPATCHER_ROLE +#!trydef NAT_TRAVERSAL_ROLE +#!trydef REGISTRAR_ROLE +#!trydef PRESENCE_ROLE +#!trydef RESPONDER_ROLE +#!trydef NODES_ROLE +#!trydef FAST_PICKUP_ROLE +#!trydef PRESENCE_QUERY_ROLE ## Disabled Roles - remove all but the last '#' to enable -# # #!trydef TRAFFIC_FILTER-ROLE -# # #!trydef WEBSOCKETS-ROLE -# # #!trydef TLS-ROLE -# # #!trydef ANTIFLOOD-ROLE -# # #!trydef RATE_LIMITER-ROLE -# # #!trydef ACL-ROLE -# # #!trydef MESSAGE-ROLE -# # #!trydef PUSHER-ROLE -# # #!trydef REGISTRAR_SYNC-ROLE -# # #!trydef PRESENCE_SYNC-ROLE -# # #!trydef PRESENCE_NOTIFY_SYNC-ROLE +# # #!trydef TRAFFIC_FILTER_ROLE +# # #!trydef WEBSOCKETS_ROLE +# # #!trydef TLS_ROLE +# # #!trydef ANTIFLOOD_ROLE +# # #!trydef RATE_LIMITER_ROLE +# # #!trydef ACL_ROLE +# # #!trydef MESSAGE_ROLE +# # #!trydef PUSHER_ROLE +# # #!trydef REGISTRAR_SYNC_ROLE +# # #!trydef PRESENCE_SYNC_ROLE +# # #!trydef PRESENCE_NOTIFY_SYNC_ROLE ################################################################################ ## SERVER INFORMATION diff --git a/kamailio/nat-traversal-role.cfg b/kamailio/nat-traversal-role.cfg index 125947e..c7274d0 100644 --- a/kamailio/nat-traversal-role.cfg +++ b/kamailio/nat-traversal-role.cfg @@ -1,5 +1,5 @@ ######## NAT Traversal module - signaling functions ######## -#!ifndef NATHELPER-LOADED +#!ifndef NATHELPER_LOADED loadmodule "nathelper.so" #!endif modparam("nathelper", "received_avp", "$avp(AVP_RECV_PARAM)") diff --git a/kamailio/nodes-role.cfg b/kamailio/nodes-role.cfg index 88f8c96..a45c130 100644 --- a/kamailio/nodes-role.cfg +++ b/kamailio/nodes-role.cfg @@ -1,5 +1,5 @@ ######## Nodes role - pushes info to kazoo ######## -#!ifndef TIMER-LOADED +#!ifndef TIMER_LOADED loadmodule "timer.so" #!endif modparam("timer", "declare_timer", "NODES_TIMER=NODES_TIMER_ROUTE,5000,slow,enable"); diff --git a/kamailio/presence-role.cfg b/kamailio/presence-role.cfg index a20edd1..8582311 100644 --- a/kamailio/presence-role.cfg +++ b/kamailio/presence-role.cfg @@ -36,7 +36,7 @@ modparam("kazoo", "pua_mode", 1) route[HANDLE_SUBSCRIBE] { if (is_method("SUBSCRIBE")) { - #!ifdef NAT-TRAVERSAL-ROLE + #!ifdef NAT_TRAVERSAL_ROLE route(NAT_TEST_AND_CORRECT); #!endif @@ -111,7 +111,7 @@ event_route[kazoo:consumer-event-presence-update] if($sht(p=>$var(call-id)) != $(kzE{kz.json,State}) || $(kzE{kz.json,Flush-Level}) != $null) { xlog("L_INFO", "$(kzE{kz.json,Target-Call-ID})|log|received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json,From}) state $(kzE{kz.json,State})\n"); $sht(p=>$(kzE{kz.json,Call-ID})) = $(kzE{kz.json,State}); - #!ifdef FAST_PICKUP-ROLE + #!ifdef FAST_PICKUP_ROLE route(FAST_PICKUP_INIT); #!endif kazoo_pua_publish($kzE); diff --git a/kamailio/presence_query-role.cfg b/kamailio/presence_query-role.cfg index b70ec44..50309f5 100644 --- a/kamailio/presence_query-role.cfg +++ b/kamailio/presence_query-role.cfg @@ -1,10 +1,10 @@ ######## Presence query server module ######## ####### SQL OPS module ########## -#!ifndef SQLOPS-LOADED +#!ifndef SQLOPS_LOADED loadmodule "sqlops.so" modparam("sqlops","sqlcon", "cb=>KAZOO_DB_URL") -#!trydef SQLOPS-LOADED +#!trydef SQLOPS_LOADED #!endif event_route[kazoo:consumer-event-presence-search-req] diff --git a/kamailio/presence_sync-role.cfg b/kamailio/presence_sync-role.cfg index ed6d84f..d3d987d 100644 --- a/kamailio/presence_sync-role.cfg +++ b/kamailio/presence_sync-role.cfg @@ -1,10 +1,10 @@ ######## Presence sync server module ######## ####### SQL OPS module ########## -#!ifndef SQLOPS-LOADED +#!ifndef SQLOPS_LOADED loadmodule "sqlops.so" modparam("sqlops","sqlcon", "cb=>KAZOO_DB_URL") -#!trydef SQLOPS-LOADED +#!trydef SQLOPS_LOADED #!endif event_route[kazoo:consumer-event-presence-sync] diff --git a/kamailio/pusher-role.cfg b/kamailio/pusher-role.cfg index 423bdbc..6640352 100644 --- a/kamailio/pusher-role.cfg +++ b/kamailio/pusher-role.cfg @@ -1,9 +1,9 @@ ## PUSHER ROLE ####### SQL OPS module ########## -#!ifndef TSILO-LOADED +#!ifndef TSILO_LOADED loadmodule "tsilo.so" -#!trydef TSILO-LOADED +#!trydef TSILO_LOADED #!endif route[PUSHER_ROUTE] diff --git a/kamailio/registrar-role.cfg b/kamailio/registrar-role.cfg index debd498..4cd83ec 100644 --- a/kamailio/registrar-role.cfg +++ b/kamailio/registrar-role.cfg @@ -9,7 +9,7 @@ modparam("htable", "htable", "auth_cache=>size=16;autoexpire=7200;") ####### Authentication Interface module ########## loadmodule "auth.so" -#!ifdef OPENBTS_AUTH-ROLE +#!ifdef OPENBTS_AUTH_ROLE loadmodule "auth_openbts.so" modparam("auth", "qop", "") modparam("auth", "secret", "OPENBTS_AUTH_SECRET") @@ -31,8 +31,8 @@ modparam("usrloc", "timer_procs", 1) ######## NAT Traversal module - signaling functions ######## -#!ifdef NAT-TRAVERSAL-ROLE -#!trydef NATHELPER-LOADED +#!ifdef NAT_TRAVERSAL_ROLE +#!trydef NATHELPER_LOADED loadmodule "nathelper.so" modparam("nathelper", "natping_interval", REGISTRAR_NAT_PING_INTERVAL) modparam("nathelper", "ping_nated_only", 1) @@ -59,7 +59,7 @@ route[HANDLE_REGISTER] { if (is_method("REGISTER")) { - #!ifdef NAT-TRAVERSAL-ROLE + #!ifdef NAT_TRAVERSAL_ROLE if (nat_uac_test("3")) { xlog("L_INFO", "$ci|log|correcting NATed contact in registration\n"); force_rport(); @@ -109,7 +109,7 @@ route[ATTEMPT_AUTHORIZATION] { $var(nonce) = $(uuid(g){s.rm,-}); - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE if($ua =~ "OpenBTS" && $sht(auth_cache=>$Au::nonce) != $null ) { $var(nonce) = $sht(auth_cache=>$Au::nonce); } @@ -125,13 +125,13 @@ route[ATTEMPT_AUTHORIZATION] route(KAZOO_AUTHORIZATION); } - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE if($ua =~ "OpenBTS") { openbts_auth_challenge("$fd", "$var(nonce)"); } else { #!endif auth_challenge("$fd", "0"); - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE } #!endif xlog("L_INFO", "$ci|end|issued auth challenge to new registration for $fu $si:$sp\n"); @@ -161,7 +161,7 @@ route[KAZOO_AUTHORIZATION_OK] { $var(password) = $(kzR{kz.json,Auth-Password}); $var(nonce) = $adn; - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE if( $(kzR{kz.json,Auth-Nonce}) != "" && $var(nonce) != $(kzR{kz.json,Auth-Nonce})) { xlog("L_INFO", "$ci|log|nonce replace $var(nonce) with $(kzR{kz.json,Auth-Nonce})\n"); $var(nonce) = $(kzR{kz.json,Auth-Nonce}); @@ -184,7 +184,7 @@ route[KAZOO_AUTHORIZATION_ERROR] route[CHECK_AUTHORIZATION] { - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE if($ua =~ "OpenBTS") { if($var(password) == $null) { openbts_auth_challenge("$fd", "$var(nonce)"); @@ -192,7 +192,7 @@ route[CHECK_AUTHORIZATION] exit; } if (!openbts_auth_check("$fd", "$var(password)")) { - #!ifdef ANTIFLOOD-ROLE + #!ifdef ANTIFLOOD_ROLE route(ANITFLOOD_FAILED_AUTH); #!endif openbts_auth_challenge("$fd", "$var(nonce)"); @@ -209,7 +209,7 @@ route[CHECK_AUTHORIZATION] } if (!pv_auth_check("$fd", "$var(password)", "0", "0")) { - #!ifdef ANTIFLOOD-ROLE + #!ifdef ANTIFLOOD_ROLE route(ANITFLOOD_FAILED_AUTH); #!endif @@ -218,20 +218,20 @@ route[CHECK_AUTHORIZATION] exit; } - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE } #!endif - #!ifdef ANTIFLOOD-ROLE + #!ifdef ANTIFLOOD_ROLE route(ANTIFLOOD_SUCCESSFUL_AUTH); #!endif if ($sht(auth_cache=>$Au) == $null) { xlog("L_INFO", "$ci|log|caching SIP credentials for $Au\n"); $sht(auth_cache=>$Au) = $var(password); - #!ifdef OPENBTS_AUTH-ROLE + #!ifdef OPENBTS_AUTH_ROLE if($ua =~ "OpenBTS") { $sht(auth_cache=>$Au::nonce) = $var(nonce); } @@ -291,7 +291,7 @@ route[SAVE_LOCATION] xlog("L_INFO", "$ci|end|successful $(var(Status){s.tolower}) with contact $ct\n"); - #!ifdef PUSHER-ROLE + #!ifdef PUSHER_ROLE route(PUSHER_ON_REGISTRATION); #!endif @@ -308,7 +308,7 @@ event_route[kazoo:consumer-event-directory-reg-flush] $sht(auth_cache=>$var(user)) = $null; } - #!ifdef ANTIFLOOD-ROLE + #!ifdef ANTIFLOOD_ROLE route(ANTIFLOOD_RESET_AUTH); #!endif } diff --git a/kamailio/registrar-sync-role.cfg b/kamailio/registrar-sync-role.cfg index 973ed86..918f005 100644 --- a/kamailio/registrar-sync-role.cfg +++ b/kamailio/registrar-sync-role.cfg @@ -1,10 +1,10 @@ ######## Presence sync server module ######## ####### SQL OPS module ########## -#!ifndef SQLOPS-LOADED +#!ifndef SQLOPS_LOADED loadmodule "sqlops.so" modparam("sqlops","sqlcon", "cb=>KAZOO_DB_URL") -#!trydef SQLOPS-LOADED +#!trydef SQLOPS_LOADED #!endif event_route[kazoo:consumer-event-directory-reg-sync] diff --git a/kamailio/websockets-role.cfg b/kamailio/websockets-role.cfg index a3801a4..7a1e65e 100644 --- a/kamailio/websockets-role.cfg +++ b/kamailio/websockets-role.cfg @@ -2,14 +2,14 @@ tcp_accept_no_cl=yes listen=TCP_WS listen=UDP_WS_SIP -#!ifdef TLS-ROLE +#!ifdef TLS_ROLE listen=TLS_WSS listen=UDP_WSS_SIP #!endif ######## NAT Traversal module - signaling functions ######## -#!ifndef NATHELPER-LOADED -#!trydef NATHELPER-LOADED +#!ifndef NATHELPER_LOADED +#!trydef NATHELPER_LOADED loadmodule "nathelper.so" #!endif