Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. ================================================================================
  2.  
  3. ubuntu 18.04
  4.  
  5. sudo passwd root
  6.  
  7. su
  8.  
  9. apt update -y
  10. apt upgrade -y
  11.  
  12. apt install mc t38modem hylafax-server -y
  13.  
  14. ================================================================================
  15.  
  16. sudo t38modem --sip-proxy YOUR_CALLCENTRIC_ID:YOUR_CALLCENTRIC_PASSWORD@callcentric.com \
  17. --sip-register YOUR_CALLCENTRIC_ID@callcentric.com,YOUR_CALLCENTRIC_PASSWORD \
  18. --no-h323 -p +/dev/ttyx0 --route 'modem:.*=sip:<dn>@callcentric.com' \
  19. -u YOUR_CALLCENTRIC_ID --stun stun.ekiga.net
  20.  
  21. ================================================================================
  22.  
  23. sudo t38modem -tt -o /var/log/t38modem.log --no-h323 -u T38modem --sip-listen udp\$127.0.0.1:6060 --sip-redundancy 3 --ptty +/dev/ttyT38-1,+/dev/ttyT38-2 --route "modem:.*=sip:<dn>@127.0.0.1" --route "sip:.*=modem:<dn>"
  24.  
  25. ================================================================================
  26.  
  27. cp /var/spool/hylafax/config/t38modem /var/spool/hylafax/etc/config.ttyT38-1
  28. cp /var/spool/hylafax/config/t38modem /var/spool/hylafax/etc/config.ttyT38-2
  29.  
  30. ================================================================================
  31.  
  32. nano /etc/systemd/system/t38modem.service
  33.  
  34. [Unit]
  35. Description = T38Modem for /dev/ttyT38-1,/dev/ttyT38-2
  36. #ConditionPathExists =
  37. #Requires = asterisk.service
  38. #After = asterisk.service
  39.  
  40. [Service]
  41. Type = simple
  42. Restart=always
  43. #RestartSec=30
  44. ExecStart = /usr/bin/t38modem -ttt -o /var/log/t38modem.log --no-h323 -u T38modem --sip-listen udp$127.0.0.1:6060 --sip-t38-udptl-redundancy 3 --ptty +/dev/ttyT38-1,+/dev/ttyT38-2 --route "modem:.*=sip:<dn>@127.0.0.1" --route "sip:.*=modem:<dn>" --force-fax-mode --force-fax-mode-delay 0 --sip-register 1100@127.0.0.1,pwd
  45.  
  46. [Install]
  47. WantedBy=multi-user.target
  48.  
  49. ================================================================================
  50.  
  51. nano /etc/systemd/system/faxgetty-ttyT38-1.service
  52.  
  53. [Unit]
  54. Description=HylaFAX faxgetty for ttyT38-1
  55.  
  56. [Service]
  57. User=root
  58. Group=root
  59. Restart=always
  60. RestartSec=30
  61. ExecStart=/usr/sbin/faxgetty ttyT38-1
  62.  
  63. [Install]
  64. WantedBy=multi-user.target
  65.  
  66. ================================================================================
  67.  
  68. nano /etc/systemd/system/faxgetty-ttyT38-2.service
  69.  
  70. [Unit]
  71. Description=HylaFAX faxgetty for ttyT38-2
  72.  
  73. [Service]
  74. User=root
  75. Group=root
  76. Restart=always
  77. RestartSec=30
  78. ExecStart=/usr/sbin/faxgetty ttyT38-2
  79.  
  80. [Install]
  81. WantedBy=multi-user.target
  82.  
  83. ================================================================================
  84.  
  85. systemctl enable faxgetty-ttyT38-1.service
  86. systemctl enable faxgetty-ttyT38-2.service
  87.  
  88. systemctl enable t38modem.service
  89.  
  90. ================================================================================
  91.  
  92. reboot
  93.  
  94. ================================================================================
  95.  
  96. faxstat
  97. sendfax -h 127.0.0.1 -f andras@gmail.com -n -D -d 12345 /etc/resolv.conf
  98.  
  99. ================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement