Pjsip: Address already in use because of pnp daemon

Hello,
I am using a small pnp daemon to provide configuration to my phones. It’s more or less an adaption of snom-pnpserv/pnpserv.py at master · HubertD/snom-pnpserv · GitHub

It binds to 224.0.1.75:5060 to detect broadcasts of phones at startup and sends them the configuration url.

This worked perfect with chan_sip for years. asterisk was binding to 0.0.0.0:5060 and the pnp daemon to 224.0.1.75:5060 with no problem.
But since I started using pjsip it complains on startup with “Transport ‘transport-udp’ could not be started: Address already in use”.

Of course if I bind the transport-udp to another port or if I stop the pnp daemon everything works.

Does anyone know if there is something I can do about it? Or do I have to accept that I have to use differnt ports now?

Thank you!
Michael

can you post your pjsip.conf
witch interface do you use for Asterisk
do you have more than 1 interface?

Thanks for your answer.
The transport section of pjsip.conf

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060

I have two network interfaces, that’s why I bind to 0.0.0.0

not sure way it worked with chan_sip but i general you cant have 2 different application that bind to the same ip:port
you should look into ensuring that the pnp daemon only listen to that ip:port, just like tcpdump

do you pnp daemon show up if you do this command’s

lsof -i -P -n | grep 5060
netstat -tulpn |grep 5060

Yes, it shows up with netstat and lsof with 224.0.1.75:5060

224.0.1.75 is a special address for multicast purposes. Usualy it’s treated like a different interface than 0.0.0.0. I guess that’s why chan_sip didn’t care.

But it’s okay, I started using different ports, I can live with that :wink: