pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

asterisk woes: everything newer than 16 does not work



BLUF: Does asterisk newer than 16 work for anyone, with SIP over TLS?
For me, no newer version works, with two different failure modes.


My asterisk installation, which I don't really use much, seemed
troubled.  It's running on NetBSD 9 amd64, and I have an Obihai FXO/FXS
interface.  Nothing fancy, and it used to work mostly well.  I may have
updated and not tested well at some point.

I have tried to update to newer versions, and gone over my
configs and reduced diffs to upstream.  I basically have custom:
  extensions.conf (everybody has custom extensions)
  pjsip.conf (hardphone and softphone users)
  xmpp.conf (call notifications)
and have tweaked in minor ways
  logger.conf
  rtp.conf

I'll spare you the journey but I find two different ways that asterisk
fails, and only one working version.

* 19, 21, 22

complaints about

  /usr/pkg/libdata/asterisk/documentation/core-en_US.xml

being bad xml, and sure enough, a second xml document started in the
file, while a previous one was still in process.

* 18, 20

I found that the udp/sip listener worked.  But nothing listening on tcp
and tls.  (I set up multiple methods to test; this is more me learning
about SIP than production.)  There were tcp fds open but not listening.

This looks like (good state which lasts 1s, and then bad state):

  asterisk asterisk   22598   25* internet stream tcp *:5060
  asterisk asterisk   22598   25* internet stream tcp

After a bunch of ktracing, it seems they are created ok and then fail.

The key part of the ktrace seems to be

 26475      1 asterisk CALL  listen(0x19,5)
 26475      1 asterisk RET   listen 0
 26475      1 asterisk CALL  __clock_gettime50(3,0x7f7fff1b14c0)
 26475      1 asterisk RET   __clock_gettime50 0
 26475      1 asterisk CALL  getsockopt(0x19,0xffff,0x1008,0x7b808b5c0280,0x7f7fff1b1580)
 26475      1 asterisk RET   getsockopt 0
 26475      1 asterisk CALL  ioctl(0x19,FIONBIO,0x7f7fff1b1580)
 26475      1 asterisk GIO   fd 25 wrote 4 bytes
       "\^A\0\0\0"
 26475      1 asterisk RET   ioctl 0
 26475      1 asterisk CALL  accept(0x19,0x7b8088ab6140,0x7b8088ab615c)
 26475      1 asterisk RET   accept -1 errno 35 Resource temporarily unavailable

The socket is then apparently permanently messed up ('messed up' is the
technical term from Stevens!).  There is no incoming connection at the
start, but perhaps accept runs because of FIONBIO.

* 16

Seems to work.  I don't really remember if I used to be using 16, but
it's quite plausible.

* 13

Doesn't start SIP, but it's beyond ancient so I don't want to run it or
figure it out.  I'm pretending it has been removed from pkgsrc and
ignoring it.



Home | Main Index | Thread Index | Old Index