[asterisk-users] Possible handle leak in PJSIP

CDR venefax at gmail.com
Thu Aug 14 18:42:33 CDT 2014

I have been seeing errors saying the Asterisk cannot establish an RTP
connection, so I did this:
 lsof -i -n -P | grep asterisk | wc -l

but I have only
Asterisk 11 has 1 open calls
Asterisk 12 has 21 open calls
Asterisk 14 has 19 open calls
Asterisk 15 has 22 open calls
Asterisk 16 has 15 open calls
Asterisk 17 has 15 open calls
Asterisk 30 has 71 open calls
164 active calls

The machine has 30 asterisk process, most of them dormant.
There is no way with 164 active calls we may have 10484 handles allocated.
I have no idea how to debug this. I suggest that an experienced
engineer from Digium logs into the box  and researches this problem,
else nobody is going to ever be able to use PJSIP in production.
The box is Fedora 20, fully updated.
It grows about 30 handles per minute and it never goes down.
The dialplan is actually a four liner

look at the audiowritecodec
select an outbound endpoint based on that

The idea is to bridge calls based on the codec to avoid any
transcoding, so I have two outbound codecs and I dial like this:

exten => _X.,1,Set(_SIP_CODEC_OUTBOUND=${CHANNEL(audiowriteformat):0:4})
exten => _X.,n,Goto(${SIP_CODEC_OUTBOUND})
exten => _X.,n(ulaw),Dial(PJSIP/alawoutbound/sip:${EXTEN}@X.X.X.X)
exten => _X.,n(g729),Dial(PJSIP/g729outbound/sip:${EXTEN}@X.X.X.X)

As you can see, "Houston, we have a problem"

More information about the asterisk-users mailing list