xy.cfg 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # forwarding to a fixed non-responding destination
  2. #
  3. #
  4. debug=9 # debug level (cmd line: -dddddddddd)
  5. log_stderror=yes # (cmd line: -E)
  6. check_via=yes # (cmd. line: -v)
  7. dns=on # (cmd. line: -r)
  8. rev_dns=yes # (cmd. line: -R)
  9. fork=no # (cmd. line: -D)
  10. port=5080
  11. #listen=127.0.0.1
  12. listen=192.168.99.100
  13. loop_checks=1
  14. # for more info: sip_router -h
  15. #modules
  16. loadmodule "modules/print/print.so"
  17. #loadmodule "modules/tm/tm.so"
  18. route{
  19. if ( t_lookup_request()) {
  20. if ( method=="ACK" ) {
  21. t_release();
  22. # forward(195.37.77.100, 5090 );
  23. forward(195.37.78.146, 5030 );
  24. # once it supports ACK too
  25. # t_forward(195.37.77.100, 5090 );
  26. } else {
  27. t_retransmit_reply();
  28. };
  29. t_unref();
  30. } else {
  31. if (method=="ACK") {
  32. # forward(195.37.77.100, 5090 );
  33. forward(195.37.78.146, 5030 );
  34. } else {
  35. t_add_transaction();
  36. if (method=="CANCEL") {
  37. t_send_reply( "200", "glad to cancel");
  38. } else {
  39. t_send_reply("100", "trying -- your call is important to us");
  40. };
  41. # t_forward("195.37.77.100", "5090" );
  42. t_forward("195.37.78.146", "5030" );
  43. t_unref();
  44. };
  45. };
  46. }