[solved] Asterisk opens random udp high ports

Dear sirs,
I’m running Asterisk 13.14.1 for Raspbian Stretch
The command
netstat -altunp | grep asterisk

udp        0      0 *                           412/asterisk
udp        0      0  *                           412/asterisk
udp6       0      0 :::44441                :::*                                412/asterisk

It’s a VERY minimal configuration for security reasons with only IAX2 protocol enabled.
The other two “mistery” ports are different everytime Asterisk boots.
Does anyone knows what those are for and how to close them?
Thank you very much,

See the previous thread, on the same subject, within the last couple of months.

I believe the way to close them is to disable chan_pjsip.

Thank you for your reply.

noload => chan_pjsip.so

in modules.conf and rebooted but the ports are still opened.
Would you please provide me the link to the older posts you mentioned?
Thanks again,

I guess so, although doing so was almost as much work as doing so for yourself, as the subject is fairly obvious and I had to trawl the forum history to find it:

Marked it as [solved] thanks to David551.
Relevant Wiki page:


(Jump to the “Disabling res_pjsip and chan_pjsip” section)
Best regards,

1 Like