|
|
@ -185,6 +185,9 @@ include_file "websockets-role.cfg" |
|
|
#!ifdef TLS-ROLE |
|
|
#!ifdef TLS-ROLE |
|
|
include_file "tls-role.cfg" |
|
|
include_file "tls-role.cfg" |
|
|
#!endif |
|
|
#!endif |
|
|
|
|
|
#!ifdef ACCOUNTING-ROLE |
|
|
|
|
|
include_file "accounting-role.cfg" |
|
|
|
|
|
#!endif |
|
|
|
|
|
|
|
|
####### Permissions module ########## |
|
|
####### Permissions module ########## |
|
|
loadmodule "permissions.so" |
|
|
loadmodule "permissions.so" |
|
|
@ -338,6 +341,13 @@ route[HANDLE_IN_DIALOG_REQUESTS] |
|
|
record_route(); |
|
|
record_route(); |
|
|
} |
|
|
} |
|
|
if (loose_route()) { |
|
|
if (loose_route()) { |
|
|
|
|
|
#!ifdef ACCOUNTING-ROLE |
|
|
|
|
|
if (is_method("BYE")) { |
|
|
|
|
|
setflag(FLAG_ACC); |
|
|
|
|
|
setflag(FLAG_ACCFAILED); |
|
|
|
|
|
} |
|
|
|
|
|
#!endif |
|
|
|
|
|
|
|
|
#!ifdef WEBSOCKETS-ROLE |
|
|
#!ifdef WEBSOCKETS-ROLE |
|
|
if ($du == $null) { |
|
|
if ($du == $null) { |
|
|
handle_ruri_alias(); |
|
|
handle_ruri_alias(); |
|
|
@ -421,6 +431,13 @@ route[RELAY] |
|
|
|
|
|
|
|
|
route[INTERNAL_TO_EXTERNAL_RELAY] |
|
|
route[INTERNAL_TO_EXTERNAL_RELAY] |
|
|
{ |
|
|
{ |
|
|
|
|
|
#!ifdef ACCOUNTING-ROLE |
|
|
|
|
|
if (is_method("INVITE")) { |
|
|
|
|
|
setflag(FLAG_ACC); |
|
|
|
|
|
setflag(FLAG_ACCFAILED); |
|
|
|
|
|
} |
|
|
|
|
|
#!endif |
|
|
|
|
|
|
|
|
remove_hf_re("X-.*"); |
|
|
remove_hf_re("X-.*"); |
|
|
|
|
|
|
|
|
t_on_reply("EXTERNAL_REPLY"); |
|
|
t_on_reply("EXTERNAL_REPLY"); |
|
|
@ -432,6 +449,13 @@ route[INTERNAL_TO_EXTERNAL_RELAY] |
|
|
|
|
|
|
|
|
route[EXTERNAL_TO_INTERNAL_RELAY] |
|
|
route[EXTERNAL_TO_INTERNAL_RELAY] |
|
|
{ |
|
|
{ |
|
|
|
|
|
#!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)) { |
|
|
if (!isflagset(FLAG_INTERNALLY_SOURCED)) { |
|
|
route(NAT_TEST_AND_CORRECT); |
|
|
route(NAT_TEST_AND_CORRECT); |
|
|
|