Guest User

Untitled

a guest
Jan 23rd, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. route[WITHINDLG] {
  2. if (has_totag()) {
  3. if (loose_route()) {
  4. record_route();
  5. if (is_present_hf("Contact")) {
  6. fix_nated_contact();
  7. }
  8. t_on_reply("REPLY_INDIALOG");
  9. append_hf("X-Server: SERVERNAME\r\n");
  10. if (!t_relay()) {
  11. sl_reply_error();
  12. }
  13. } else {
  14. if ( is_method("ACK") ) {
  15. if ( t_check_trans() ) {
  16. t_relay();
  17. exit;
  18. } else {
  19. exit;
  20. }
  21. }
  22. if ( is_method("NOTIFY") ) {
  23. record_route();
  24. ... doing some DB stuff here
  25. add_rr_param(";dfpx=$avp(defaultpbx);kd=$avp(kundenid)");
  26. append_hf("X-Server: SERVERNAME\r\n");
  27. t_relay();
  28. exit;
  29. }
  30. sl_send_reply("404","Not here");
  31. }
  32. exit;
  33. }
  34. }
Add Comment
Please, Sign In to add comment