|
@@ -0,0 +1,63 @@
|
|
|
|
+#!KAMAILIO
|
|
|
|
+
|
|
|
|
+children=2
|
|
|
|
+
|
|
|
|
+loadmodule "jsonrpcs.so"
|
|
|
|
+loadmodule "kex.so"
|
|
|
|
+loadmodule "corex.so"
|
|
|
|
+loadmodule "tm.so"
|
|
|
|
+loadmodule "tmx.so"
|
|
|
|
+loadmodule "sl.so"
|
|
|
|
+loadmodule "pv.so"
|
|
|
|
+loadmodule "xlog.so"
|
|
|
|
+loadmodule "siputils.so"
|
|
|
|
+
|
|
|
|
+request_route {
|
|
|
|
+
|
|
|
|
+ if (is_tel_number("$rU")) {
|
|
|
|
+ xlog("ruri user $rU is tel number\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("ruri user $rU is not tel number\n");
|
|
|
|
+ }
|
|
|
|
+ if (is_tel_number("+24242424")) {
|
|
|
|
+ xlog("+24242424 is tel number\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("+24242424 is not tel number\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (is_numeric("$rU")) {
|
|
|
|
+ xlog("ruri user $rU is numeric\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("ruri user $rU is not numeric\n");
|
|
|
|
+ }
|
|
|
|
+ if (is_numeric("+24242424")) {
|
|
|
|
+ xlog("+24242424 is numeric\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("+24242424 is not numeric\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (is_alphanum("$rU")) {
|
|
|
|
+ xlog("ruri user $rU is alpha-numeric\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("ruri user $rU is not alpha-numeric\n");
|
|
|
|
+ }
|
|
|
|
+ if (is_alphanum("+24242424")) {
|
|
|
|
+ xlog("+24242424 is alpha-numeric\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("+24242424 is not alpha-numeric\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (is_alphanumex("$rU", "+.-_")) {
|
|
|
|
+ xlog("ruri user $rU is extended alpha-numeric\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("ruri user $rU is not extended alpha-numeric\n");
|
|
|
|
+ }
|
|
|
|
+ if (is_alphanumex("+24242424", "+.-_")) {
|
|
|
|
+ xlog("+24242424 is extended alpha-numeric\n");
|
|
|
|
+ } else {
|
|
|
|
+ xlog("+24242424 is not extended alpha-numeric\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ sl_send_reply("200", "OK");
|
|
|
|
+ exit;
|
|
|
|
+}
|