11.13 External functions
When an external function is declared, its location must be declared
too. It can be either remote or local according to the
fact the function is executed on a remote machine or on the same one
as SPL program.
1 service anti_spam {
processing {
remote bool isSpam(uri from);
5
dialog {
response incoming INVITE() {
if(isSpam(FROM)) {
return /ERROR/GLOBAL/DECLINE with {
10 reason ="Your call was considered as a spam call, and was blocked."};
}
else {
return forward;
} } } } }