> Can't make outgoing calls : sip/2.0 401 unauthorized

Hi, I can’t make outgoing calls.I thought it was my ISP but they say that there is no traffic from me. It’s just ringing and after " Everyone is busy/congested at this time (1:0/0/1) So here is my pjsip.conf :

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
local_net = 192.168.0.0/24

[0174901008]
type=endpoint
context=sipmivoaka
disallow=all
allow=g729
allow=ulaw
allow=alaw
aors=0174901008
auth=0174901008

[0174901008]
type=aor
max_contacts=1

[0174901008]
type=auth
auth_type=userpass
password=test
username=0174901008

[axialys]
type=aor
contact=sip:41735@sip-ng.axialys.net

[axialys]
type=endpoint
transport=transport-udp
context=axialys
disallow=all
allow=g729
allow=ulaw
allow=alaw
from_domain=sip-ng.axialys.net
aors=axialys

[axialys]
type=identify
endpoint=axialys
match=sip-ng.axialys.net

And here are logs :

<— Received SIP request (1016 bytes) from UDP:192.168.0.22:22706 —>
INVITE sip:0969363030@192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.22:22706;branch=z9hG4bK-d87543-291fa2309f5d423c-1–d87543-;rport
Max-Forwards: 70
Contact: sip:0174901008@192.168.0.22:22706
To: "0969363030"sip:0969363030@192.168.0.2
From: sip:0174901008@192.168.0.2;tag=a463f547
Call-ID: ODVkYmVkMmE4YjdiYjEwNmQ5OTVhMjMxYTM2NWE3Y2E.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1011s stamp 41150
Content-Length: 467

v=0
o=- 5 2 IN IP4 192.168.0.22
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.0.22
t=0 0
m=audio 3880 RTP/AVP 107 119 100 106 0 105 98 8 101
a=alt:1 2 : Y7jmOD3P eVN2xzMi 192.168.0.22 3880
a=alt:2 1 : ReUU43bs BHpj9E9S 192.168.56.1 3880
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:100 SPEEX/16000
a=rtpmap:106 SPEEX-FEC/16000
a=rtpmap:105 SPEEX-FEC/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

<— Transmitting SIP response (559 bytes) to UDP:192.168.0.22:22706 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.22:22706;rport=22706;received=192.168.0.22;branch=z9hG4bK-d87543-291fa2309f5d423c-1–d87543-
Call-ID: ODVkYmVkMmE4YjdiYjEwNmQ5OTVhMjMxYTM2NWE3Y2E.
From: sip:0174901008@192.168.0.2;tag=a463f547
To: “0969363030” sip:0969363030@192.168.0.2;tag=z9hG4bK-d87543-291fa2309f5d423c-1–d87543-
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1650980332/8708d9b872bc30e1f038e02c9451dce6”,opaque=“663078bc7460d60f”,algorithm=md5,qop=“auth”
Server: Asterisk PBX 16.25.2
Content-Length: 0

<— Received SIP request (365 bytes) from UDP:192.168.0.22:22706 —>
ACK sip:0969363030@192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.22:22706;branch=z9hG4bK-d87543-291fa2309f5d423c-1–d87543-;rport
To: “0969363030” sip:0969363030@192.168.0.2;tag=z9hG4bK-d87543-291fa2309f5d423c-1–d87543-
From: sip:0174901008@192.168.0.2;tag=a463f547
Call-ID: ODVkYmVkMmE4YjdiYjEwNmQ5OTVhMjMxYTM2NWE3Y2E.
CSeq: 1 ACK
Content-Length: 0

<— Received SIP request (1310 bytes) from UDP:192.168.0.22:22706 —>
INVITE sip:0969363030@192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.22:22706;branch=z9hG4bK-d87543-8220d018a045397b-1–d87543-;rport
Max-Forwards: 70
Contact: sip:0174901008@192.168.0.22:22706
To: “0969363030"sip:0969363030@192.168.0.2
From: sip:0174901008@192.168.0.2;tag=a463f547
Call-ID: ODVkYmVkMmE4YjdiYjEwNmQ5OTVhMjMxYTM2NWE3Y2E.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1011s stamp 41150
Authorization: Digest username=“0174901008”,realm=“asterisk”,nonce=“1650980332/8708d9b872bc30e1f038e02c9451dce6”,uri="sip:0969363030@192.168.0.2”,response=“573750b29d0db61028cd4b1c6fa44793”,cnonce=“557780aeb6d493f9e95a4e958c65383d”,nc=00000001,qop=auth,algorithm=md5,opaque=“663078bc7460d60f”
Content-Length: 467

v=0
o=- 5 2 IN IP4 192.168.0.22
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.0.22
t=0 0
m=audio 3880 RTP/AVP 107 119 100 106 0 105 98 8 101
a=alt:1 2 : Y7jmOD3P eVN2xzMi 192.168.0.22 3880
a=alt:2 1 : ReUU43bs BHpj9E9S 192.168.56.1 3880
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:100 SPEEX/16000
a=rtpmap:106 SPEEX-FEC/16000
a=rtpmap:105 SPEEX-FEC/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

<— Transmitting SIP response (360 bytes) to UDP:192.168.0.22:22706 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.22:22706;rport=22706;received=192.168.0.22;branch=z9hG4bK-d87543-8220d018a045397b-1–d87543-
Call-ID: ODVkYmVkMmE4YjdiYjEwNmQ5OTVhMjMxYTM2NWE3Y2E.
From: sip:0174901008@192.168.0.2;tag=a463f547
To: “0969363030” sip:0969363030@192.168.0.2
CSeq: 2 INVITE
Server: Asterisk PBX 16.25.2
Content-Length: 0

    -- Executing [0969363030@sipmivoaka:3] Dial("PJSIP/0174901008-00000000", "PJSIP/0969363030@axialys,40,tr") in new stack
-- Called PJSIP/0969363030@axialys

<— Transmitting SIP response (546 bytes) to UDP:192.168.0.22:22706 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.22:22706;rport=22706;received=192.168.0.22;branch=z9hG4bK-d87543-8220d018a045397b-1–d87543-
Call-ID: ODVkYmVkMmE4YjdiYjEwNmQ5OTVhMjMxYTM2NWE3Y2E.
From: sip:0174901008@192.168.0.2;tag=a463f547
To: “0969363030” sip:0969363030@192.168.0.2;tag=85aa64e6-f3c8-4101-b3da-84d092c117b7
CSeq: 2 INVITE
Server: Asterisk PBX 16.25.2
Contact: sip:192.168.0.2:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length: 0

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP request (548 bytes) from UDP:192.168.0.22:22706 —>
SUBSCRIBE sip:0174901008@192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.22:22706;branch=z9hG4bK-d87543-462e1405613ff014-1–d87543-;rport
Max-Forwards: 70
Contact: sip:0174901008@192.168.0.22:22706
To: sip:0174901008@192.168.0.2
From: sip:0174901008@192.168.0.2;tag=3b387b37
Call-ID: ZTU4ZDY3ZjQxOTEwMzM4NWQ1N2QzYWM4ZjI5ZTFiYzA.
CSeq: 1 SUBSCRIBE
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1011s stamp 41150
Event: message-summary
Content-Length: 0

<— Transmitting SIP response (549 bytes) to UDP:192.168.0.22:22706 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.22:22706;rport=22706;received=192.168.0.22;branch=z9hG4bK-d87543-462e1405613ff014-1–d87543-
Call-ID: ZTU4ZDY3ZjQxOTEwMzM4NWQ1N2QzYWM4ZjI5ZTFiYzA.
From: sip:0174901008@192.168.0.2;tag=3b387b37
To: sip:0174901008@192.168.0.2;tag=z9hG4bK-d87543-462e1405613ff014-1–d87543-
CSeq: 1 SUBSCRIBE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1650980354/4cecd3f7fbca64f7f5411d7f6ec4d7d7”,opaque=“4be95f0921e61bb6”,algorithm=md5,qop=“auth”
Server: Asterisk PBX 16.25.2
Content-Length: 0

<— Received SIP request (842 bytes) from UDP:192.168.0.22:22706 —>
SUBSCRIBE sip:0174901008@192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.22:22706;branch=z9hG4bK-d87543-332e8d3ff6149171-1–d87543-;rport
Max-Forwards: 70
Contact: sip:0174901008@192.168.0.22:22706
To: sip:0174901008@192.168.0.2
From: sip:0174901008@192.168.0.2;tag=3b387b37
Call-ID: ZTU4ZDY3ZjQxOTEwMzM4NWQ1N2QzYWM4ZjI5ZTFiYzA.
CSeq: 2 SUBSCRIBE
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1011s stamp 41150
Authorization: Digest username=“0174901008”,realm=“asterisk”,nonce=“1650980354/4cecd3f7fbca64f7f5411d7f6ec4d7d7”,uri="sip:0174901008@192.168.0.2",response=“06da050976be81aa74a3d06c55dd6f5a”,cnonce=“f89f148ffcb3974cbe9e0e3fab47acdf”,nc=00000001,qop=auth,algorithm=md5,opaque=“4be95f0921e61bb6”
Event: message-summary
Content-Length: 0

<— Transmitting SIP response (400 bytes) to UDP:192.168.0.22:22706 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.0.22:22706;rport=22706;received=192.168.0.22;branch=z9hG4bK-d87543-332e8d3ff6149171-1–d87543-
Call-ID: ZTU4ZDY3ZjQxOTEwMzM4NWQ1N2QzYWM4ZjI5ZTFiYzA.
From: sip:0174901008@192.168.0.2;tag=3b387b37
To: sip:0174901008@192.168.0.2;tag=z9hG4bK-d87543-332e8d3ff6149171-1–d87543-
CSeq: 2 SUBSCRIBE
Server: Asterisk PBX 16.25.2
Content-Length: 0

<— Transmitting SIP request (1011 bytes) to UDP:217.146.224.140:5060 —>
INVITE sip:0969363030@sip-ng.axialys.net SIP/2.0
Via: SIP/2.0/UDP 217.146.224.140:5060;rport;branch=z9hG4bKPj47c39e29-79d1-4922-b6cc-1dbeb027d73e
From: sip:0974901008@sip-ng.axialys.net;tag=064e4245-db58-48ab-89b3-fd35fa3bc589
To: sip:0969363030@sip-ng.axialys.net
Contact: sip:asterisk@217.146.224.140:5060
Call-ID: bfe6b798-1415-42eb-8de0-b6e3ecd3476e
CSeq: 3600 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.25.2
Content-Type: application/sdp
Content-Length: 314

v=0
o=- 1086778031 1086778031 IN IP4 217.146.224.140
s=Asterisk
c=IN IP4 217.146.224.140
t=0 0
m=audio 18246 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

== Everyone is busy/congested at this time (1:0/0/1)

The 401 is quite normal and isn’t even on the ITSP side of the call. Asterisk is behaving consistent with the ITSP’s statement that nothing ever reached them, although it is sending requests.

There is something seriously wrong with your Via headers, as they contain the ITSP’s address, when they should contain your (public) address. I find that difficult to understand unless you have a very badly configured networking environment.

I would note that you have an incomplete NAT configuration, in that you have specified the local network, but not your public address, so I’d expect the Via to contain your private address, if you really are behind NAT, but certainly not the ITSP’s.

Hi,
I reinstall everything but i have the same problem.
I made a small pjsip.conf and a dialplan with 2 lines but it’s always 401.
I don’t understand, i think that now my NAT configuration is ok

pjsip.conf

[transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
; NAT settings
local_net = 192.168.0.0/24
external_media_address = My pubic IP address
external_signaling_address = My pubic IP address

;== TRUNK ==

[axialys]
type=endpoint
transport = transport-udp-nat
context = axialys
allow = !all,g729,g722,ulaw
outbound_auth = axialys
aors = axialys
direct_media = no
from_domain = sip-ng.axialys.net

[axialys]
type = aor
contact = sip:sip-ng.axialys.net:5060

[axialys]
type=identify
endpoint = axialys
match = 217.146.224.140
match = 217.147.227.140

;== AGENT ==

[0174901007]
type = endpoint
transport = transport-udp-nat
context = sipmivoaka
dtmf_mode = rfc4733
disallow = all
allow = g729
allow = ulaw
allow = alaw
callerid = 0174901008
auth = 0174901007auth
aors = 0174901007
direct_media = no
outbound_auth = 0174901007
trust_id_outbound = yes

[0174901007auth]
type = auth
auth_type = userpass
username = 0174901007
password = test

[0174901007]
type = aor
max_contacts = 1

extensions.conf

exten => _0[1-9]XXXXXXXX,1,Dial(PJSIP/${EXTEN}@axialys,40,tr)
exten => _0[1-9]XXXXXXXX,n,Hangup

But Everyone is busy/congested at this time (1:0/0/1)

I don’t know what to do

Forget the 401. It is not a problem. Your problem is not a bad response; it is the lack of any response at all.

Axialys doc denote asterisk configuration as peer

Setting up an Asterisk softswitch – Axialys Guide

The three numbers after the colon are busy, congested, and unavailable. It’s got unavailable because there was no response for the ITSP. The ITSP is claiming there is no response because they never received the request. You need to trace the request through the network and find out where it is getting lost.

The Via is also of concern, but the rport in that should mitigate the use of a wrong address.

I made a tcpdump but i don’t know how to interpret it. Here a screen.


Where is the problem ?

the screen shot do not tell us anything
you either need to show us the interaction for a call
wireshark → “telephony” → “VoIP calls” and then the flow for a call
or post the pcap file

Here is the pcap file

http://fandrefiala.xyz/KOLEGRAM/2022_04_22.pcap

Finally, it works. I can make outgoing calls.
@Rmcgrath was right so i delete the registration for the trunk.
I add ACL with my localnet and my ITSP.
Thanks to all of you

1 Like