Asterisk rejects new sip registration

Hello,
I have an Asterisk 1.4 running for 3 years, working perfectly with about 15 extensions.
Recently the client asked to add 3 more.
Asterisk rejects the registration of these new ones, which are similar to those that work normally.
Using the same softphone, same network, the registration of an old one is accepted, but the new one is rejected.

Thanks for your help, since I’ve been racking my brain for many days,
Marcelo

sip.conf
[general]
allowguest=no
srvlookup=no
udpbindaddr=0.0.0.0
tcpenable=no
nat=yes
externalhost=dominio.com
externrefresh=60
localnet=192.168.0.0/255.255.255.0
canreinvite = yes
dtmfmode=auto
alwaysauthreject=yes
deny=0.0.0.0/0.0.0.0

[ramal-voip](!)
nat=yes
type=friend
context=INTERNAL
host=dynamic
disallow=all
host=dynamic
secret=foo
call-limit=10
disallow=all
allow=gsm
allow=ulaw

; ***** It works *****
[100](ramal-voip)
callgroup=1
secret=pass100
pickupgroup = 1
callerid="working" <100>

; ***** It doesn't work *****
[101](ramal-voip)
callgroup=1
secret=test101
pickupgroup = 1
callerid="notworking" <101>

;----------------------------------------------------------------------------------------------------------------
extensions.conf
[general]
[globals]

[INTERNAL]
; ***** It works ******
exten => 100,1,Dial(SIP/100)

; ****** It doesn't work ******
exten => 101,1,Dial(SIP/101)

You will need to look a the logs, as there is no obvious difference.

However, you should note that Asterisk 1.4 was well beyond end of life at the time you started using it!

Thanks David,

I couldn’t find a specific log file, just via debug, but since there are so many live events, I couldn’t capture a specific one of a SIP authentication rejected.
Could you help me by indicating which log file I could track down this problem?

Greetings,
Marcelo

David,

I’m sorry, I found the error message:

Notes:
XXX.XXX.XXX.XXX was showed my real IP that I used for test.
I configured sofphone with 101, but the error indicates 100.

Thanks again,
Marcelo

SECURITY[1745] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2019-11-10T23:39:34.573-0200",Severity="Informational",Service="SIP",EventVersion="1",AccountID="100",SessionID="0x1b675c4",LocalAddress="IPV4/UDP/192.168.0.49/5060",RemoteAddress="IPV4/UDP/XXX.XXX.XXX.XXX/18144",Challenge="4716e8be"

You can get a SIP debug like this!

ARS-Server*CLI> sip set debug ip [Device_IP_Address]
Usage: sip set debug {off|on|ip addr[:port]|peer peername}

Result of sip set debug ip XXX.XXX.XXX.XXX

<--- SIP read from UDP:XXX.XXX.XXX.XXX:18144 --->
REGISTER sip:asterisk.domain SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:18144;rport;branch=z9hG4bK-9p529989005557182839r
From: "Aragão" <sip:100@asterisk.domain>;tag=8g7856096737562519393m
To: "Aragão" <sip:100@asterisk.domain>
Call-ID: 6e4558294512083855215k7244rmwp
CSeq: 19786 REGISTER
Max-Forwards: 40
Expires: 180
Authorization: Digest username="101",realm="asterisk",nonce="7a0f1088",uri="sip:asterisk.domain",response="e9efe68d24d6d5c26551a05ae67d8de4",algorithm=MD5
Contact: "Aragão" <sip:100@XXX.XXX.XXX.XXX:18144>
X-UT: a
User-Agent: MizuDroid/2.7.0
X-DeviceID: 8870f7e44731deb2
Organization: MizuDroid
Supported: replaces
Allow: ACK,PRACK,BYE,CANCEL,INVITE,UPDATE,MESSAGE,INFO,OPTIONS,SUBSCRIBE,NOTIFY,REFER
Accept: application/sdp,application/dtmf-relay,text/plain
X-AUSR: 101
Content-Length: 0

<------------->
--- (19 headers 0 lines) ---
Sending to XXX.XXX.XXX.XXX:18144 (NAT)

<--- Transmitting (NAT) to XXX.XXX.XXX.XXX:18144 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:18144;branch=z9hG4bK-9p529989005557182839r;received=XXX.XXX.XXX.XXX;rport=18144
From: "Aragão" <sip:100@asterisk.domain>;tag=8g7856096737562519393m
To: "Aragão" <sip:100@asterisk.domain>;tag=as3293fd49
Call-ID: 6e4558294512083855215k7244rmwp
CSeq: 19786 REGISTER
Server: Asterisk PBX 14.6.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '6e4558294512083855215k7244rmwp' in 32000 ms (Method: REGISTER)
Really destroying SIP dialog '6e4558294512083855215k7244rmwp' Method: REGISTER

You’ve already got this from the security message, but the From and To headers show it is trying to register as 100, not 101.

I had previously noticed and commented on this 101 by 100 switch, but I confirmed the softphone setting and it’s 101. I can’t figure out why this happens.

It’s possible you put in the wrong settings when configuring the app.

I’d recommend clearing the app data and cache for the client on your phone and re-configuring the client again.

Hello,

I found the problem: It’s the MizuDroid app bug.
I installed Linphone and it worked perfectly.

Thank you all and apologize, because the problem was not in Asterisk.

Thank you very much,
Marcelo

1 Like

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