What have wrong with this register?

I am trying to connect a client in my server and didn’t work. I tried different Asterisk versions, SIP and PJSIP and nothing news.

<--- SIP read from UDP:189.61.199.207:5060 --->
REGISTER sip:sip.solaristelecom.com SIP/2.0
From: 19009001<sip:19009001@sip.solaristelecom.com>;tag=zAXf2-8VZzE
To: 19009001<sip:19009001@sip.solaristelecom.com>
Call-ID: uzyYt0-BcC0nf2@sip.solaristelecom.com
CSeq: 195 REGISTER
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bKrE0f2-mTibA0h4M
Contact: 19009001<sip:19009001@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: INTELBRAS IMPACTA - Jun 20 2013
Expires: 90
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
Sending to 189.61.199.207:5060 (NAT)
Sending to 189.61.199.207:5060 (NAT)

<--- Transmitting (NAT) to 189.61.199.207:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bKrE0f2-mTibA0h4M;received=189.61.199.207;rport=5060
From: 19009001<sip:19009001@sip.solaristelecom.com>;tag=zAXf2-8VZzE
To: 19009001<sip:19009001@sip.solaristelecom.com>;tag=as65add7ad
Call-ID: uzyYt0-BcC0nf2@sip.solaristelecom.com
CSeq: 195 REGISTER
Server: Asterisk PBX 16.1.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="12f751b7"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog 'uzyYt0-BcC0nf2@sip.solaristelecom.com' in 32000 ms (Method: REGISTER)

Settings of the server:


[general]
context=basico
port=5060
bindport=5060
bindaddr=0.0.0.0
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
maxexpirey=360
defaultexpirey=120
allow=all
externaddr=X.233.162.33
media_address=X.233.162.33
localnet=192.168.0.0/255.255.0.0
nat=force_rport,comedia
qualify=yes
directmedia=no

[19009001]
context=outbound
defaultuser=19009001
secret=xxx
type=friend
host=dynamic
canreinvite=no
dtmfmode=rfc2833
qualify=yes
disallow=all
allow=alaw,ulaw
rtcachefriends=yes
nat=force_rport,comedia
insecure=invite,port
directmedia=no

Anyone have a suggestion to change any parameter?

Asterisk has challenged for authentication, as the REGISTER did not contain any. It is up to the remote side to then send the REGISTER again with credentials.

1 Like

Yes, but the settings is ok in the remote side included the credentials.

I suppose maybe is any network settings that is missing in the Asterisk, no?
For example mask or local lans?

That would not cause this result. Asterisk is behaving as it should, challenging for the authentication.

The other possibility is that the 401 is never reaching the client.