|
@@ -186,7 +186,7 @@ route[FORWARD]
|
|
|
# even for UDP2TCP
|
|
|
if (!t_relay()) {
|
|
|
sl_reply_error();
|
|
|
- };
|
|
|
+ }
|
|
|
drop;
|
|
|
}
|
|
|
|
|
@@ -201,12 +201,12 @@ route[INIT]
|
|
|
if (!mf_process_maxfwd_header("10")) {
|
|
|
sl_send_reply("483","Too Many Hops");
|
|
|
drop;
|
|
|
- };
|
|
|
+ }
|
|
|
|
|
|
if (msg:len >= max_len ) {
|
|
|
sl_send_reply("513", "Message too big");
|
|
|
drop;
|
|
|
- };
|
|
|
+ }
|
|
|
|
|
|
# you could add some NAT detection here for example
|
|
|
|
|
@@ -319,7 +319,7 @@ route[REGISTRAR]
|
|
|
sl_send_reply("401", "Unauthorized");
|
|
|
}
|
|
|
drop;
|
|
|
- };
|
|
|
+ }
|
|
|
|
|
|
# check if the authenticated user is the same as the target user
|
|
|
if (!lookup_user("$tu.uid", "@to.uri")) {
|
|
@@ -344,9 +344,12 @@ route[REGISTRAR]
|
|
|
#}
|
|
|
|
|
|
# everyhting is fine so lets store the binding
|
|
|
- save_contacts("location");
|
|
|
+ if (!save_contacts("location")) {
|
|
|
+ sl_reply("400", "Invalid REGISTER Request");
|
|
|
+ drop;
|
|
|
+ }
|
|
|
drop;
|
|
|
- };
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
route[AUTHENTICATION]
|
|
@@ -445,7 +448,7 @@ route[INBOUND]
|
|
|
sl_send_reply("480", "User temporarily not available");
|
|
|
drop;
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
route[PSTN]
|