A simple question: registered SIP or not?

`This is my sip.conf`

[general]
context = local
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = yes

[telefono1]
context=local
type=friend
username=utente
fromuser=utente
secret=zN1va3Uzt4I9nno
qualify=200
host=telefono1.blu.priv
directmedia=yes
regexten=1001
nat=no
~
virtuale-2*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
telefono1/utente        192.168.0.38                                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 '192.168.0.38:5060' - 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.