Hi guys, as stated in the title, I installed asterisk on a new machine(ubuntu 20.04) using apt-get install asterisk . Although the phone registered fine on the previous machine(running asterisk 20 with the same pjsip.conf and extensions.conf), it no longer does so. I tried putting the asterisk terminal in debug mode and it said ‘wrong password’. It seems this phones configuration doesnt use the inputed password for the registration(it never did, although it did register successfully on the previous machine). I guess what I’m asking is:
is there something wrong with my configuration?
is there a way to configure asterisk to accept the registration packet that the phone does send(modifying the phones behavior is not possible)?
I’ve attached a zip folder with the relevant files. I appreciate any insight you guys can provide. Thank you.
Hi, I have been trying to do this, but it seems very difficult to find documentation on how. I was able to find the github, which told me I can do the following to restrict pjsip:
noload => res_pjsip.so
noload => res_pjsip_pubsub.so
noload => res_pjsip_session.so
noload => chan_pjsip.so
noload => res_pjsip_exten_state.so
noload => res_pjsip_log_forwarder.so
that said, I guess I can change noload to load here? If that is correct, how can I restrict chan sip from loading? Or is there an easier way to do this?
By default modules.conf will automatically load all modules in the modules directory, so no explicit “load” is required. It’s only if you want to not load some that you configure them to not load.
I tried making the changes you suggested, with both autoload present and not present, and asterisk is no longer listening on port 5060, predictably sending icmp unreachable messages to the phone thats trying to register. I also noticed that ‘asterisk -rvvvvv’ cant connect to the console, but ‘asterisk -r’ does. Strange behavior here, not sure whats going on. Any ideas? I have enclosed modules.conf in case there is anything weird in there. Thanks again.
Does pjsip.conf have a configured transport to listen on port 5060? If not, then that port 5060 behavior will occur. The original attached pjsip.conf doesn’t show a configured transport in it.
I also don’t know why “asterisk -rvvvv” would not work while “asterisk -r” does. It could be a distro package thing, or a red herring.
Good catch there, it was commented out. I uncommented it, but still having the same problem. Did I maybe leave something out? Here is the new pjsip.conf.
Asterisk would need to be restarted to have that be applied, you can also check the console output at startup to see if any errors/issues were encountered.
Originally you stated that this all worked on a previous machine with the same configuration, but without a transport it never would have. Did you make changes since then?
Thanks for asking. Here is what happened. I had asterisk set up to work with the endpoints and dialplan on a different machine architecture. That machine is almost dead, so I needed to migrate asterisk to a new one. I tried rsync, but restoring the filesystem predictably did not work out well, as these are two different machines. So I used apt-get to get asterisk that way(ubuntu 20), and decided to just add the endpoints i had in the previous machine to the end of pjsip.conf on the new machine. I did the same with the dial plan in extensions.conf. I did restart the machine after the changes, but still no socket showing up on port 5060. I also tried ‘systemctl stop/start asterisk’ just to be sure. Still no dice. Not sure what is going on here.
Was able to get a log, but I didn’t notice anything weird. Is there anything that could cause the loader to ignore or override the transport config that was added to pjsip.conf? Here is the log file, maybe you will see something I didn’t.
I did disable autoload after i noticed there was no listener on port 5060, I thought it might change something(im pretty ignorant about asterisk honestly). Here is the debug with autoload enabled… Sorry about that.
Finally figured out what the issue was. On the line within the transport section of pjsip.conf, after the ‘bind=0.0.0.0’ , there was ‘;udp,tcp…’. This must have confused the parser and caused it to disregard the bind configuration. After removing ‘;udp,tcp…’, it worked fine. Thanks for all of your help, I appreciate it.