Chan_dongle do not compile with asterisk 11


SUBMITTED BY: Guest

DATE: May 28, 2014, 11:10 a.m.

FORMAT: Text only

SIZE: 2.2 kB

HITS: 11524

  1. The symptoms are:
  2. In file included from app.c:21:0:
  3. /usr/include/asterisk/version.h:1:2: error: #error "Do not include 'asterisk/version.h'; use 'asterisk/ast_version.h' instead."
  4. app.c: In function 'app_register':
  5. app.c:162:3: warning: passing argument 2 of 'ast_register_application2' from incompatible pointer type [enabled by default]
  6. In file included from app.c:20:0:
  7. /usr/include/asterisk/module.h:458:5: note: expected 'int (*)(struct ast_channel *, const char *)' but argument is of type 'int (*)(struct ast_channel *, void *)'
  8. make: *** [app.o] Error 1
  9. Solution:
  10. Download patched sources
  11. autoconf and autmake should be installed
  12. uzip sources
  13. cd to unzipped folder
  14. issue commands: aclocal, autoconf, automake -a
  15. install chan_dongle as usual ./configure, make, make install.
  16. then I got next error
  17. # sudo make install
  18. ./config.status
  19. config.status: creating Makefile
  20. config.status: creating config.h
  21. config.status: config.h is unchanged
  22. config.status: executing depfiles commands
  23. strip chan_dongle.so
  24. /usr/bin/install -c -m 755 chan_dongle.so
  25. /usr/bin/install: missing destination file operand after `chan_dongle.so'
  26. Try `/usr/bin/install --help' for more information.
  27. make: *** [install] Error 1
  28. Error because on chan_dongle installed on 64 bit OS. In that case DESTDIR should be: DESTDIR="/usr/lib64/asterisk/modules
  29. after that you can run asterisk console and load module:
  30. CLI> module load chan_dongle.so
  31. but then next error comes:
  32. WARNING[24644]: chan_dongle.c:218 opentty: unable to open /dev/ttyUSB2: Permission denied
  33. that because of wrong permissions.
  34. That usually happens when asterisk running in non root mode. Set the correct permissions to /dev/ttyUSB
  35. #chmod 666 /dev/ttyUSB*
  36. after all chan_dongle is up and runnin, but after adding second dongle, problem with permissions comes back. The silution is to set permission automatically. Create file in /etc/udev/rules.d/92-dongle.rules
  37. and add
  38. KERNEL=="ttyUSB*", MODE="0666", OWNER="asterisk", GROUP="uucp"

comments powered by Disqus