SIP calling not working outside local network

Hi All,
I setuped Asterisk server on public IP and its running successfully, I used Zoiper android app for calling and I am able to do calling within the network but when I am trying to register outside the local network then it’s not allowed me to calls.

Please let me know if any setting I need to do sip.conf to support calling outside the network?


Thanks

If behind NAT then sip.conf has to be configured for localnet and externip or externhost. Additionally you have to configure any firewall to allow the traffic through, and the client has to use the public IP address.

As well you haven’t stated what actually happens. Does Asterisk not see the REGISTER requests? Does REGISTER work but when you try to call it doesn’t? Does it get no audio?

Thanks for your reply.

I have configured it in sip.conf as below:
externip= 125.99.173.53
localnet= 192.168.1.117/255.255.255.0

also 2 users:

[6000]
type=friend
secret=PASSWORD
nat=force_rport,comedia
qualify=yes
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=ulaw
context=sip-dialout
callerid=6000
deny=0.0.0.0/0
permit=0.0.0.0/0

[6001]
type=friend
secret=PASSWORD
nat=force_rport,comedia
qualify=yes
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=ulaw
context=sip-dialout
callerid=6001
deny=0.0.0.0/0
permit=0.0.0.0/0

On Asterisk CLI I received the below log when trying to connect outside the network:
[Jan 20 14:54:52] NOTICE[3506]: chan_sip.c:30545 sip_poke_noanswer: Peer ‘6000’ is now UNREACHABLE! Last qualify: 7


Thanks

The device appears to have registered then and is reachable.

I apologies, previous log was when I am on same network while below was log when i tried outside network:
On Asterisk CLI I received the below log when trying to connect outside the network:
[Jan 20 14:54:52] NOTICE[3506]: chan_sip.c:30545 sip_poke_noanswer: Peer ‘6000’ is now UNREACHABLE! Last qualify: 7

Then the traffic is not reaching your Asterisk. Does it show when “sip set debug on” is enabled? Is there a firewall? Is the client connecting to the public IP?

Yes, There is firewall.
I setuped it on public ip and also port 5060 is open. I am able to open Asteris GUI outside the network.

Below were the logs:
<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—3696dc519d9f1e21;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 126 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“32a47b8a”,uri=“sip:125.99.173.43;transport=UDP”,response=“48d139a3b5d4463322a46bc5620b4cf6”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Sending to 192.168.1.1:39614 (no NAT)

<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—3696dc519d9f1e21;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as07ef4567
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 126 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“00042309”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—9668983157dd6f85;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 127 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“00042309”,uri=“sip:125.99.173.43;transport=UDP”,response=“22892137de9694ee3f22b62ecda6c832”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Reliably Transmitting (NAT) to 192.168.1.1:39614:
OPTIONS sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.117:5060;branch=z9hG4bK4306c506;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@192.168.1.117;tag=as56f0a5e2
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
Contact: sip:asterisk@192.168.1.117:5060
Call-ID: 412276132f4df4961c69c8b10007e32f@192.168.1.117:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 17.9.1
Date: Wed, 20 Jan 2021 10:31:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—9668983157dd6f85;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as07ef4567
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 127 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;expires=60
Date: Wed, 20 Jan 2021 10:31:54 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.117;branch=z9hG4bK4306c506;rport=5060
Contact: sip:192.168.1.1:39614
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;tag=41f6762e
From: “asterisk” sip:asterisk@192.168.1.117;tag=as56f0a5e2
Call-ID: 412276132f4df4961c69c8b10007e32f@192.168.1.117:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.10.12.3-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘412276132f4df4961c69c8b10007e32f@192.168.1.117:5060’ Method: OPTIONS
Really destroying SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ Method: REGISTER

<— SIP read from UDP:192.168.1.1:39614 —>

<------------->

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—5766acdf2bd0b301;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 128 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“00042309”,uri=“sip:125.99.173.43;transport=UDP”,response=“22892137de9694ee3f22b62ecda6c832”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Sending to 192.168.1.1:39614 (no NAT)

<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—5766acdf2bd0b301;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as3a34a94d
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 128 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“61c1ff88”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—e3d9ea3282711764;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 129 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“61c1ff88”,uri=“sip:125.99.173.43;transport=UDP”,response=“ece6871419aa38e2a86676cdee2b0702”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Reliably Transmitting (NAT) to 192.168.1.1:39614:
OPTIONS sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.117:5060;branch=z9hG4bK5ebe87c2;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@192.168.1.117;tag=as5b008b4e
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
Contact: sip:asterisk@192.168.1.117:5060
Call-ID: 1cedbc827451800c4c01f3837a9113ee@192.168.1.117:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 17.9.1
Date: Wed, 20 Jan 2021 10:32:49 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—e3d9ea3282711764;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as3a34a94d
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 129 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;expires=60
Date: Wed, 20 Jan 2021 10:32:49 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.117;branch=z9hG4bK5ebe87c2;rport=5060
Contact: sip:192.168.1.1:39614
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;tag=8040c147
From: “asterisk” sip:asterisk@192.168.1.117;tag=as5b008b4e
Call-ID: 1cedbc827451800c4c01f3837a9113ee@192.168.1.117:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.10.12.3-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘1cedbc827451800c4c01f3837a9113ee@192.168.1.117:5060’ Method: OPTIONS
Really destroying SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ Method: REGISTER

<— SIP read from UDP:192.168.1.1:39614 —>

<------------->

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—f4bbd36a5baad534;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 130 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“61c1ff88”,uri=“sip:125.99.173.43;transport=UDP”,response=“ece6871419aa38e2a86676cdee2b0702”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Sending to 192.168.1.1:39614 (no NAT)

<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—f4bbd36a5baad534;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as20577656
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 130 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“4991ff03”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—8c351ba8ec18d5a9;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 131 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“4991ff03”,uri=“sip:125.99.173.43;transport=UDP”,response=“95d2450374c5e8e997144b2b5e542841”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Reliably Transmitting (NAT) to 192.168.1.1:39614:
OPTIONS sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.117:5060;branch=z9hG4bK38b05883;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@192.168.1.117;tag=as126730a6
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
Contact: sip:asterisk@192.168.1.117:5060
Call-ID: 68dd5ff2708955f4008369ab5a9502a3@192.168.1.117:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 17.9.1
Date: Wed, 20 Jan 2021 10:33:48 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—8c351ba8ec18d5a9;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as20577656
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 131 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;expires=60
Date: Wed, 20 Jan 2021 10:33:48 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.117;branch=z9hG4bK38b05883;rport=5060
Contact: sip:192.168.1.1:39614
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;tag=7e090235
From: “asterisk” sip:asterisk@192.168.1.117;tag=as126730a6
Call-ID: 68dd5ff2708955f4008369ab5a9502a3@192.168.1.117:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.10.12.3-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘68dd5ff2708955f4008369ab5a9502a3@192.168.1.117:5060’ Method: OPTIONS

<— SIP read from UDP:192.168.1.1:39614 —>

<------------->
Really destroying SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ Method: REGISTER

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—7696ab7ca8d57c6c;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 132 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“4991ff03”,uri=“sip:125.99.173.43;transport=UDP”,response=“95d2450374c5e8e997144b2b5e542841”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Sending to 192.168.1.1:39614 (no NAT)

<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—7696ab7ca8d57c6c;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as24b9ceb2
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 132 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“1a0357c3”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—6443c63229795835;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 133 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“1a0357c3”,uri=“sip:125.99.173.43;transport=UDP”,response=“61ca393e42ffcb072c4732fddafa4f3d”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Reliably Transmitting (NAT) to 192.168.1.1:39614:
OPTIONS sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.117:5060;branch=z9hG4bK2854e7f9;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@192.168.1.117;tag=as3ad2e649
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
Contact: sip:asterisk@192.168.1.117:5060
Call-ID: 2c470d1302565e7a047ca10b05bba792@192.168.1.117:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 17.9.1
Date: Wed, 20 Jan 2021 10:34:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—6443c63229795835;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as24b9ceb2
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 133 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;expires=60
Date: Wed, 20 Jan 2021 10:34:44 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.117;branch=z9hG4bK2854e7f9;rport=5060
Contact: sip:192.168.1.1:39614
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;tag=7b232031
From: “asterisk” sip:asterisk@192.168.1.117;tag=as3ad2e649
Call-ID: 2c470d1302565e7a047ca10b05bba792@192.168.1.117:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.10.12.3-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘2c470d1302565e7a047ca10b05bba792@192.168.1.117:5060’ Method: OPTIONS

<— SIP read from UDP:192.168.1.1:39614 —>

<------------->
Really destroying SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ Method: REGISTER

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—f7a18540087f5c4e;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 134 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“1a0357c3”,uri=“sip:125.99.173.43;transport=UDP”,response=“61ca393e42ffcb072c4732fddafa4f3d”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Sending to 192.168.1.1:39614 (no NAT)

<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—f7a18540087f5c4e;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as320cc119
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 134 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“2d70bfb4”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
REGISTER sip:192.168.1.117;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—3e47e4abe7dd99b7;rport
Max-Forwards: 70
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
To: sip:6000@125.99.173.43;transport=UDP
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 135 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Zoiper rv2.10.12.3-mod
Authorization: Digest username=“6000”,realm=“asterisk”,nonce=“2d70bfb4”,uri=“sip:125.99.173.43;transport=UDP”,response=“a56cf857091cbbed7ff20d23582d55df”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.1.1:39614 (no NAT)
Reliably Transmitting (NAT) to 192.168.1.1:39614:
OPTIONS sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.117:5060;branch=z9hG4bK12d65e7f;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@192.168.1.117;tag=as2f58b31b
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6
Contact: sip:asterisk@192.168.1.117:5060
Call-ID: 5eeacadb6ed081cf7a2e14a30cb61b43@192.168.1.117:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 17.9.1
Date: Wed, 20 Jan 2021 10:35:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— Transmitting (NAT) to 192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.1:39614;branch=z9hG4bK-524287-1—3e47e4abe7dd99b7;received=192.168.1.1;rport=39614
From: sip:6000@125.99.173.43;transport=UDP;tag=3084de14
To: sip:6000@125.99.173.43;transport=UDP;tag=as320cc119
Call-ID: RBzmexg27v9QYa_YGV8vCA…
CSeq: 135 REGISTER
Server: Asterisk PBX 17.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;expires=60
Date: Wed, 20 Jan 2021 10:35:41 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.1:39614 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.117;branch=z9hG4bK12d65e7f;rport=5060
Contact: sip:192.168.1.1:39614
To: sip:6000@192.168.1.1:39614;transport=UDP;rinstance=c0d9e310938edab6;tag=f4ac7e1e
From: “asterisk” sip:asterisk@192.168.1.117;tag=as2f58b31b
Call-ID: 5eeacadb6ed081cf7a2e14a30cb61b43@192.168.1.117:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.10.12.3-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘5eeacadb6ed081cf7a2e14a30cb61b43@192.168.1.117:5060’ Method: OPTIONS

<— SIP read from UDP:192.168.1.1:39614 —>

<------------->
Really destroying SIP dialog ‘RBzmexg27v9QYa_YGV8vCA…’ Method: REGISTER

The REGISTERs are only coming from your local network, so I assume that the external ones are not reaching Asterisk.

Whilst that is a problem outside Asterisk, I would point out that chan_pjsip, not chan_sip should be used for new installations, and also that “Asterisk GUI” is not supported anywhere and no GUI for Asterisk is supported on this forum.

How I ensure that the register request comes from external ip? In which file I need to do changes?

None of the Asterisk files. The wrong file could be in your router and might even be in the phone.

Basically, you need to solve this problem before you start working on Asterisk.

Could you please guide which settings we need to check on router to get this working?

As we setup public IP and also port 5060 is open. I am also able to open an asterisk GUI using public IP outside the network…

I presume Asterisk GUI uses TCP, but SIP normally uses UDP.

For the router configuration, you need to ask the router supplier or use their forums.

I checked with the router supplier and we removed the firewall and tried on the open network but still it’s only working within the network. Outside the network, users are not registering.

Any Suggestions?

which router do you have? fire wall fail2ban on the system ?
sngrep would show if anything is coming to the node even before asterisk

Its on open network, There is no Firewall.

As I am using android “ZoiperApp” for testing calls on Asterisk server outside the network. Should I need to configure STUN/TURN servers as well? I think Zoiper app uses its own STUN/TURN server and I do not need to configure it.

Please suggest…

Please update…

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