tp.cfg 912 B

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