1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
import java.lang.*;
import java.io.*;
import org.siprouter.*;
import org.siprouter.NativeInterface.*;
public class WrappedMethods extends NativeMethods
{
public static boolean is_method(String method)
{
if (KamExec("is_method", method) == -1)
return false;
else
return true;
}
public static boolean t_check_trans()
{
if (KamExec("t_check_trans") == -1)
return false;
else
return true;
}
public static boolean t_relay()
{
if (KamExec("t_relay") == -1)
return false;
else
return true;
}
public static void record_route()
{
KamExec("record_route");
}
public static void append_hf(String txt)
{
KamExec("append_hf", txt);
}
public static void append_hf(String txt, String hdr)
{
KamExec("append_hf", txt, hdr);
}
public static void remove_hf(String hname)
{
KamExec("remove_hf", hname);
}
public static void sl_send_reply(String replycode, String replymsg)
{
KamExec("sl_send_reply", replycode, replymsg);
}
public static void sl_reply_error()
{
KamExec("sl_reply_error");
}
public static boolean has_totag()
{
if (KamExec("has_totag") == -1)
return false;
else
return true;
}
public static boolean loose_route()
{
if (KamExec("loose_route") == -1)
return false;
else
return true;
}
public static boolean save(String location)
{
if (KamExec("save", location) == -1)
return false;
else
return true;
}
}
|