flag_reply.cfg 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #
  2. # $Id$
  3. #
  4. # simple quick-start config script
  5. #
  6. # ----------- global configuration parameters ------------------------
  7. debug=3 # debug level (cmd line: -dddddddddd)
  8. fork=yes
  9. log_stderror=no # (cmd line: -E)
  10. fork=no
  11. log_stderror=yes
  12. check_via=no # (cmd. line: -v)
  13. dns=no # (cmd. line: -r)
  14. rev_dns=no # (cmd. line: -R)
  15. children=4
  16. fifo="/tmp/ser_fifo"
  17. listen=195.37.77.100
  18. port=5068
  19. # ------------------ module loading ----------------------------------
  20. # Uncomment this if you want to use SQL database
  21. #loadmodule "/usr/local/lib/ser/modules/mysql.so"
  22. loadmodule "/usr/local/lib/ser/modules/sl.so"
  23. loadmodule "/usr/local/lib/ser/modules/tm.so"
  24. loadmodule "/usr/local/lib/ser/modules/rr.so"
  25. loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
  26. loadmodule "/usr/local/lib/ser/modules/usrloc.so"
  27. loadmodule "/usr/local/lib/ser/modules/registrar.so"
  28. loadmodule "/usr/local/lib/ser/modules/textops.so"
  29. # Uncomment this if you want digest authentication
  30. # mysql.so must be loaded !
  31. #loadmodule "/usr/local/lib/ser/modules/auth.so"
  32. #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
  33. # ----------------- setting module-specific parameters ---------------
  34. # -- usrloc params --
  35. modparam("usrloc", "db_mode", 0)
  36. # Uncomment this if you want to use SQL database
  37. # for persistent storage and comment the previous line
  38. #modparam("usrloc", "db_mode", 2)
  39. # -- auth params --
  40. # Uncomment if you are using auth module
  41. #
  42. #modparam("auth_db", "calculate_ha1", yes)
  43. #
  44. # If you set "calculate_ha1" parameter to yes (which true in this config),
  45. # uncomment also the following parameter)
  46. #
  47. #modparam("auth_db", "password_column", "password")
  48. # -- rr params --
  49. # add value to ;lr param to make some broken UAs happy
  50. modparam("rr", "enable_full_lr", 1)
  51. # ------------------------- request routing logic -------------------
  52. # main routing logic
  53. route{
  54. setflag(1);
  55. t_on_failure("1");
  56. t_on_reply("1");
  57. log(1, "message received\n");
  58. t_relay_to_udp("iptel.org", "5060");
  59. break;
  60. }
  61. onreply_route[1]
  62. {
  63. if (isflagset(1)) {
  64. log(1, "onreply: flag set\n");
  65. } else {
  66. log(1, "onreply: flag unset\n");
  67. };
  68. }
  69. failure_route[1]
  70. {
  71. if (isflagset(1)) {
  72. log(1, "failure: flag set\n");
  73. } else {
  74. log(1, "failure: flag unset\n");
  75. };
  76. }