A simple question: registered SIP or not?

`This is my sip.conf`

context = local
bindport = 5060
bindaddr =
srvlookup = yes

virtuale-2*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
telefono1/utente                                No         No             5060     OK (8 ms)                                    
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
[Oct 27 19:46:32] NOTICE[3254]: chan_sip.c:29057 handle_request_register: Registration from '<sip:utente@virtuale-2.blu.priv>' failed for '' - Wrong password

why said “OK” and the give the error message?

Solution found: i change host to dynamic and “utente” to “telefono1”

You shouldn’t be using chan_sip on new installations.

username does not do what you think it does, and the name username is deprecated in favour of defaultuser. It is unlikely to be needed.

nat= is not needed here. The default is adequate. Again it probably doesn’t do what you think it does.

Unless there are two devices sharing the same IP address, type should be peer.

As this seems to be a phone, specifying fromuser will break caller ID, but achieve nothing useful. It generally does not make sense in combination with host=dynamic.

Allowing all codecs can cause various problems, and actually broke some versions of Asterisk completely. You should disallow all, then only allow the codecs you want to use.

As I started, you should start over with chan_pjsip, unless you are doing something unusual that falls in the small sub-set of things that are supported by chan _sip, but not chan_pjsip. chan_sip was deprecated from Asterisk 17 and will be completely removed in Asterisk 21.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.