[recording]
exten => _X!,1,Answer()
same => n,Record(/recordings/recording-${EPOCH}.wav,,,kq)
exten => h,1,Hangup()
For reference, 172.18.0.2 is the IP of a SIPp container for testing, which generates “fake” SIP and RTP packets. But I don’t think this matters much.
I have tried these scenarios:
Copy all of Asterisk 18’s /etc/asterisk and /var/lib/asterisk into Asterisk 20
Only copy /etc/asterisk/sip.conf and /etc/asterisk/extensions.conf from Asterisk 18 into Asterisk 20
Only copy /etc/asterisk/sip.conf and /etc/asterisk/extensions.conf from Asterisk 18 into Asterisk 20 and copy /etc/asterisk/sip.conf to /etc/asterisk/pjsip.conf
In all cases, asterisk -rvvv does not display anything on Asterisk 20, and SIPp shows that the packets were retransmitted 5 times before it failed:
The chan_sip module is not built by default in Asterisk 20. Does the container build it and have it included? If not, then there would be nothing listening for SIP.
When I do module show like sip on Asterisk 20, the only thing a bit related I see is chan_pjsip.so, while on Asterisk 18 I get chan_sip.so.
How do I install it? Or would it be better to use pjsip, and if so, how? I am not well versed in telecom, so I don’t even know the difference between SIP and PJSIP.
I can’t comment on the container, I have no knowledge or involvement of it. The chan_pjsip module is the default module going forward, and chan_sip has been removed as of Asterisk 21. PJSIP is just a different implementation of SIP, it’s still SIP. There’s docs[1] covering different aspects for configuration and migrating.
There is no equivalent “insecure” option in chan_pjsip, so it’s not mapped. It looks pretty much the same functionally - but you should really try to understand the different parts and their meanings yourself.
Thanks for bearing with me. Once done, I will try to understand what everything means. I am a web & AI developer, with very little experience in VoIP, but willing to learn I’ve already been researching, but didn’t know where to even start looking. Now I know thanks to you.
Should I remove the the “Non mapped elements” section or keep [general]without insecure?
Here are the warnings and errors I get on startup, but I don’t think it’s related to my issue:
[Oct 15 10:13:25] WARNING[1]: loader.c:2409 load_modules: Some non-required modules failed to load.
[Oct 15 10:13:25] WARNING[1]: loader.c:2509 load_modules: The deprecated module 'res_adsi.so' has been loaded and is running, it may be removed in a future version
[Oct 15 10:13:25] WARNING[1]: loader.c:2509 load_modules: The deprecated module 'app_getcpeid.so' has been loaded and is running, it may be removed in a future version
[Oct 15 10:13:25] WARNING[1]: loader.c:2509 load_modules: The deprecated module 'app_adsiprog.so' has been loaded and is running, it may be removed in a future version
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: Failed to resolve dependencies for res_stir_shaken
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: res_stir_shaken declined to load.
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: cdr_sqlite3_custom declined to load.
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: cel_sqlite3_custom declined to load.
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: Failed to resolve dependencies for res_http_media_cache
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: res_http_media_cache declined to load.
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: Failed to resolve dependencies for res_pjsip_stir_shaken
[Oct 15 10:13:25] ERROR[1]: loader.c:2524 load_modules: res_pjsip_stir_shaken declined to load.
[Oct 15 10:13:25] Asterisk Ready.
And here are the warnings and errors I get after core reload:
[Oct 15 10:18:43] ERROR[92]: res_pjsip/config_system.c:267 system_create_resolver_and_set_nameservers: There are no local system nameservers configured, resorting to system resolution
[Oct 15 10:18:43] WARNING[91]: res_phoneprov.c:1249 get_defaults: Unable to find a valid server address or name.
[Oct 15 10:18:43] ERROR[91]: ari/config.c:312 process_config: No configured users for ARI
[Oct 15 10:18:43] NOTICE[91]: cel_custom.c:92 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
I already tried, but nothing gets printed.
Both the Asterisk 18 and Asterisk 20 containers are on the host network (I only run one of them at a time to avoid conflicts), with port 5060 open. I can capture the packets on Asterisk 18.
This is already the case since both Asterisk containers are on the same IP.
I would also add that attempting to set in the general section rings alarm bells for me. You either have a very unusual system, in which case you need a detailed understanding of how the configurations work, or you have created a major security vulnerability.
insecure=invite is a work round for historic limitations in chan_sip; remotesecret is a better way,but everyone blindly copies, so it rarely gets used, and it would be unusual to require insecure=port, when using UDP.
You should review the use of allowguest. That is sometime needed, as a work round for other chan_sip limitations, It doesn’t seem to have been translated into the chan_pjsip configuration.